QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1 0/4] Extension of migration tests
@ 2020-02-14 14:52 Oksana Vohchana
  2020-02-14 14:52 ` [PATCH v1 1/4] Acceptance test: add address as param Oksana Vohchana
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Oksana Vohchana @ 2020-02-14 14:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd, wainersm, crosa

This series adds a new migration test through RDMA and provides new
functions to it.
The last update by mistake was not provided a full scenario to the EXEC
migration test. One of patch fixed it.

Oksana Vohchana (4):
  Acceptance test: add address as param
  Acceptance test: EXEC migration
  Acceptance test: provides new functions
  Acceptance test: provides to use RDMA transport for migration

 tests/acceptance/migration.py | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

-- 
2.21.1



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

* [PATCH v1 1/4] Acceptance test: add address as param
  2020-02-14 14:52 [PATCH v1 0/4] Extension of migration tests Oksana Vohchana
@ 2020-02-14 14:52 ` Oksana Vohchana
  2020-02-20 18:54   ` Wainer dos Santos Moschetta
  2020-02-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Oksana Vohchana @ 2020-02-14 14:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd, wainersm, crosa

Provides param address in _get_free_port()
because by default it takes free port only on the localhost

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

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index a8367ca023..e4c39b85a1 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -52,8 +52,8 @@ class Migration(Test):
         source_vm.qmp('migrate', uri=src_uri)
         self.assert_migration(source_vm, dest_vm)
 
-    def _get_free_port(self):
-        port = network.find_free_port()
+    def _get_free_port(self, address='localhost'):
+        port = network.find_free_port(address=address)
         if port is None:
             self.cancel('Failed to find a free port')
         return port
-- 
2.21.1



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

* [PATCH v1 2/4] Acceptance test: EXEC migration
  2020-02-14 14:52 [PATCH v1 0/4] Extension of migration tests Oksana Vohchana
  2020-02-14 14:52 ` [PATCH v1 1/4] Acceptance test: add address as param Oksana Vohchana
@ 2020-02-14 14:52 ` Oksana Vohchana
  2020-02-14 18:27   ` Philippe Mathieu-Daudé
  2020-02-20 17:23   ` Wainer dos Santos Moschetta
  2020-02-14 14:52 ` [PATCH v1 3/4] Acceptance test: provides new functions Oksana Vohchana
  2020-02-14 14:52 ` [PATCH v1 4/4] Acceptance test: provides to use RDMA transport for migration Oksana Vohchana
  3 siblings, 2 replies; 10+ messages in thread
From: Oksana Vohchana @ 2020-02-14 14:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd, wainersm, crosa

Improves EXEC migration to run whole test stage

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

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index e4c39b85a1..8209dcf71d 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -75,3 +75,5 @@ class Migration(Test):
         """
         free_port = self._get_free_port()
         dest_uri = 'exec:nc -l localhost %u' % free_port
+        src_uri = 'exec:nc localhost %u' % free_port
+        self.do_migrate(dest_uri, src_uri)
-- 
2.21.1



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

* [PATCH v1 3/4] Acceptance test: provides new functions
  2020-02-14 14:52 [PATCH v1 0/4] Extension of migration tests Oksana Vohchana
  2020-02-14 14:52 ` [PATCH v1 1/4] Acceptance test: add address as param Oksana Vohchana
  2020-02-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
@ 2020-02-14 14:52 ` Oksana Vohchana
  2020-02-21 18:31   ` Wainer dos Santos Moschetta
  2020-02-14 14:52 ` [PATCH v1 4/4] Acceptance test: provides to use RDMA transport for migration Oksana Vohchana
  3 siblings, 1 reply; 10+ messages in thread
From: Oksana Vohchana @ 2020-02-14 14:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd, wainersm, crosa

Adds functions to check if service RDMA is enabled and gets the interface
where it was configured

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

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 8209dcf71d..bbd88f8dda 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -11,12 +11,16 @@
 
 
 import tempfile
+import re
+import netifaces
 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
+from avocado.utils import service
+from avocado.utils import process
 
 
 class Migration(Test):
@@ -58,6 +62,19 @@ class Migration(Test):
             self.cancel('Failed to find a free port')
         return port
 
+    def _if_rdma_enable(self):
+        rdma_stat = service.ServiceManager()
+        rdma = rdma_stat.status('rdma')
+        return rdma
+
+    def _get_ip_rdma(self):
+        get_ip_rdma = process.run('rdma link show').stdout.decode()
+        for line in get_ip_rdma.split('\n'):
+            if re.search(r"ACTIVE", line):
+                interface = line.split(" ")[-2]
+                ip = netifaces.ifaddresses(interface)[netifaces.AF_INET][0]['addr']
+                return ip
+
 
     def test_migration_with_tcp_localhost(self):
         dest_uri = 'tcp:localhost:%u' % self._get_free_port()
-- 
2.21.1



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

* [PATCH v1 4/4] Acceptance test: provides to use RDMA transport for migration
  2020-02-14 14:52 [PATCH v1 0/4] Extension of migration tests Oksana Vohchana
                   ` (2 preceding siblings ...)
  2020-02-14 14:52 ` [PATCH v1 3/4] Acceptance test: provides new functions Oksana Vohchana
@ 2020-02-14 14:52 ` Oksana Vohchana
  3 siblings, 0 replies; 10+ messages in thread
