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; 6+ 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] 6+ 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-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ 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] 6+ 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-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, 1 reply; 6+ 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] 6+ 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-14 14:52 ` [PATCH v1 4/4] Acceptance test: provides to use RDMA transport for migration Oksana Vohchana
  3 siblings, 0 replies; 6+ 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] 6+ 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; 6+ 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] 6+ 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é
  0 siblings, 0 replies; 6+ 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] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ 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-14 14:52 ` [PATCH v1 2/4] Acceptance test: EXEC migration Oksana Vohchana
2020-02-14 18:27   ` Philippe Mathieu-Daudé
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

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