]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap
authorJason Dillaman <dillaman@redhat.com>
Mon, 14 Sep 2020 18:32:30 +0000 (14:32 -0400)
committerGitHub <noreply@github.com>
Mon, 14 Sep 2020 18:32:30 +0000 (14:32 -0400)
qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
1  2 
qa/workunits/rbd/rbd-nbd.sh

index d6e15999682f6c30945b6c80cb5a0752cd2347ad,c395de1968076075089621b8a58b50b542def9ca..cd899ec132fda0709d7e682620be73b907d63176
@@@ -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}