]> granicus.if.org Git - zfs/commitdiff
ZTS: clone_001_pos fails in cleanup on busy dataset
authorJohn Wren Kennedy <jwk404@gmail.com>
Fri, 15 Feb 2019 20:45:46 +0000 (13:45 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 15 Feb 2019 20:45:46 +0000 (12:45 -0800)
The "cleanup_all" function in this test calls "zfs destroy" which
fails approximately 30% of the time in our environment due to the
dataset being busy. Since the failure happens during cleanup, the
error is propagated to subsequent tests.

Tested by running the snapshot test group in a loop without seeing
any failures.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: John Kennedy <john.kennedy@delphix.com>
Closes #8409

tests/zfs-tests/tests/functional/snapshot/clone_001_pos.ksh

index 4ba853162cb563620a4e0affef437d10258832ab..52689719320a870197e49668bcb2741b173fe945 100755 (executable)
@@ -75,7 +75,7 @@ function cleanup_all
        i=0
        while (( i < ${#args[*]} )); do
                snapexists ${args[i]} && \
-                       log_must zfs destroy -Rf ${args[i]}
+                       destroy_dataset "${args[i]}" "-Rf"
 
                [[ -d ${args[i+3]} ]] && \
                        log_must rm -rf ${args[i+3]}