From ce391b500bfa802f89954ad95ef821e57b3b92c2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 14 Apr 2023 15:40:02 +1000 Subject: [PATCH] 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 21a3d4f7623a3a2451554b900bd813de7cf7eddb) --- tests/unit-test-driver.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit-test-driver.sh.in b/tests/unit-test-driver.sh.in index 68a0dcdfd6..9a60db1337 100644 --- a/tests/unit-test-driver.sh.in +++ b/tests/unit-test-driver.sh.in @@ -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}")