From: Brian Behlendorf Date: Thu, 30 Aug 2018 20:38:09 +0000 (-0700) Subject: ZTS: Fix zfs_create_013_pos X-Git-Tag: zfs-0.8.0-rc1~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c6949acae06dc9a31db2e375f13eb7f357651b6;p=zfs 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 --- 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 }