Skip to content

Commit

Permalink
testsuite: run_timeout.py: print an error on timeout
Browse files Browse the repository at this point in the history
Problem: Sometimes it is difficult to determine that a test run
under t/scripts/run_timeout.py timed out when debugging test failures.
The script kills the process when it times out, but otherwise doesn't
log an error, and therefore this appears as silent failure.

Add a message to run_timeout.py when a process times out so there is
a hint in the test logs.
  • Loading branch information
grondo authored and chu11 committed Dec 13, 2021
1 parent 13169e6 commit fb93782
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/scripts/run_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def do_timeout():
r = p.wait(timeout=args.timeout)
except s.TimeoutExpired:
# send signal to timeout process
print(f"{args.cmd} timed out after {args.timeout}s", file=sys.stderr)
p.send_signal(args.signal)
if args.kill_after > 0:
try:
Expand Down

0 comments on commit fb93782

Please sign in to comment.