strace/tests/run.sh
Dmitry V. Levin 741dadd12d tests: enhance timeout diagnostics
* tests/init.sh: Trap SIGXCPU.
* tests/run.sh: Send SIGXCPU instead of SIGKILL in case of timeout, send
SIGKILL if the command is still running 5 seconds after SIGXCPU.
2017-07-19 02:38:37 +00:00

13 lines
223 B
Bash
Executable File

#!/bin/sh
. "${srcdir=.}/init.sh"
$STRACE -V > /dev/null ||
framework_failure_ "$STRACE is not available"
TIMEOUT="timeout -k 5 -s XCPU $TIMEOUT_DURATION"
$TIMEOUT true > /dev/null 2>&1 ||
TIMEOUT=
exec $TIMEOUT "$@"