[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/22] tests/functional: switch over to using self.socket_dir(...
From: |
Daniel P . Berrangé |
Subject: |
[PATCH 13/22] tests/functional: switch over to using self.socket_dir(...) |
Date: |
Fri, 29 Nov 2024 17:31:11 +0000 |
This removes direct creation of temporary dirs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/functional/test_arm_aspeed.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/functional/test_arm_aspeed.py
b/tests/functional/test_arm_aspeed.py
index c4869011db..ca223ac8f0 100755
--- a/tests/functional/test_arm_aspeed.py
+++ b/tests/functional/test_arm_aspeed.py
@@ -9,7 +9,6 @@
import os
import time
import subprocess
-import tempfile
from qemu_test import (LinuxKernelTest, Asset,
exec_command_and_wait_for_pattern,
@@ -228,8 +227,8 @@ def test_arm_ast2600_evb_buildroot_tpm(self):
tpmstate_dir = self.scratch_file('swtpmstate')
os.mkdir(tpmstate_dir)
- socket_dir = tempfile.TemporaryDirectory(prefix="qemu_")
- socket = os.path.join(tpmstate_dir.name, 'swtpm-socket')
+ socket_dir = self.socket_dir()
+ socket = os.path.join(socket_dir.name, 'swtpm-socket')
# We must put the TPM state dir in /tmp/, not the build dir,
# because some distros use AppArmor to lock down swtpm and
--
2.46.0
- [PATCH 04/22] tests/functional: remove pointless with statement, (continued)
- [PATCH 04/22] tests/functional: remove pointless with statement, Daniel P . Berrangé, 2024/11/29
- [PATCH 05/22] tests/functional: remove duplicated 'which' function impl, Daniel P . Berrangé, 2024/11/29
- [PATCH 06/22] tests/functional: introduce some helpful decorators, Daniel P . Berrangé, 2024/11/29
- [PATCH 07/22] tests/functional: switch to new test skip decorators, Daniel P . Berrangé, 2024/11/29
- [PATCH 08/22] tests/functional: add helpers for building file paths, Daniel P . Berrangé, 2024/11/29
- [PATCH 10/22] tests/functional: switch over to using self.build_file(...), Daniel P . Berrangé, 2024/11/29
- [PATCH 09/22] tests/functional: switch over to using self.log_file(...), Daniel P . Berrangé, 2024/11/29
- [PATCH 11/22] tests/functional: switch over to using self.data_file(...), Daniel P . Berrangé, 2024/11/29
- [PATCH 13/22] tests/functional: switch over to using self.socket_dir(...),
Daniel P . Berrangé <=
- [PATCH 12/22] tests/functional: switch over to using self.scratch_file(), Daniel P . Berrangé, 2024/11/29
- [PATCH 15/22] tests/functional: add common zip_extract helper, Daniel P . Berrangé, 2024/11/29
- [PATCH 16/22] tests/functional: add common deb_extract helper, Daniel P . Berrangé, 2024/11/29
- [PATCH 14/22] tests/functional: remove redundant 'rmtree' call, Daniel P . Berrangé, 2024/11/29
- [PATCH 20/22] tests/functional: generalize uncompress, Daniel P . Berrangé, 2024/11/29
- [PATCH 18/22] tests/functional: add 'archive_extract' to QemuBaseTest, Daniel P . Berrangé, 2024/11/29
- [PATCH 22/22] tests/functional: convert tests to new uncompress helper, Daniel P . Berrangé, 2024/11/29
- [PATCH 21/22] tests/functional: add 'uncompress' to QemuBaseTest, Daniel P . Berrangé, 2024/11/29
- [PATCH 19/22] tests/functional: convert tests to new archive_extract helper, Daniel P . Berrangé, 2024/11/29