diff options
| author | Ilya Leoshkevich <iii@linux.ibm.com> | 2025-02-07 15:31:12 +0000 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2025-02-10 13:47:59 +0000 |
| commit | 24c61663dcec0e87bb4206a7623f0e222e188b47 (patch) | |
| tree | ae327e96dda16dc89ee383199b343523f496c365 /tests/guest-debug/run-test.py | |
| parent | 628d64222e6bef249d23ce3147cbfb47259f2ede (diff) | |
| download | focaccia-qemu-24c61663dcec0e87bb4206a7623f0e222e188b47.tar.gz focaccia-qemu-24c61663dcec0e87bb4206a7623f0e222e188b47.zip | |
tests/tcg: Add late gdbstub attach test
Add a small test to prevent regressions. Make sure that host_interrupt_signal is not visible to the guest. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20250117001542.8290-9-iii@linux.ibm.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250207153112.3939799-18-alex.bennee@linaro.org>
Diffstat (limited to 'tests/guest-debug/run-test.py')
| -rwxr-xr-x | tests/guest-debug/run-test.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index 5a091db8be..75e9c92e03 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -36,6 +36,8 @@ def get_args(): parser.add_argument("--gdb-args", help="Additional gdb arguments") parser.add_argument("--output", help="A file to redirect output to") parser.add_argument("--stderr", help="A file to redirect stderr to") + parser.add_argument("--no-suspend", action="store_true", + help="Ask the binary to not wait for GDB connection") return parser.parse_args() @@ -73,10 +75,19 @@ if __name__ == '__main__': # Launch QEMU with binary if "system" in args.qemu: + if args.no_suspend: + suspend = '' + else: + suspend = ' -S' cmd = f'{args.qemu} {args.qargs} {args.binary}' \ - f' -S -gdb unix:path={socket_name},server=on' + f'{suspend} -gdb unix:path={socket_name},server=on' else: - cmd = f'{args.qemu} {args.qargs} -g {socket_name} {args.binary}' + if args.no_suspend: + suspend = ',suspend=n' + else: + suspend = '' + cmd = f'{args.qemu} {args.qargs} -g {socket_name}{suspend}' \ + f' {args.binary}' log(output, "QEMU CMD: %s" % (cmd)) inferior = subprocess.Popen(shlex.split(cmd)) |