aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-03-19 11:45:45 +0100
committerThomas Huth <thuth@redhat.com>2025-03-19 13:28:34 +0100
commitf700abbbeb6ab68a3446d1fb168a934d6f284eb5 (patch)
tree25a52a8ae5706da59dfb0f43adbfa69cb8ee2e82
parent1ddd4d3f6ed39ffd1e0cc03ada36b0766d5be9fb (diff)
downloadqemu-f700abbbeb6ab68a3446d1fb168a934d6f284eb5.zip
qemu-f700abbbeb6ab68a3446d1fb168a934d6f284eb5.tar.gz
qemu-f700abbbeb6ab68a3446d1fb168a934d6f284eb5.tar.bz2
tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test
"nc" can either be GNU netcat, OpenBSD netcat or NMap ncat. At least GNU netcat currently does not work with this test anymore, though the comment in the test says otherwise. GNU netcat seems to be quite unmaintained nowadays, according to its website (https://netcat.sourceforge.net/), the last public release is from 2004, so we should rather avoid that binary. In our CI, we are only using "ncat" in the containers (it's the only flavor that lcitool supports), thus to avoid silent regressions with the other netcats, let's limit this test to "ncat" only now. Reported-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Message-ID: <20250319105617.133191-1-thuth@redhat.com> Reviewed-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rwxr-xr-xtests/functional/test_migration.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/functional/test_migration.py b/tests/functional/test_migration.py
index 4480411..181223a 100755
--- a/tests/functional/test_migration.py
+++ b/tests/functional/test_migration.py
@@ -87,13 +87,12 @@ class MigrationTest(QemuSystemTest):
dest_uri = 'unix:%s/qemu-test.sock' % socket_path
self.do_migrate(dest_uri)
- @skipIfMissingCommands('nc')
+ @skipIfMissingCommands('ncat')
def test_migration_with_exec(self):
- """The test works for both netcat-traditional and netcat-openbsd packages."""
with Ports() as ports:
free_port = self._get_free_port(ports)
- dest_uri = 'exec:nc -l localhost %u' % free_port
- src_uri = 'exec:nc localhost %u' % free_port
+ dest_uri = 'exec:ncat -l localhost %u' % free_port
+ src_uri = 'exec:ncat localhost %u' % free_port
self.do_migrate(dest_uri, src_uri)
if __name__ == '__main__':