[PATCH v3 3/3] Acceptance test: provides to use RDMA transport for migration test

Oksana Vohchana posted 3 patches 5 years, 10 months ago
There is a newer version of this series
[PATCH v3 3/3] Acceptance test: provides to use RDMA transport for migration test
Posted by Oksana Vohchana 5 years, 10 months ago
Adds test for RDMA migration check

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
---
 tests/acceptance/migration.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index a783f3915b..c8673114a9 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -105,3 +105,15 @@ class Migration(Test):
         """
         free_port = self._get_free_port()
         dest_uri = 'exec:nc -l localhost %u' % free_port
+
+    @skipUnless(_if_rdma_enable(None), "Unit rdma.service could not be found")
+    @skipUnless(_get_interface_rdma(None), 'RDMA service or interface not configured')
+    def test_migration_with_rdma_localhost(self):
+        iface = self._get_interface_rdma()
+        ip = self._get_ip_rdma(iface)
+        if ip:
+            free_port = self._get_free_port(address=ip)
+        else:
+            self.cancel("Ip address isn't configured")
+        dest_uri = 'rdma:%s:%u' % (ip, free_port)
+        self.do_migrate(dest_uri)
-- 
2.21.1


Re: [PATCH v3 3/3] Acceptance test: provides to use RDMA transport for migration test
Posted by Willian Rampazzo 5 years, 10 months ago
Hi Oksana,

On Fri, Mar 20, 2020 at 12:16 PM Oksana Vohchana <ovoshcha@redhat.com> wrote:
>
> Adds test for RDMA migration check
>
> Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
> ---
>  tests/acceptance/migration.py | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index a783f3915b..c8673114a9 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -105,3 +105,15 @@ class Migration(Test):
>          """
>          free_port = self._get_free_port()
>          dest_uri = 'exec:nc -l localhost %u' % free_port
> +
> +    @skipUnless(_if_rdma_enable(None), "Unit rdma.service could not be found")
> +    @skipUnless(_get_interface_rdma(None), 'RDMA service or interface not configured')

If you change these two methods to be static, you will not need to use
the `None` parameter, as I mentioned in patch 2 of this series.

> +    def test_migration_with_rdma_localhost(self):
> +        iface = self._get_interface_rdma()
> +        ip = self._get_ip_rdma(iface)
> +        if ip:
> +            free_port = self._get_free_port(address=ip)
> +        else:
> +            self.cancel("Ip address isn't configured")
> +        dest_uri = 'rdma:%s:%u' % (ip, free_port)
> +        self.do_migrate(dest_uri)
> --
> 2.21.1
>
>