From b03e4ffffb1e4a34cb0985f5f5c4a2cfb272e697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 13 May 2020 18:51:25 +0100 Subject: [PATCH] tests/guest-debug: catch hanging guests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If gdb never actually connected with the guest we need to catch that and clean-up after ourselves. Signed-off-by: Alex Bennée Message-Id: <20200513175134.19619-2-alex.bennee@linaro.org> --- tests/guest-debug/run-test.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)