From: Oksana Vohchana @ 2020-02-14 14:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd, wainersm, crosa

Adds test for RDMA migration check

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

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index bbd88f8dda..c0a3031e67 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -94,3 +94,11 @@ class Migration(Test):
         dest_uri = 'exec:nc -l localhost %u' % free_port
         src_uri = 'exec:nc localhost %u' % free_port
         self.do_migrate(dest_uri, src_uri)
+
+    @skipUnless(_if_rdma_enable(None), "Unit rdma.service could not be found")
+    @skipUnless(_get_ip_rdma(None), 'RoCE(RDMA) service or interface not configured')
+    def test_migration_with_rdma_localhost(self):
+        ip = self._get_ip_rdma()
+        free_port = self._get_free_port(address=ip)
+        dest_uri = 'rdma:%s:%u' % (ip, free_port)
+        self.do_migrate(dest_uri)
-- 
2.21.1



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

* Re: [PATCH v1 2/4] Acceptance test: EXEC migration
  2020-02-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
@ 2020-02-14 18:27   ` Philippe Mathieu-Daudé
  2020-02-20 17:23   ` Wainer dos Santos Moschetta
  1 sibling, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-14 18:27 UTC (permalink / raw)
  To: Oksana Vohchana, qemu-devel; +Cc: wainersm, crosa

On 2/14/20 3:52 PM, Oksana Vohchana wrote:
> Improves EXEC migration to run whole test stage
> 
> Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>

Fixes: 2e768cb682bf

> ---
>   tests/acceptance/migration.py | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index e4c39b85a1..8209dcf71d 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -75,3 +75,5 @@ class Migration(Test):
>           """
>           free_port = self._get_free_port()
>           dest_uri = 'exec:nc -l localhost %u' % free_port
> +        src_uri = 'exec:nc localhost %u' % free_port
> +        self.do_migrate(dest_uri, src_uri)
> 

I was very surprised because commit 2e768cb682bf is not the content I 
reviewed. Apparently what happened here is you sent 2 different series 
with the same subject... I got confused while applying I selected the 
incorrect id:

$ pwclient list 'Acceptance test: provides to use different transport 
for migration'
ID      State        Name
--      -----        ----
11348377 New          Acceptance test: provides to use different 
transport for migration
11348719 New          Acceptance test: provides to use different 
transport for migration
11355797 New          [v2] Acceptance test: provides to use different 
transport for migration
11358447 New          [v2,REPOST] Acceptance test: provides to use 
different transport for migration
11362397 New          [v3,1/2] Acceptance test: provides to use 
different transport for migration
11362399 New          [v3,2/2] Acceptance test: provides to use 
different transport for migration
11362479 New          [v3,1/2] Acceptance test: provides to use 
different transport for migration
11362485 New          [v3,2/2] Acceptance test: provides to use 
different transport for migration

I am sorry I missed that.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH v1 2/4] Acceptance test: EXEC migration
  2020-02-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
  2020-02-14 18:27   ` Philippe Mathieu-Daudé
@ 2020-02-20 17:23   ` Wainer dos Santos Moschetta
  1 sibling, 0 replies; 10+ messages in thread
From: Wainer dos Santos Moschetta @ 2020-02-20 17:23 UTC (permalink / raw)
  To: Oksana Vohchana, qemu-devel; +Cc: philmd, crosa


On 2/14/20 12:52 PM, Oksana Vohchana wrote:
> Improves EXEC migration to run whole test stage
>
> Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
> ---
>   tests/acceptance/migration.py | 2 ++
>   1 file changed, 2 insertions(+)

Indeed, with this changes the migration is triggered.

Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index e4c39b85a1..8209dcf71d 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -75,3 +75,5 @@ class Migration(Test):
>           """
>           free_port = self._get_free_port()
>           dest_uri = 'exec:nc -l localhost %u' % free_port
> +        src_uri = 'exec:nc localhost %u' % free_port
> +        self.do_migrate(dest_uri, src_uri)



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

