summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2017-01-11 16:36:58 -0800
committerBrian Behlendorf <[email protected]>2017-02-24 11:06:14 -0800
commitcbeeb4afb35ecd77e70f5019ac4f3f0f88fb8df6 (patch)
treef9dec597b298598ff362bb7455bb51526e708c34
parent0efd97912a14bcbc9dceae3de70b9ceaafcb12a9 (diff)
OpenZFS 7761 - bootfs_005_neg's pool destruction must handle EBUSY
Authored by: Prakash Surya <[email protected]> Reviewed by: Yuri Pankov <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7761 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ad309d3 Closes #5818
-rwxr-xr-xtests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh10
-rw-r--r--tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib6
2 files changed, 5 insertions, 11 deletions
diff --git a/tests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh b/tests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh
index f09b32d2b..82932a7dc 100755
--- a/tests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh
+++ b/tests/zfs-tests/tests/functional/bootfs/bootfs_005_neg.ksh
@@ -26,7 +26,7 @@
#
#
-# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+# Copyright (c) 2012, 2017 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
@@ -53,14 +53,10 @@ function cleanup {
typeset pool_name
for config in $CONFIGS; do
pool_name=$(eval $ECHO \$ZPOOL_VERSION_${config}_NAME)
- if poolexists $pool_name; then
- log_must $ZPOOL destroy $pool_name
- fi
+ destroy_pool $pool_name
done
- if poolexists $TESTPOOL ; then
- log_must $ZPOOL destroy $TESTPOOL
- fi
+ destroy_pool $TESTPOOL
}
log_assert "Boot properties cannot be set on pools with older versions"
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib b/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib
index d2d0eafe2..0252cac70 100644
--- a/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib
+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade.kshlib
@@ -25,7 +25,7 @@
#
#
-# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright (c) 2012, 2017 by Delphix. All rights reserved.
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
#
@@ -93,9 +93,7 @@ function destroy_upgraded_pool
typeset -n pool_files=ZPOOL_VERSION_${vers}_FILES
typeset -n pool_name=ZPOOL_VERSION_${vers}_NAME
- if poolexists $pool_name; then
- log_must $ZPOOL destroy $pool_name
- fi
+ destroy_pool $pool_name
for file in $pool_files; do
$RM -f /$TESTPOOL/$file
done