Skip to content

Commit

Permalink
tests/guest-debug: catch hanging guests
Browse files Browse the repository at this point in the history
If gdb never actually connected with the guest we need to catch that
and clean-up after ourselves.

Signed-off-by: Alex Bennée <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
stsquad committed May 15, 2020
1 parent 2478b8e commit b03e4ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/guest-debug/run-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,10 @@ def get_args():
print("GDB crashed? SKIPPING")
exit(0)

try:
inferior.wait(2)
except subprocess.TimeoutExpired:
print("GDB never connected? Killed guest")
inferior.kill()

exit(result)

0 comments on commit b03e4ff

Please sign in to comment.