* Re: [PATCH v1 1/4] Acceptance test: add address as param
  2020-02-14 14:52 ` [PATCH v1 1/4] Acceptance test: add address as param Oksana Vohchana
@ 2020-02-20 18:54   ` Wainer dos Santos Moschetta
  0 siblings, 0 replies; 10+ messages in thread
From: Wainer dos Santos Moschetta @ 2020-02-20 18:54 UTC (permalink / raw)
  To: Oksana Vohchana, qemu-devel; +Cc: philmd, crosa

Hi Oksana,

On 2/14/20 12:52 PM, Oksana Vohchana wrote:
> Provides param address in _get_free_port()
> because by default it takes free port only on the localhost
>
> Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
> ---
>   tests/acceptance/migration.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index a8367ca023..e4c39b85a1 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -52,8 +52,8 @@ class Migration(Test):
>           source_vm.qmp('migrate', uri=src_uri)
>           self.assert_migration(source_vm, dest_vm)
>   
> -    def _get_free_port(self):
> -        port = network.find_free_port()
> +    def _get_free_port(self, address='localhost'):
> +        port = network.find_free_port(address=address)

Looks good to me, but:

- This patch is out of order, it should be followed by patches 03 and 04.

- You could have described in the cover letter (or in the commit) your 
intention with this change.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>

Thanks!

- Wainer

>           if port is None:
>               self.cancel('Failed to find a free port')
>           return port



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

* Re: [PATCH v1 3/4] Acceptance test: provides new functions
  2020-02-14 14:52 ` [PATCH v1 3/4] Acceptance test: provides new functions Oksana Vohchana
@ 2020-02-21 18:31   ` Wainer dos Santos Moschetta
  2020-02-24 16:23     ` Oksana Voshchana
  0 siblings, 1 reply; 10+ messages in thread
From: Wainer dos Santos Moschetta @ 2020-02-21 18:31 UTC (permalink / raw)
  To: Oksana Vohchana, qemu-devel; +Cc: philmd, crosa

Hi Oksana,

On 2/14/20 12:52 PM, Oksana Vohchana wrote:
> Adds functions to check if service RDMA is enabled and gets the interface
> where it was configured
>
> Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
> ---
>   tests/acceptance/migration.py | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index 8209dcf71d..bbd88f8dda 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -11,12 +11,16 @@
>   
>   
>   import tempfile
> +import re
> +import netifaces

Since netifaces isn't a standard Python library that import might fail.

The tests dependencies are listed in tests/requirements.txt, and 
installed in the environment created by `make check-acceptance`. If you 
want to ensure the test behaves well even when executed manually (i.e. 
not via `make check-acceptance`), you can add runtime checks as can be 
seen in tests/acceptance/machine_m68k_nextcube.py

>   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
> +from avocado.utils import service
> +from avocado.utils import process
>   
>   
>   class Migration(Test):
> @@ -58,6 +62,19 @@ class Migration(Test):
>               self.cancel('Failed to find a free port')
>           return port
>   
> +    def _if_rdma_enable(self):
> +        rdma_stat = service.ServiceManager()
> +        rdma = rdma_stat.status('rdma')
> +        return rdma


Above function is used on patch04, but actually I don't think it needs 
to check this service for RoCE. It would be needed if it was using the 
rxe_cfg to configure the rdma link. Or am I missing something?


> +
> +    def _get_ip_rdma(self):
> +        get_ip_rdma = process.run('rdma link show').stdout.decode()
> +        for line in get_ip_rdma.split('\n'):
> +            if re.search(r"ACTIVE", line):
> +                interface = line.split(" ")[-2]
> +                ip = netifaces.ifaddresses(interface)[netifaces.AF_INET][0]['addr']
> +                return ip
> +

I suggest that it explicitly returns None if none is found.

Thanks!

- Wainer

>   
>       def test_migration_with_tcp_localhost(self):
>           dest_uri = 'tcp:localhost:%u' % self._get_free_port()



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

* Re: [PATCH v1 3/4] Acceptance test: provides new functions
  2020-02-21 18:31   ` Wainer dos Santos Moschetta
