qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test
@ 2025-03-19 10:56 Thomas Huth
  2025-03-19 11:55 ` Matheus Tavares Bernardino
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2025-03-19 10:56 UTC (permalink / raw)
  To: qemu-devel
  Cc: Matheus Tavares Bernardino, Peter Xu, Fabiano Rosas,
	Daniel P . Berrangé

From: Thomas Huth <thuth@redhat.com>

"nc" can either bei 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>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/test_migration.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/functional/test_migration.py b/tests/functional/test_migration.py
index 44804113cfe..181223a69e3 100755
--- a/tests/functional/test_migration.py
+++ b/tests/functional/test_migration.py
@@ -87,13 +87,12 @@ def test_migration_with_unix(self):
             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__':
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-19 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 10:56 [PATCH] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test Thomas Huth
2025-03-19 11:55 ` Matheus Tavares Bernardino
2025-03-19 12:03 ` Philippe Mathieu-Daudé
2025-03-19 12:05 ` Fabiano Rosas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).