From 4a7150cd366ed7d7581e31afbb64445a2838b7cd Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Sat, 26 Nov 2022 13:27:33 +0100 Subject: [PATCH] qa/workunits/rbd-nbd: clear DEV after detach tests Otherwise we attempt to unmap it in cleanup(), needlessly. Signed-off-by: Ilya Dryomov --- qa/workunits/rbd/rbd-nbd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/workunits/rbd/rbd-nbd.sh b/qa/workunits/rbd/rbd-nbd.sh index 1bac4061571ce..1af9154e463be 100755 --- a/qa/workunits/rbd/rbd-nbd.sh +++ b/qa/workunits/rbd/rbd-nbd.sh @@ -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 -- 2.39.5