ZTS: zpool_iostat_002_pos remove sleep

In the CI environment commands may occasionally take longer than
expected.  For zpool_iostat_002_pos this can cause a failure if fewer
than the expected numbers of lines are logged in time.  To prevent
this issue relax the time constraint and simply verify the command
ran to completion and generate the correct number of lines.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #18501
This commit is contained in:
Brian Behlendorf
2026-05-07 09:54:45 -07:00
committed by GitHub
parent d65015938e
commit 500b44eef2
@@ -38,9 +38,8 @@
#
# STRATEGY:
# 1. Set the interval to 1 and count to 4.
# 2. Sleep for 5 seconds.
# 3. Verify that the output has 4 records.
# 4. Set interval to 0.5 and count to 1 to test floating point intervals.
# 2. Verify that the output has 4 records.
# 3. Set interval to 0.5 and count to 1 to test floating point intervals.
verify_runnable "both"
@@ -61,8 +60,7 @@ if ! is_global_zone ; then
TESTPOOL=${TESTPOOL%%/*}
fi
log_must eval "zpool iostat $TESTPOOL 1 4 > $tmpfile 2>&1 &"
log_must sleep 5
log_must eval "zpool iostat $TESTPOOL 1 4 > $tmpfile 2>&1"
stat_count=$(grep -c $TESTPOOL $tmpfile)
if [[ $stat_count -ne 4 ]]; then