summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-08-03 10:21:50 -0700
committerGitHub <[email protected]>2018-08-03 10:21:50 -0700
commit6da0998f592a322ca045dec1c9db61333c9936dc (patch)
tree8ee0318fcdce256d99b3e1155e68bfd3b7821d7e
parent62840030a7dceaee013ddbcc1eebcfc7922edf7c (diff)
ZTS: Fix zfs_create_007_pos
It's possible for an unrelated process, like blkid, to have the volume open when 'zfs destroy' is run. Switch the cleanup function to the destroy_dataset() helper which handles this case by retrying the destroy when the dataset is busy. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed by: John Kennedy <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7763
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh
index 747f6d2f0..c49c77703 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh
@@ -49,10 +49,8 @@ verify_runnable "global"
function cleanup
{
- datasetexists $TESTPOOL/$TESTVOL && \
- log_must zfs destroy -f $TESTPOOL/$TESTVOL
- datasetexists $TESTPOOL/$TESTVOL1 && \
- log_must zfs destroy -f $TESTPOOL/$TESTVOL1
+ destroy_dataset $TESTPOOL/$TESTVOL
+ destroy_dataset $TESTPOOL/$TESTVOL1
}
log_onexit cleanup