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 V2] tests/virtio_event_idx_interrupt: optimize the code
Date: Mon,  2 Aug 2021 15:20:53 +0800	[thread overview]
Message-ID: <20210802072053.2520960-1-weix.ling@intel.com> (raw)

v1:
Add bind_dev parameter to replace restore_interfaces in start_vm
method to decide bind the NIC port to dpdk in vm or not.

v2:
Add set_target parameter because this suite no need build dpdk in vm.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_virtio_event_idx_interrupt.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_virtio_event_idx_interrupt.py b/tests/TestSuite_virtio_event_idx_interrupt.py
index 37634f05..041658e9 100644
--- a/tests/TestSuite_virtio_event_idx_interrupt.py
+++ b/tests/TestSuite_virtio_event_idx_interrupt.py
@@ -134,7 +134,7 @@ class TestVirtioIdxInterrupt(TestCase):
         self.vhost.send_expect(command_line, "testpmd> ", 30)
         self.vhost.send_expect("start", "testpmd> ", 30)
 
-    def start_vms(self, packed=False, mode=False):
+    def start_vms(self, packed=False, mode=False, set_target=False, bind_dev=False):
         """
         start qemus
         """
@@ -155,12 +155,11 @@ class TestVirtioIdxInterrupt(TestCase):
         vm_params['opt_settings'] = opt_args
         self.vm.set_vm_device(**vm_params)
         try:
-            self.vm_dut = self.vm.start()
+            self.vm_dut = self.vm.start(set_target=set_target, bind_dev=bind_dev)
             if self.vm_dut is None:
                 raise Exception("Set up VM ENV failed")
         except Exception as e:
             self.logger.error("ERROR: Failure for %s" % str(e))
-        self.vm_dut.restore_interfaces()
 
     def config_virito_net_in_vm(self):
         """
-- 
2.25.1


             reply	other threads:[~2021-08-02  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02  7:20 Wei Ling [this message]
2021-08-02  7:38 ` Ling, WeiX
2021-08-13  0:18   ` Wang, Yinan
2021-10-09  8:18     ` 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=20210802072053.2520960-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).