]> www.infradead.org Git - users/hch/blktests.git/commitdiff
tests/nvme: Set clear_ids for passthru targets
authorAlan Adamson <alan.adamson@oracle.com>
Tue, 5 Jul 2022 20:56:31 +0000 (13:56 -0700)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 15 Jul 2022 05:40:03 +0000 (14:40 +0900)
This allows to connect to passthru targets when the client and target
are on the same host.

Signed-off-by: Alan Adamson <alan.adamson@oracle.com>
[Shin'ichiro: replaced single bracket with double brackets]
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/nvme/rc

index ba21574070e9f6bd2378eabae07bea947b1b1d6e..f5729ef5aa4f12fa3072195c9171153390599023 100644 (file)
@@ -303,6 +303,9 @@ _create_nvmet_passthru() {
 
        _test_dev_nvme_ctrl > "${passthru_path}/device_path"
        echo 1 > "${passthru_path}/enable"
+       if [[ -f "${passthru_path}/clear_ids" ]]; then
+               echo 1 > "${passthru_path}/clear_ids"
+       fi
 }
 
 _remove_nvmet_passhtru() {