summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-08-10 16:36:38 +0100
committerRichard Henderson <richard.henderson@linaro.org>2023-08-10 11:04:34 -0700
commitdad1036f43b55c68eb76e73ef771b252ec764b14 (patch)
tree899b4e8da28779a12f7a9dec5eeed78ac3b42d3a
parent6a2c23ddeb5bc8883c227ce1a3ff22e9978291af (diff)
downloadfocaccia-qemu-dad1036f43b55c68eb76e73ef771b252ec764b14.tar.gz
focaccia-qemu-dad1036f43b55c68eb76e73ef771b252ec764b14.zip
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>
-rwxr-xr-xtests/guest-debug/run-test.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py
index de6106a5e5..a032e01f79 100755
--- a/tests/guest-debug/run-test.py
+++ b/tests/guest-debug/run-test.py
@@ -69,13 +69,10 @@ if __name__ == '__main__':
 
     # 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))