Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tests/tcg: ensure system-mode gdb tests start stopped
Without -S we run into potential races with tests starting before the
gdbstub attaches. We don't need to worry about user-mode as enabling
the gdbstub implies we wait for the initial connection.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230810153640.1879717-7-alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
stsquad authored and rth7680 committed Aug 10, 2023
1 parent 6a2c23d commit dad1036
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/guest-debug/run-test.py
Expand Up @@ -69,13 +69,10 @@ def log(output, msg):

# Launch QEMU with binary
if "system" in args.qemu:
cmd = "%s %s %s -gdb unix:path=%s,server=on" % (args.qemu,
args.qargs,
args.binary,
socket_name)
cmd = f'{args.qemu} {args.qargs} {args.binary}' \
f' -S -gdb unix:path={socket_name},server=on'
else:
cmd = "%s %s -g %s %s" % (args.qemu, args.qargs, socket_name,
args.binary)
cmd = f'{args.qemu} {args.qargs} -g {socket_name} {args.binary}'

log(output, "QEMU CMD: %s" % (cmd))
inferior = subprocess.Popen(shlex.split(cmd))
Expand Down

0 comments on commit dad1036

Please sign in to comment.