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 <[email protected]>
  • Loading branch information
tonyhutter committed Jul 19, 2024
1 parent aea42e1 commit e73ecbd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 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,18 @@ 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
# If 'timeout' returns a 124 return code, then it timed out.
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 e73ecbd

Please sign in to comment.