Message ID | 20241211172648.2893097-15-berrange@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | tests/functional: various improvements wrt assets/scratch files | expand |
On 11/12/2024 18.26, Daniel P. Berrangé wrote: > This removes direct creation of temporary dirs > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > --- > tests/functional/test_arm_aspeed.py | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_arm_aspeed.py > index 9561129c51..5bd31e43ee 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 > from qemu_test import exec_command_and_wait_for_pattern > @@ -226,7 +225,7 @@ 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_dir = self.socket_dir() > socket = os.path.join(socket_dir.name, 'swtpm-socket') Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/tests/functional/test_arm_aspeed.py b/tests/functional/test_arm_aspeed.py index 9561129c51..5bd31e43ee 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 from qemu_test import exec_command_and_wait_for_pattern @@ -226,7 +225,7 @@ 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_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,
This removes direct creation of temporary dirs Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- tests/functional/test_arm_aspeed.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)