From: Maxim Cournoyer <maxim@guixotic.coop>
To: qemu-devel@nongnu.org
Cc: Michael Tokarev <mjt@tls.msk.ru>, Maxim Cournoyer <maxim@guixotic.coop>
Subject: [PATCH] tests: honor $TMPDIR for test_virtio_version
Date: Sun, 31 Aug 2025 21:52:55 +0900 [thread overview]
Message-ID: <20250831125255.7066-1-maxim@guixotic.coop> (raw)
Until 10.1.0, the test suite could be run without having a writable
/var/tmp in the build environment. To avoid now requiring /var/tmp in
the build environment (which can be a very minimal container like in
the case of GNU Guix), consult TMPDIR first, using /var/tmp as a
fallback.
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
---
tests/functional/x86_64/test_virtio_version.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/functional/x86_64/test_virtio_version.py b/tests/functional/x86_64/test_virtio_version.py
index a5ea73237f..501545f655 100755
--- a/tests/functional/x86_64/test_virtio_version.py
+++ b/tests/functional/x86_64/test_virtio_version.py
@@ -10,6 +10,8 @@
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
+import os
+
from qemu.machine import QEMUMachine
from qemu_test import QemuSystemTest
@@ -68,7 +70,9 @@ def run_device(self, devtype, opts=None, machine='pc'):
"""
Run QEMU with `-device DEVTYPE`, return device info from `query-pci`
"""
- with QEMUMachine(self.qemu_bin) as vm:
+ with QEMUMachine(
+ self.qemu_bin,
+ base_temp_dir=os.environ.get('TMPDIR', '/var/tmp')) as vm:
vm.set_machine(machine)
if opts:
devtype += ',' + opts
base-commit: e101d33792530093fa0b0a6e5f43e4d8cfe4581e
--
2.51.0
next reply other threads:[~2025-08-31 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 12:52 Maxim Cournoyer [this message]
2025-09-01 6:41 ` [PATCH] tests: honor $TMPDIR for test_virtio_version Michael Tokarev
2025-09-01 7:36 ` Maxim Cournoyer
2025-09-02 10:36 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250831125255.7066-1-maxim@guixotic.coop \
--to=maxim@guixotic.coop \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).