Fix datasets held open after tests
Fix for post-testing error: `cannot destroy 'tmp.uwIwWzoNp4/tmp': dataset is busy` Thanks to @nalind for the fix. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
parent
1ad45ee2e2
commit
224f0b93d2
|
|
@ -70,6 +70,8 @@ case $TEST_DRIVER in
|
||||||
trap "zfs destroy -Rf $zpool/tmp; zpool destroy -f $zpool; rm -f $tmpfile" EXIT
|
trap "zfs destroy -Rf $zpool/tmp; zpool destroy -f $zpool; rm -f $tmpfile" EXIT
|
||||||
zfs create $zpool/tmp
|
zfs create $zpool/tmp
|
||||||
TMPDIR="/$zpool/tmp" showrun make STORAGE_DRIVER=$TEST_DRIVER local-test-integration local-test-unit
|
TMPDIR="/$zpool/tmp" showrun make STORAGE_DRIVER=$TEST_DRIVER local-test-integration local-test-unit
|
||||||
|
# Ensure no datasets are held open prior to `zfs destroy` trap.
|
||||||
|
kill $(lsns -J -t mnt --output-all | jq '.namespaces[]|select(.command=="sleep 1000s").pid')
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "Unknown/Unsupported \$TEST_DRIVER=$TEST_DRIVER (see .cirrus.yml and $(basename $0))"
|
die "Unknown/Unsupported \$TEST_DRIVER=$TEST_DRIVER (see .cirrus.yml and $(basename $0))"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue