[PULL 7/7] tests/functional/migration.py: Skip migration_with_exec() if socat is not available

Thomas Huth posted 7 patches 2 days, 19 hours ago
Maintainers: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Gerd Hoffmann <kraxel@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Thomas Huth <th.huth+qemu@posteo.eu>, "Daniel P. Berrangé" <berrange@redhat.com>
[PULL 7/7] tests/functional/migration.py: Skip migration_with_exec() if socat is not available
Posted by Thomas Huth 2 days, 19 hours ago
From: Zhao Liu <zhao1.liu@intel.com>

Commit 643a171f5668 ("tests: Replace ncat with socat in migration test
and drop ncat from containers") replaced ncat with socat, but missed to
skip related test cases if socat is not available, which will cause test
errors on the system without socat.

Fix this by checking socat instead of the original ncat.

Fixes: 643a171f5668 ("tests: Replace ncat with socat in migration test and drop ncat from containers")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20260330053300.2721608-1-zhao1.liu@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/migration.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/functional/migration.py b/tests/functional/migration.py
index 2395119d6c6..144f091ba8a 100644
--- a/tests/functional/migration.py
+++ b/tests/functional/migration.py
@@ -80,8 +80,8 @@ def migration_with_unix(self):
         self.migrate(dst_uri)
 
     def migration_with_exec(self):
-        if not which('ncat'):
-            self.skipTest('ncat is not available')
+        if not which('socat'):
+            self.skipTest('socat is not available')
         with Ports() as ports:
             free_port = self._get_free_port(ports)
             dst_uri = 'exec:socat TCP-LISTEN:%u -' % free_port
-- 
2.53.0