Skip to content

Commit 2c47bd5

Browse files
authored
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
1 parent edb24be commit 2c47bd5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/zfs-tests/tests/functional/procfs/pool_state.ksh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ check_all $TESTPOOL "ONLINE"
105105

106106
# Fault one of the disks, and check that pool is degraded
107107
DISK1=$(echo "$DISKS" | awk '{print $2}')
108-
zpool offline -tf $TESTPOOL $DISK1
108+
log_must zpool offline -tf $TESTPOOL $DISK1
109109
check_all $TESTPOOL "DEGRADED"
110+
log_must zpool online $TESTPOOL $DISK1
111+
log_must zpool clear $TESTPOOL
110112

111113
# Create a new pool out of a scsi_debug disk
112114
TESTPOOL2=testpool2

tests/zfs-tests/tests/functional/procfs/setup.ksh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@
2727
. $STF_SUITE/include/libtest.shlib
2828

2929
default_mirror_setup $DISKS
30-
log_pass

0 commit comments

Comments
 (0)