Skip to content

Commit

Permalink
ZTS: Fix zpool_status_008_pos false positive
Browse files Browse the repository at this point in the history
When checking that healthy vdevs[1-3] aren't shown omit the -s flag
so slow vdevs are not considered as described by the comment.  This
avoids the possibility of a false positive in the CI when ZIO_SLOW_IO_MS
is reduce to 160ms.  Additionally, clear the fault injection as soon
as it is no longer required for the test case.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Nov 15, 2024
1 parent de2e9a5 commit 8ecf4d9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ for raid_type in "draid2:3d:6c:1s" "raidz2"; do
log_must mkfile 1048576 /$TESTPOOL2/testfile
sync_pool $TESTPOOL2
log_must set_tunable64 ZIO_SLOW_IO_MS $OLD_SLOW_IO
log_must zinject -c all

# Check vdev6 slow IOs are only shown when requested with -s.
log_mustnot eval "zpool status -e $TESTPOOL2 | grep $TESTDIR/vdev6 | grep ONLINE"
Expand All @@ -91,14 +92,13 @@ for raid_type in "draid2:3d:6c:1s" "raidz2"; do
log_must check_vdev_state $TESTPOOL2 $TESTDIR/vdev1 "ONLINE"
log_must check_vdev_state $TESTPOOL2 $TESTDIR/vdev2 "ONLINE"
log_must check_vdev_state $TESTPOOL2 $TESTDIR/vdev3 "ONLINE"
log_mustnot eval "zpool status -es $TESTPOOL2 | grep $TESTDIR/vdev1 | grep ONLINE"
log_mustnot eval "zpool status -es $TESTPOOL2 | grep $TESTDIR/vdev2 | grep ONLINE"
log_mustnot eval "zpool status -es $TESTPOOL2 | grep $TESTDIR/vdev3 | grep ONLINE"
log_mustnot eval "zpool status -e $TESTPOOL2 | grep $TESTDIR/vdev1 | grep ONLINE"
log_mustnot eval "zpool status -e $TESTPOOL2 | grep $TESTDIR/vdev2 | grep ONLINE"
log_mustnot eval "zpool status -e $TESTPOOL2 | grep $TESTDIR/vdev3 | grep ONLINE"

log_must zinject -c all
log_must zpool status -es $TESTPOOL2

zpool destroy $TESTPOOL2
log_must zpool destroy $TESTPOOL2
done

log_pass "Verify zpool status -e shows only unhealthy vdevs"

0 comments on commit 8ecf4d9

Please sign in to comment.