summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-12-28 08:43:23 -0800
committerTony Hutter <[email protected]>2020-01-22 13:49:07 -0800
commit756c58cf71e4e87d68265d5d5445ec3ff88763aa (patch)
tree98dfba524b21124852d42d083360aee37eaca45a
parent70d2e938b5443821fc48d99c08322a15c3a3c17e (diff)
ZTS: Fix pool_state cleanup
The externally faulted vdev should be brought back online and have its errors cleared before the pool is destroyed. Failure to do so will leave a vdev with a valid active label. This vdev may then not be used to create a new pool without the -f flag potentially leading to subsequent test failures. Additionally remove an unreachable log_pass from setup.ksh. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9777
-rwxr-xr-xtests/zfs-tests/tests/functional/procfs/pool_state.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/procfs/setup.ksh1
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/procfs/pool_state.ksh b/tests/zfs-tests/tests/functional/procfs/pool_state.ksh
index 6543f87c4..f4df839be 100755
--- a/tests/zfs-tests/tests/functional/procfs/pool_state.ksh
+++ b/tests/zfs-tests/tests/functional/procfs/pool_state.ksh
@@ -105,8 +105,10 @@ check_all $TESTPOOL "ONLINE"
# Fault one of the disks, and check that pool is degraded
DISK1=$(echo "$DISKS" | awk '{print $2}')
-zpool offline -tf $TESTPOOL $DISK1
+log_must zpool offline -tf $TESTPOOL $DISK1
check_all $TESTPOOL "DEGRADED"
+log_must zpool online $TESTPOOL $DISK1
+log_must zpool clear $TESTPOOL
# Create a new pool out of a scsi_debug disk
TESTPOOL2=testpool2
diff --git a/tests/zfs-tests/tests/functional/procfs/setup.ksh b/tests/zfs-tests/tests/functional/procfs/setup.ksh
index b3812dbdc..3444cfcf2 100755
--- a/tests/zfs-tests/tests/functional/procfs/setup.ksh
+++ b/tests/zfs-tests/tests/functional/procfs/setup.ksh
@@ -31,4 +31,3 @@ if ! is_linux ; then
fi
default_mirror_setup $DISKS
-log_pass