diff options
author | Brian Behlendorf <[email protected]> | 2019-12-28 08:43:23 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-28 08:43:23 -0800 |
commit | 2c47bd575a4b7b77f91355e49ec691b60ea2f46f (patch) | |
tree | 4abe03dfd64df2a4408a9e9619bdd5b18e948824 /tests/zfs-tests | |
parent | edb24bec3b90fb47d82254ecffc250d346ee77f9 (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
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/procfs/pool_state.ksh | 4 | ||||
-rwxr-xr-x | tests/zfs-tests/tests/functional/procfs/setup.ksh | 1 |
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 fd022ee61..79fa28f4f 100755 --- a/tests/zfs-tests/tests/functional/procfs/setup.ksh +++ b/tests/zfs-tests/tests/functional/procfs/setup.ksh @@ -27,4 +27,3 @@ . $STF_SUITE/include/libtest.shlib default_mirror_setup $DISKS -log_pass |