diff options
author | Brian Behlendorf <[email protected]> | 2019-10-03 09:39:13 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-03 09:39:13 -0700 |
commit | e1c216fb0c33209471b51f80ba3a1ce8910913c7 (patch) | |
tree | 5b820a86d6e1739af3807482d4d2bb1d5933a6c0 /tests | |
parent | 8ae8b2a1445bcccee1bb8ee7d4886f30050f6f53 (diff) |
ZTS: Fix upgrade_readonly_pool
Update cleanup_upgrade to use destroy_dataset and destroy_pool
when performing cleanup. These wrappers retry if the pool is busy
preventing occasional failures like those observed when running
tests upgrade_readonly_pool. For example:
SUCCESS: test enabled == enabled
User accounting upgrade is not executed on readonly pool
NOTE: Performing local cleanup via log_onexit (cleanup_upgrade)
cannot destroy 'testpool': pool is busy
ERROR: zpool destroy testpool exited 1
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #9400
Diffstat (limited to 'tests')
-rw-r--r-- | tests/zfs-tests/tests/functional/upgrade/upgrade_common.kshlib | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/zfs-tests/tests/functional/upgrade/upgrade_common.kshlib b/tests/zfs-tests/tests/functional/upgrade/upgrade_common.kshlib index 679ff3049..6ffd85b5b 100644 --- a/tests/zfs-tests/tests/functional/upgrade/upgrade_common.kshlib +++ b/tests/zfs-tests/tests/functional/upgrade/upgrade_common.kshlib @@ -34,8 +34,8 @@ export TMPDEV=$TEST_BASE_DIR/zpool_upgrade_test.dat function cleanup_upgrade { - datasetexists $TESTPOOL/fs1 && log_must zfs destroy $TESTPOOL/fs1 - datasetexists $TESTPOOL/fs2 && log_must zfs destroy $TESTPOOL/fs2 - datasetexists $TESTPOOL/fs3 && log_must zfs destroy $TESTPOOL/fs3 - datasetexists $TESTPOOL && log_must zpool destroy $TESTPOOL + destroy_dataset "$TESTPOOL/fs1" + destroy_dataset "$TESTPOOL/fs2" + destroy_dataset "$TESTPOOL/fs3" + destroy_pool "$TESTPOOL" } |