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>
This commit is contained in:
Alex Bennée 2020-05-13 18:51:25 +01:00
parent 2478b8ecd4
commit b03e4ffffb

View File

@ -80,4 +80,10 @@ if __name__ == '__main__':
print("GDB crashed? SKIPPING") print("GDB crashed? SKIPPING")
exit(0) exit(0)
try:
inferior.wait(2)
except subprocess.TimeoutExpired:
print("GDB never connected? Killed guest")
inferior.kill()
exit(result) exit(result)