]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd-nbd: clear DEV after detach tests 48680/head
authorIlya Dryomov <idryomov@gmail.com>
Sat, 26 Nov 2022 12:27:33 +0000 (13:27 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 26 Nov 2022 12:27:33 +0000 (13:27 +0100)
Otherwise we attempt to unmap it in cleanup(), needlessly.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/workunits/rbd/rbd-nbd.sh

index 1bac4061571ce3c8ab63c027ad6ccda14a0143e9..1af9154e463bef52616abca81fb29d1aaa9781f2 100755 (executable)
@@ -422,6 +422,7 @@ if [ -n "${COOKIE}" ]; then
     test "${ANOTHER_COOKIE}" = "abc de"
     unmap_device ${DEV} ${PID}
 fi
+DEV=
 
 # test detach/attach with --snap-id
 SNAPID=`rbd snap ls ${POOL}/${IMAGE} | awk '$2 == "snap" {print $1}'`
@@ -439,5 +440,6 @@ fi
 get_pid ${POOL}
 _sudo rbd device detach ${DEV} --device-type nbd
 expect_false get_pid ${POOL}
+DEV=
 
 echo OK