From 6c6949acae06dc9a31db2e375f13eb7f357651b6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 30 Aug 2018 13:38:09 -0700 Subject: [PATCH] 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 Signed-off-by: Brian Behlendorf Closes #7847 --- .../functional/cli_root/zfs_create/zfs_create_013_pos.ksh | 3 +-- 1 file changed, 1 insertion(+), 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 b24d39fd40..993c6436a7 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 }