test suite reviews and discussions
 help / color / mirror / Atom feed
From: Wei Ling <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Wei Ling <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/pvp_vhost_user_reconnect: add bind_dev parameter in start_vms
Date: Wed,  4 Aug 2021 10:51:46 +0800	[thread overview]
Message-ID: <20210804025146.3396626-1-weix.ling@intel.com> (raw)

Add bind_dev parameter in start_vms to decide whether bind NIC
port to DPDK or not after start VM.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_pvp_vhost_user_reconnect.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py
index 4be19c5a..4b28f9d0 100644
--- a/tests/TestSuite_pvp_vhost_user_reconnect.py
+++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
@@ -164,7 +164,7 @@ class TestPVPVhostUserReconnect(TestCase):
                     'in this suite, please config it in vhost_sample.cfg file')
         self.checked_vm = True
 
-    def start_vms(self, packed=False):
+    def start_vms(self, packed=False, bind_dev=True):
         """
         start two VM
         """
@@ -186,7 +186,7 @@ class TestPVPVhostUserReconnect(TestCase):
 
             try:
                 vm_dut = None
-                vm_dut = vm_info.start()
+                vm_dut = vm_info.start(bind_dev=bind_dev)
                 if vm_dut is None:
                     raise Exception("Set up VM ENV failed")
             except Exception as e:
@@ -223,8 +223,6 @@ class TestPVPVhostUserReconnect(TestCase):
         restore vm interfaces and config intf arp
         """
         for i in range(len(self.vm_dut)):
-            self.vm_dut[i].restore_interfaces()
-            time.sleep(5)
             vm_intf = self.vm_dut[i].ports_info[0]['intf']
             self.vm_dut[i].send_expect("ifconfig %s %s" %
                                        (vm_intf, self.virtio_ip[i]), "#", 10)
@@ -387,7 +385,7 @@ class TestPVPVhostUserReconnect(TestCase):
         self.vm_num = 2
         vm_cycle = 0
         self.launch_testpmd_as_vhost_user_with_no_pci()
-        self.start_vms()
+        self.start_vms(bind_dev=False)
         self.config_vm_intf()
         self.start_iperf()
         self.before_data = self.iperf_result_verify(vm_cycle, 'before reconnet')
@@ -412,7 +410,7 @@ class TestPVPVhostUserReconnect(TestCase):
             self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10)
             self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10)
             self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
-            self.start_vms()
+            self.start_vms(bind_dev=False)
             self.config_vm_intf()
             self.start_iperf()
             self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm')
@@ -494,7 +492,7 @@ class TestPVPVhostUserReconnect(TestCase):
         self.vm_num = 2
         vm_cycle = 0
         self.launch_testpmd_as_vhost_user_with_no_pci()
-        self.start_vms(packed=True)
+        self.start_vms(packed=True, bind_dev=False)
         self.config_vm_intf()
         self.start_iperf()
         self.before_data = self.iperf_result_verify(vm_cycle, 'before reconnet')
@@ -518,7 +516,7 @@ class TestPVPVhostUserReconnect(TestCase):
             self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10)
             self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10)
             self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ")
-            self.start_vms(packed=True)
+            self.start_vms(packed=True, bind_dev=False)
             self.config_vm_intf()
             self.start_iperf()
             self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm')
-- 
2.25.1


             reply	other threads:[~2021-08-04  2:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  2:51 Wei Ling [this message]
2021-08-04  3:02 ` Ling, WeiX
2021-08-04  6:19   ` Wang, Yinan
2021-08-13  0:18   ` Wang, Yinan
2021-10-09  8:19     ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210804025146.3396626-1-weix.ling@intel.com \
    --to=weix.ling@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).