Commit 4cf1f0e37d for qemu.org

commit 4cf1f0e37d9491eb8b0c8be8dd9dab9260b8fa36
Author: Emmanuel Blot <emmanuel.blot@free.fr>
Date:   Fri Jul 31 12:45:16 2026 +0200

    tests/functional: give the set_machine probe VM the test workdir

    set_machine() launches a throwaway QEMUMachine to query the available
    machine types, but constructs it without base_temp_dir, so it falls back
    to the hardcoded "/var/tmp" default instead of the writable per-test
    workdir that the actual test VM already uses. Pass base_temp_dir=
    self.workdir for consistency; this also fixes VM launch on hosts where
    /var/tmp is not writable.

    Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr>
    Reviewed-by: Cédric Le Goater <clg@redhat.com>
    Link: https://lore.kernel.org/qemu-devel/20260731-sanmiguel-bmc-locator-v2-17-1266926ba769@free.fr
    Signed-off-by: Cédric Le Goater <clg@redhat.com>

diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index bf2dc1dc10..d4aee35951 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -317,7 +317,7 @@ def set_machine(self, machinename):
         cls = type(self)

         if not hasattr(cls, "_machines"):
-            tmp_vm = QEMUMachine(self.qemu_bin)
+            tmp_vm = QEMUMachine(self.qemu_bin, base_temp_dir=self.workdir)
             tmp_vm.set_machine('none')

             try: