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 <[email protected]> --- tests/functional/qemu_test/testcase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index e4179d165c..ed861709e1 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: -- 2.50.1
