[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/23] tests/avocado/migration: Get find_free_port() from the port
From: |
Thomas Huth |
Subject: |
[PULL 23/23] tests/avocado/migration: Get find_free_port() from the ports |
Date: |
Tue, 30 Aug 2022 20:40:12 +0200 |
In upstream Avocado, the find_free_port() function is not available
from "network" anymore, but must be used via "ports", see:
https://github.com/avocado-framework/avocado/commit/22fc98c6ff76cc55c48
To be able to update to a newer Avocado version later, let's use
the new way for accessing the find_free_port() function here.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220829121939.209329-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/avocado/migration.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/avocado/migration.py b/tests/avocado/migration.py
index 584d6ef53f..4b25680c50 100644
--- a/tests/avocado/migration.py
+++ b/tests/avocado/migration.py
@@ -14,7 +14,7 @@
from avocado_qemu import QemuSystemTest
from avocado import skipUnless
-from avocado.utils import network
+from avocado.utils.network import ports
from avocado.utils import wait
from avocado.utils.path import find_command
@@ -57,7 +57,7 @@ def do_migrate(self, dest_uri, src_uri=None):
self.assert_migration(source_vm, dest_vm)
def _get_free_port(self):
- port = network.find_free_port()
+ port = ports.find_free_port()
if port is None:
self.cancel('Failed to find a free port')
return port
--
2.31.1
- [PULL 19/23] tests/avocado: Fix trivial typo, (continued)
- [PULL 19/23] tests/avocado: Fix trivial typo, Thomas Huth, 2022/08/30
- [PULL 01/23] tests/qtest: Use g_setenv(), Thomas Huth, 2022/08/30
- [PULL 18/23] tests/avocado: Do not run tests that require libslirp if it is not available, Thomas Huth, 2022/08/30
- [PULL 21/23] gitlab-ci: Only use one process in Windows jobs for compilation, Thomas Huth, 2022/08/30
- [PULL 22/23] tests/qtest/ac97-test: Correct reference to driver, Thomas Huth, 2022/08/30
- [PULL 12/23] tests/qtest: libqos: Rename malloc.h to libqos-malloc.h, Thomas Huth, 2022/08/30
- [PULL 14/23] tests/qtest: machine-none-test: Use double quotes to pass the cpu option, Thomas Huth, 2022/08/30
- [PULL 13/23] tests/qtest: device-plug-test: Reverse the usage of double/single quotes, Thomas Huth, 2022/08/30
- [PULL 15/23] tests/qtest: npcm7xx_emc-test: Skip running test_{tx, rx} on win32, Thomas Huth, 2022/08/30
- [PULL 16/23] tests/qtest: prom-env-test: Use double quotes to pass the prom-env option, Thomas Huth, 2022/08/30
- [PULL 23/23] tests/avocado/migration: Get find_free_port() from the ports,
Thomas Huth <=
- [PULL 20/23] docs/devel/testing: fix minor typo, Thomas Huth, 2022/08/30
- Re: [PULL 00/23] First testing patches for QEMU 7.2, Stefan Hajnoczi, 2022/08/31