summaryrefslogtreecommitdiffstats
path: root/python/qemu
diff options
context:
space:
mode:
authorAlex Bennée2020-11-17 18:36:31 +0100
committerAlex Bennée2020-11-23 10:51:43 +0100
commit8c175c63eefe4efb8614718a9cbc72d03ce4d4a2 (patch)
treeb63fb4f37b080b7e69c92b72952110288d4b2350 /python/qemu
parentscripts/ci: clean up default args logic a little (diff)
downloadqemu-8c175c63eefe4efb8614718a9cbc72d03ce4d4a2.tar.gz
qemu-8c175c63eefe4efb8614718a9cbc72d03ce4d4a2.tar.xz
qemu-8c175c63eefe4efb8614718a9cbc72d03ce4d4a2.zip
tests: add prefixes to the bare mkdtemp calls
The first step to debug a thing is to know what created the thing in the first place. Add some prefixes so random tmpdir's have something grep in the code. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20201117173635.29101-3-alex.bennee@linaro.org>
Diffstat (limited to 'python/qemu')
-rw-r--r--python/qemu/machine.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 6420f01bed..64d966aeeb 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -303,7 +303,8 @@ class QEMUMachine:
return args
def _pre_launch(self) -> None:
- self._temp_dir = tempfile.mkdtemp(dir=self._test_dir)
+ self._temp_dir = tempfile.mkdtemp(prefix="qemu-machine-",
+ dir=self._test_dir)
self._qemu_log_path = os.path.join(self._temp_dir, self._name + ".log")
self._qemu_log_file = open(self._qemu_log_path, 'wb')