Skip to content

Commit

Permalink
ZTS: Add timeout to cp_stress
Browse files Browse the repository at this point in the history
cp_stress is getting killed on the new QEMU-based github runners we're
developing.  The problem is that the QEMU-based testers are so
underpowered that the test is taking longer than the 10min maximum
that ZTS enforces.  Instead, enforce an inter-test-cp_stress timeout
so the entire test doesn't get killed.

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
tonyhutter committed Jun 24, 2024
1 parent c98295e commit 1cae5e0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/zfs-tests/tests/functional/cp_files/cp_stress.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,17 @@ else
fi

for i in $(seq 1 $RUNS) ; do
# Each run takes around 12 seconds.
log_must $STF_SUITE/tests/functional/cp_files/seekflood 2000 $CPUS
# We have a maximum of 10min per ZTS test, so each seekflood run must
# be a fraction of that. We need to add this timeout in so underpowered
# test runners don't get killed by ZTS and counted as a failure.
TO=$((600 / $RUNS))
timeout $TO $STF_SUITE/tests/functional/cp_files/seekflood 2000 $CPUS
rc=$?
if [ $rc == 124 ] ; then
log_note "seekflood test timed out. Assume we're just underpowered."
elif [ $rc != 0 ] ; then
log_fail "seekflood test failed with rc=$rc"
fi
done
cd "$MYPWD"

Expand Down

0 comments on commit 1cae5e0

Please sign in to comment.