]> www.infradead.org Git - users/hch/blktests.git/commitdiff
nvmeof-mp/rc: fix nvmeof-mp failure when NVME_TARGET_PASSTHRU enabled
authorYi Zhang <yi.zhang@redhat.com>
Sun, 24 Jan 2021 05:26:44 +0000 (13:26 +0800)
committerOmar Sandoval <osandov@fb.com>
Mon, 25 Jan 2021 18:41:02 +0000 (10:41 -0800)
$ ./check nvmeof-mp/001
nvmeof-mp/001 (Log in and log out)                           [passed]
    runtime  0.400s  ...  0.457s
rmdir: failed to remove 'subsystems/nvme-test/passthru/admin_timeout': Not a directory
rmdir: failed to remove 'subsystems/nvme-test/passthru/device_path': Not a directory
rmdir: failed to remove 'subsystems/nvme-test/passthru/enable': Not a directory
rmdir: failed to remove 'subsystems/nvme-test/passthru/io_timeout': Not a directory

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
tests/nvmeof-mp/rc

index c77526f6ce1daef70b29f171bb9027bca38676ba..ab7770f6aac0b77fe2d2a0788e81f9cf5f434dc2 100755 (executable)
@@ -265,8 +265,8 @@ stop_nvme_target() {
                        rm -f -- ports/*/subsystems/* &&
                        for d in {*/*/*/*,*/*}; do
                                [ -e "$d" ] &&
-                                       [ "$(basename "$(dirname "$d")")" != ana_groups ] &&
-                                       rmdir "$d"
+                               [[ ! "$(basename "$(dirname "$d")")" =~ ana_groups|passthru ]] &&
+                               rmdir "$d"
                        done
        )
        unload_module nvmet_rdma &&