]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use SIGABRT rather than SIGKILL for long running unit test
authorMark Andrews <marka@isc.org>
Fri, 14 Apr 2023 05:40:02 +0000 (15:40 +1000)
committerMark Andrews <marka@isc.org>
Fri, 14 Apr 2023 05:40:02 +0000 (15:40 +1000)
SIGABRT will produce a core dump which will allow for forensic
analysis of the unit test

tests/unit-test-driver.sh.in

index 68a0dcdfd62b64f63cda596bbe3214035408adfd..9a60db1337bec32fc5cd31890672be8311eb4326 100644 (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}")