tests/functional/migration: Use socket_dir
Use QemuBaseTest.socket_dir instead of calling tempfile directly so all tests have consistent directory prefixes. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Message-ID: <20260303173320.10942-2-farosas@suse.de> Signed-off-by: Thomas Huth <thuth@redhat.com>
Fabiano Rosas committed
Mar 3, 2026 at 14:33 UTC
47d8d1e9c4279657772448214508fdbdd8faa7fa
1 file changed
+2
-4
tests/functional/migration.py
+2
-4
@@ -11,7 +11,6 @@
11
# This work is licensed under the terms of the GNU GPL, version 2 or
12
# later. See the COPYING file in the top-level directory.
13
14
-import tempfile
14
import time
15
16
from qemu_test import QemuSystemTest, which
@@ -65,9 +64,8 @@ class MigrationTest(QemuSystemTest):
64
self.do_migrate(dest_uri)
65
66
def migration_with_unix(self):
68
- with tempfile.TemporaryDirectory(prefix='socket_') as socket_path:
69
- dest_uri = 'unix:%s/qemu-test.sock' % socket_path
70
- self.do_migrate(dest_uri)
67
+ dest_uri = 'unix:%s/migration.sock' % self.socket_dir().name
68
+ self.do_migrate(dest_uri)
69
70
def migration_with_exec(self):
71
if not which('ncat'):