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
1 changed files with 6 additions and 0 deletions

View File

@ -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)