From: Alex Bennée Date: Wed, 13 May 2020 17:51:25 +0000 (+0100) Subject: tests/guest-debug: catch hanging guests X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b03e4ffffb1e4a34cb0985f5f5c4a2cfb272e697;p=qemu.git 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 Message-Id: <20200513175134.19619-2-alex.bennee@linaro.org> --- 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)