Use SIGABRT rather than SIGKILL for long running unit test

SIGABRT will produce a core dump which will allow for forensic
analysis of the unit test

(cherry picked from commit 21a3d4f762)
This commit is contained in:
Mark Andrews 2023-04-14 15:40:02 +10:00 committed by Michał Kępień
parent 54f842a442
commit ce391b500b
No known key found for this signature in database

View file

@ -35,8 +35,8 @@ while [ ${TIMEOUT} -gt 0 ]; do
TIMEOUT=$((TIMEOUT - 1))
done
if [ ${TIMEOUT} -eq 0 ]; then
echo "PID ${TEST_PROGRAM_PID} exceeded run time limit, sending SIGKILL" >&2
kill -KILL "${TEST_PROGRAM_PID}" 2>/dev/null
echo "PID ${TEST_PROGRAM_PID} exceeded run time limit, sending SIGABRT" >&2
kill -ABRT "${TEST_PROGRAM_PID}" 2>/dev/null
fi
TEST_PROGRAM_NAME=$(basename "${TEST_PROGRAM}")