From ac00c65be00a10c9a1a87fac2bcfa8bde2611133 Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Thu, 30 Jul 2026 11:42:31 +0100 Subject: [PATCH] fix: QEMU: return correct PID for process under test --- score/itf/plugins/qemu/qemu_target.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/score/itf/plugins/qemu/qemu_target.py b/score/itf/plugins/qemu/qemu_target.py index a2023233..cf801d8d 100644 --- a/score/itf/plugins/qemu/qemu_target.py +++ b/score/itf/plugins/qemu/qemu_target.py @@ -173,9 +173,7 @@ def execute_async(self, binary_path, args=None, cwd="/", **kwargs) -> QemuAsyncP transport = ssh_ctx.get_paramiko_client().get_transport() channel = transport.open_session() channel.set_combine_stderr(True) - inner = ( - f"[ -r /etc/profile ] && . /etc/profile >/dev/null 2>&1; echo $$; cd {shlex.quote(cwd)} && {command}" - ) + inner = f"[ -r /etc/profile ] && . /etc/profile >/dev/null 2>&1; echo $$; cd {shlex.quote(cwd)} && exec {command}" channel.exec_command(f"sh -lc {shlex.quote(inner)}") # Read the PID from the first line of output.