tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test
PATCH 1/1 tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test
From: Thomas Huth <[email protected]>
"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.
--- tests/functional/test_migration.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
tests/functional/test_migration.py +3 -4
@@ -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__':
Signature · 1 line
2.48.1
Quoted 4 lines · On Wed, 19 Mar 2025 11:56:17 +0100 Thomas Huth <[email protected]> wrote:
From: Thomas Huth <[email protected]>
"nc" can either bei GNU netcat, OpenBSD netcat or NMap ncat. At
Small typo s/bei/be/
Quoted 11 lines
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 <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Thanks for the quick patch :)
Quoted 12 lines · Thomas Huth
From: Thomas Huth <[email protected]>
"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.
Quoted 5 lines
Reported-by Matheus Tavares Bernardino <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- tests/functional/test_migration.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Quoted 12 lines · Thomas Huth
From: Thomas Huth <[email protected]>
"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.
Quoted 2 lines
Reported-by Matheus Tavares Bernardino <[email protected]>Signed-off-by Thomas Huth <[email protected]>