From 2e768cb682bfe34cf535def50bba90281ea35c88 Mon Sep 17 00:00:00 2001 From: Oksana Vohchana Date: Mon, 3 Feb 2020 13:16:31 +0200 Subject: tests/acceptance/migration: Test EXEC transport when migrating MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Along with VM migration via TCP, we can use migration through the EXEC transport protocol Signed-off-by: Oksana Vohchana Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200203111631.18796-3-ovoshcha@redhat.com> [PMD: Split patch in 2, reworded subject and description] Signed-off-by: Philippe Mathieu-Daudé --- tests/acceptance/migration.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/acceptance') diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index 9eebc36b8f..41b13b9e0d 100644 --- a/tests/acceptance/migration.py +++ b/tests/acceptance/migration.py @@ -12,9 +12,11 @@ import tempfile from avocado_qemu import Test +from avocado import skipUnless from avocado.utils import network from avocado.utils import wait +from avocado.utils.path import find_command class Migration(Test): @@ -60,3 +62,11 @@ class Migration(Test): with tempfile.TemporaryDirectory(prefix='socket_') as socket_path: dest_uri = 'unix:%s/qemu-test.sock' % socket_path self.do_migrate(dest_uri) + + @skipUnless(find_command('nc', default=False), "'nc' command not found") + def test_migration_with_exec(self): + """ + The test works for both netcat-traditional and netcat-openbsd packages + """ + free_port = self._get_free_port() + dest_uri = 'exec:nc -l localhost %u' % free_port -- cgit v1.2.3