aboutsummaryrefslogtreecommitdiff
path: root/tests/guest-debug
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2020-05-13 18:51:25 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-05-15 15:25:07 +0100
commitb03e4ffffb1e4a34cb0985f5f5c4a2cfb272e697 (patch)
tree640dbb67ac1b45398219942b9caf4fc988a2a5f0 /tests/guest-debug
parent2478b8ecd45f81a21b9aa319ce7147a790a2144f (diff)
tests/guest-debug: catch hanging guests
If gdb never actually connected with the guest we need to catch that and clean-up after ourselves. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200513175134.19619-2-alex.bennee@linaro.org>
Diffstat (limited to 'tests/guest-debug')
-rwxr-xr-xtests/guest-debug/run-test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py
index d9af9573b9..71c5569054 100755
--- a/tests/guest-debug/run-test.py
+++ b/tests/guest-debug/run-test.py
@@ -80,4 +80,10 @@ if __name__ == '__main__':
print("GDB crashed? SKIPPING")
exit(0)
+ try:
+ inferior.wait(2)
+ except subprocess.TimeoutExpired:
+ print("GDB never connected? Killed guest")
+ inferior.kill()
+
exit(result)