From 8c175c63eefe4efb8614718a9cbc72d03ce4d4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 17 Nov 2020 17:36:31 +0000 Subject: tests: add prefixes to the bare mkdtemp calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Thomas Huth Message-Id: <20201117173635.29101-3-alex.bennee@linaro.org> --- python/qemu/machine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/qemu') diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 6420f01..64d966a 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') -- cgit v1.1