From: Jason Dillaman Date: Mon, 14 Sep 2020 18:32:30 +0000 (-0400) Subject: Merge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap X-Git-Tag: v16.1.0~1095 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9929eff5333a907f9651b053a1dc9f52d03ec713;p=ceph.git Merge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap Reviewed-by: Jason Dillaman --- 9929eff5333a907f9651b053a1dc9f52d03ec713 diff --cc qa/workunits/rbd/rbd-nbd.sh index d6e15999682f,c395de196807..cd899ec132fd --- a/qa/workunits/rbd/rbd-nbd.sh +++ b/qa/workunits/rbd/rbd-nbd.sh @@@ -244,10 -243,11 +243,11 @@@ rbd-nbd list-mapped | expect_false gre # quiesce test QUIESCE_HOOK=${TEMPDIR}/quiesce.sh DEV=`_sudo rbd-nbd map --quiesce --quiesce-hook ${QUIESCE_HOOK} ${POOL}/${IMAGE}` + get_pid -# test it does not fail if the hook does not exists +# test it fails if the hook does not exists test ! -e ${QUIESCE_HOOK} -rbd snap create ${POOL}/${IMAGE}@quiesce1 +expect_false rbd snap create ${POOL}/${IMAGE}@quiesce1 _sudo dd if=${DATA} of=${DEV} bs=1M count=1 oflag=direct # test the hook is executed @@@ -296,10 -297,10 +297,10 @@@ get_pi _sudo mkfs ${DEV} mkdir ${TEMPDIR}/mnt _sudo mount ${DEV} ${TEMPDIR}/mnt -rbd snap create ${POOL}/${IMAGE}@quiesce5 +rbd snap create ${POOL}/${IMAGE}@quiesce3 _sudo dd if=${DATA} of=${TEMPDIR}/mnt/test bs=1M count=1 oflag=direct _sudo umount ${TEMPDIR}/mnt - unmap_device ${DEV} + unmap_device ${DEV} ${PID} cat ${LOG_FILE} expect_false grep 'quiesce failed' ${LOG_FILE}