ZTS: Add timeout to cp_stress

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>
This commit is contained in:
Tony Hutter 2024-06-24 11:12:58 -07:00
parent aea42e1379
commit e73ecbd5d6
1 changed files with 12 additions and 2 deletions

View File

@ -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"