diff mbox series

[V2] tests/virtio_event_idx_interrupt: optimize the code

Message ID 20210802072053.2520960-1-weix.ling@intel.com (mailing list archive)
State Accepted
Headers show
Series [V2] tests/virtio_event_idx_interrupt: optimize the code | expand

Commit Message

Wei Ling Aug. 2, 2021, 7:20 a.m. UTC
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(-)

Comments

Wei Ling Aug. 2, 2021, 7:38 a.m. UTC | #1
> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Monday, August 2, 2021 03:21 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V2] tests/virtio_event_idx_interrupt: optimize the
> code
> 
Tested-by: Wei Ling <weix.ling@intel.com>
Wang, Yinan Aug. 13, 2021, 12:18 a.m. UTC | #2
Acked-by:  Yinan Wang <yinan.wang@intel.com>

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: 2021?8?2? 15:38
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V2] tests/virtio_event_idx_interrupt: optimize
> the code
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Monday, August 2, 2021 03:21 PM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V2] tests/virtio_event_idx_interrupt: optimize the
> > code
> >
> Tested-by: Wei Ling <weix.ling@intel.com>
Tu, Lijuan Oct. 9, 2021, 8:18 a.m. UTC | #3
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Wang, Yinan
> Sent: 2021年8月13日 8:18
> To: Ling, WeiX <weix.ling@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [PATCH V2] tests/virtio_event_idx_interrupt: optimize the
> code
> 
> Acked-by:  Yinan Wang <yinan.wang@intel.com>
> 
> > -----Original Message-----
> > From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> > Sent: 2021?8?2? 15:38
> > To: dts@dpdk.org
> > Subject: Re: [dts] [PATCH V2] tests/virtio_event_idx_interrupt:
> > optimize the code
> >
> > > -----Original Message-----
> > > From: Ling, WeiX <weix.ling@intel.com>
> > > Sent: Monday, August 2, 2021 03:21 PM
> > > To: dts@dpdk.org
> > > Cc: Ling, WeiX <weix.ling@intel.com>
> > > Subject: [dts][PATCH V2] tests/virtio_event_idx_interrupt: optimize
> > > the code
> > >
> > Tested-by: Wei Ling <weix.ling@intel.com>

Applied
diff mbox series

Patch

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):
         """