On Wed, Jan 14, 2026 at 4:52 AM Thomas Huth <[email protected]> wrote: > > On 14/01/2026 10.29, Paolo Bonzini wrote: > > On 1/14/26 10:23, Thomas Huth wrote: > >> From: Thomas Huth <[email protected]> > >> > >> The tracetool tests currently fail if the host installation does not > >> have a "python3" binary (and you compiled QEMU by selecting a different > >> one during the "configure" step). This happens because tracetool-test.py > >> executes scripts/tracetool.py directly, so that this script is run via > >> its shebang line. > >> To fix the issue, pass the right Python interpreter to tracetool-test.py > >> via the PYTHON environment variable and use that to run the tracetool.py > >> script. > >> > >> - args = [tracetool, f"--format={fmt}", f"--backends={backend}", "-- > >> group=testsuite"] > >> + python = os.environ.get("PYTHON", "python3") > >> + args = [python, tracetool, f"--format={fmt}", f"--backends={backend}", > >> + "--group=testsuite"] > >> if fmt.find("stap") != -1: > >> args += ["--binary=qemu", "--probe-prefix=qemu"] > > > > What about just > > > > diff --git a/tests/tracetool/tracetool-test.py b/tests/tracetool/tracetool- > > test.py > > index 30006a99190..efc518a6b1e 100755 > > --- a/tests/tracetool/tracetool-test.py > > +++ b/tests/tracetool/tracetool-test.py > > @@ -36,7 +36,7 @@ def test_tracetool_one(tracetool, backend, fmt, src_dir, > > build_dir): > > actual_file = Path(build_dir, rel_filename) > > expect_file = Path(src_dir, rel_filename) > > > > - args = [tracetool, f"--format={fmt}", f"--backends={backend}", "-- > > group=testsuite"] > > + args = [sys.executable, tracetool, f"--format={fmt}", f"-- > > backends={backend}", "--group=testsuite"] > > > > if fmt.find("stap") != -1: > > args += ["--binary=qemu", "--probe-prefix=qemu"] > > > > (only the second half of the commit message needs changing). > > > > Even if you keep using PYTHON, which makes sense, I would change the > > default to sys.executable. > > Fine for me, too! ... Stefan, do you have any preferences?
I like the minimal patch with just sys.executable and no PYTHON environment variable. Thanks, Stefan
