aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <behlendorf1@llnl.gov>2018-08-30 13:38:09 -0700
committerGitHub <noreply@github.com>2018-08-30 13:38:09 -0700
commit6c6949acae06dc9a31db2e375f13eb7f357651b6 (patch)
treebc1a231577f39a88cc1107a687c7066cf5a055e3
parentc3bd3fb4ac49705819666055ff1206a9fa3d1b9e (diff)
ZTS: Fix zfs_create_013_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: George Melikov <mail@gmelikov.ru> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7847
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh
index b24d39fd4..993c6436a 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh
@@ -48,8 +48,7 @@ function cleanup
{
typeset -i j=0
while [[ $j -lt ${#size[*]} ]]; do
- datasetexists $TESTPOOL/${LONGFSNAME}${size[j]} && \
- log_must zfs destroy $TESTPOOL/${LONGFSNAME}${size[j]}
+ destroy_dataset $TESTPOOL/${LONGFSNAME}${size[j]}
((j = j + 1))
done
}