@ 2020-02-24 16:23     ` Oksana Voshchana
  0 siblings, 0 replies; 10+ messages in thread
From: Oksana Voshchana @ 2020-02-24 16:23 UTC (permalink / raw)
  To: Wainer dos Santos Moschetta
  Cc: Philippe Mathieu-Daudé, qemu-devel, Cleber Rosa

[-- Attachment #1: Type: text/plain, Size: 3011 bytes --]

Hi Wainer,
Thanks for review

On Fri, Feb 21, 2020 at 8:31 PM Wainer dos Santos Moschetta <
wainersm@redhat.com> wrote:

> Hi Oksana,
>
> On 2/14/20 12:52 PM, Oksana Vohchana wrote:
> > Adds functions to check if service RDMA is enabled and gets the interface
> > where it was configured
> >
> > Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
> > ---
> >   tests/acceptance/migration.py | 17 +++++++++++++++++
> >   1 file changed, 17 insertions(+)
> >
> > diff --git a/tests/acceptance/migration.py
> b/tests/acceptance/migration.py
> > index 8209dcf71d..bbd88f8dda 100644
> > --- a/tests/acceptance/migration.py
> > +++ b/tests/acceptance/migration.py
> > @@ -11,12 +11,16 @@
> >
> >
> >   import tempfile
> > +import re
> > +import netifaces
>
> Since netifaces isn't a standard Python library that import might fail.
>
> The tests dependencies are listed in tests/requirements.txt, and
> installed in the environment created by `make check-acceptance`. If you
> want to ensure the test behaves well even when executed manually (i.e.
> not via `make check-acceptance`), you can add runtime checks as can be
> seen in tests/acceptance/machine_m68k_nextcube.py
>

Thanks, a "runtime checks" is a good approach
I'll improve it


>
> >   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
> > +from avocado.utils import service
> > +from avocado.utils import process
> >
> >
> >   class Migration(Test):
> > @@ -58,6 +62,19 @@ class Migration(Test):
> >               self.cancel('Failed to find a free port')
> >           return port
> >
> > +    def _if_rdma_enable(self):
> > +        rdma_stat = service.ServiceManager()
> > +        rdma = rdma_stat.status('rdma')
> > +        return rdma
>
>
> Above function is used on patch04, but actually I don't think it needs
> to check this service for RoCE. It would be needed if it was using the
> rxe_cfg to configure the rdma link. Or am I missing something?
>
>  The function _if_rdma_enable() checks if RDMA service enabled in the
system it does not depend on wich utils we will use to check if some
network configuration present (rdma or rxe_cfg)


> > +
> > +    def _get_ip_rdma(self):
> > +        get_ip_rdma = process.run('rdma link show').stdout.decode()
> > +        for line in get_ip_rdma.split('\n'):
> > +            if re.search(r"ACTIVE", line):
> > +                interface = line.split(" ")[-2]
> > +                ip =
> netifaces.ifaddresses(interface)[netifaces.AF_INET][0]['addr']
> > +                return ip
> > +
>
> I suggest that it explicitly returns None if none is found.
>

Ok, I agree
I'll improve it


> Thanks!
>
> - Wainer
>
> >
> >       def test_migration_with_tcp_localhost(self):
> >           dest_uri = 'tcp:localhost:%u' % self._get_free_port()
>
>

Thanks!

[-- Attachment #2: Type: text/html, Size: 4473 bytes --]

<div dir="ltr"><div>Hi Wainer,</div><div>Thanks for review<br><br></div><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 21, 2020 at 8:31 PM Wainer dos Santos Moschetta &lt;<a href="mailto:wainersm@redhat.com" target="_blank">wainersm@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Oksana,<br>
<br>
On 2/14/20 12:52 PM, Oksana Vohchana wrote:<br>
&gt; Adds functions to check if service RDMA is enabled and gets the interface<br>
&gt; where it was configured<br>
&gt;<br>
&gt; Signed-off-by: Oksana Vohchana &lt;<a href="mailto:ovoshcha@redhat.com" target="_blank">ovoshcha@redhat.com</a>&gt;<br>
&gt; ---<br>
&gt;   tests/acceptance/migration.py | 17 +++++++++++++++++<br>
&gt;   1 file changed, 17 insertions(+)<br>
&gt;<br>
&gt; diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py<br>
&gt; index 8209dcf71d..bbd88f8dda 100644<br>
&gt; --- a/tests/acceptance/migration.py<br>
&gt; +++ b/tests/acceptance/migration.py<br>
&gt; @@ -11,12 +11,16 @@<br>
&gt;   <br>
&gt;   <br>
&gt;   import tempfile<br>
&gt; +import re<br>
&gt; +import netifaces<br>
<br>
Since netifaces isn&#39;t a standard Python library that import might fail.<br>
<br>
The tests dependencies are listed in tests/requirements.txt, and <br>
installed in the environment created by `make check-acceptance`. If you <br>
want to ensure the test behaves well even when executed manually (i.e. <br>
not via `make check-acceptance`), you can add runtime checks as can be <br>
seen in tests/acceptance/machine_m68k_nextcube.py<br></blockquote><div><br></div><div>Thanks, a &quot;runtime checks&quot; is a good approach</div><div>I&#39;ll improve it</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt;   from avocado_qemu import Test<br>
&gt;   from avocado import skipUnless<br>
&gt;   <br>
&gt;   from avocado.utils import network<br>
&gt;   from avocado.utils import wait<br>
&gt;   from avocado.utils.path import find_command<br>
&gt; +from avocado.utils import service<br>
&gt; +from avocado.utils import process<br>
&gt;   <br>
&gt;   <br>
&gt;   class Migration(Test):<br>
&gt; @@ -58,6 +62,19 @@ class Migration(Test):<br>
&gt;               self.cancel(&#39;Failed to find a free port&#39;)<br>
&gt;           return port<br>
&gt;   <br>
&gt; +    def _if_rdma_enable(self):<br>
&gt; +        rdma_stat = service.ServiceManager()<br>
&gt; +        rdma = rdma_stat.status(&#39;rdma&#39;)<br>
&gt; +        return rdma<br>
<br>
<br>
Above function is used on patch04, but actually I don&#39;t think it needs <br>
to check this service for RoCE. It would be needed if it was using the <br>
rxe_cfg to configure the rdma link. Or am I missing something?<br>
<br></blockquote><div> The function _if_rdma_enable() checks if RDMA service enabled in the system it does not depend on wich utils we will use to check if some network configuration present (rdma or rxe_cfg)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; +<br>
&gt; +    def _get_ip_rdma(self):<br>
&gt; +        get_ip_rdma = process.run(&#39;rdma link show&#39;).stdout.decode()<br>
&gt; +        for line in get_ip_rdma.split(&#39;\n&#39;):<br>
&gt; +            if re.search(r&quot;ACTIVE&quot;, line):<br>
&gt; +                interface = line.split(&quot; &quot;)[-2]<br>
&gt; +                ip = netifaces.ifaddresses(interface)[netifaces.AF_INET][0][&#39;addr&#39;]<br>
&gt; +                return ip<br>
&gt; +<br>
<br>
I suggest that it explicitly returns None if none is found.<br>
</blockquote><div><br></div><div>Ok, I agree<br>I&#39;ll improve it<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks!<br>
<br>
- Wainer<br>
<br>
&gt;   <br>
&gt;       def test_migration_with_tcp_localhost(self):<br>
&gt;           dest_uri = &#39;tcp:localhost:%u&#39; % self._get_free_port()<br>
<br></blockquote><div><br></div><div><br></div><div>Thanks! </div></div></div>
</div>

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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 14:52 [PATCH v1 0/4] Extension of migration tests Oksana Vohchana
2020-02-14 14:52 ` [PATCH v1 1/4] Acceptance test: add address as param Oksana Vohchana
2020-02-20 18:54   ` Wainer dos Santos Moschetta
2020-02-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
2020-02-14 18:27   ` Philippe Mathieu-Daudé
2020-02-20 17:23   ` Wainer dos Santos Moschetta
2020-02-14 14:52 ` [PATCH v1 3/4] Acceptance test: provides new functions Oksana Vohchana
2020-02-21 18:31   ` Wainer dos Santos Moschetta
2020-02-24 16:23     ` Oksana Voshchana
2020-02-14 14:52 ` [PATCH v1 4/4] Acceptance test: provides to use RDMA transport for migration Oksana Vohchana

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git