From c946d5a91329b075fb9bda1ac703a2e85139cf1c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Sat, 23 May 2020 17:13:42 -0700 Subject: [PATCH] ZTS: Fix zfs_mount.kshlib cleanup Update cleanup_filesystem to use destroy_dataset when performing cleanup. This ensures the destroy is retried if the pool is busy preventing occasional failures. Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Signed-off-by: Brian Behlendorf Closes #10358 --- .../tests/functional/cli_root/zfs_mount/zfs_mount.kshlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount.kshlib b/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount.kshlib index 2afb9a547b50..bd45fabbcde9 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount.kshlib +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount.kshlib @@ -110,7 +110,7 @@ function cleanup_filesystem #pool #fs if datasetexists "$pool/$fs" ; then mtpt=$(get_prop mountpoint "$pool/$fs") - log_must zfs destroy -r $pool/$fs + destroy_dataset "$pool/$fs" "-r" [[ -d $mtpt ]] && \ log_must rm -rf $mtpt