[V1] tests/virtio_event_idx_interrupt: ues bind_dev paramter to replace restore_interfaces

Message ID 20210802052304.2520157-1-weix.ling@intel.com (mailing list archive)
State Superseded
Headers
Series [V1] tests/virtio_event_idx_interrupt: ues bind_dev paramter to replace restore_interfaces |

Commit Message

Ling, WeiX Aug. 2, 2021, 5:23 a.m. UTC
  Add bind_dev parameter to replace restore_interfaces in start_vm
method to decide bind the NIC port to dpdk in vm or not.

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

Patch

diff --git a/tests/TestSuite_virtio_event_idx_interrupt.py b/tests/TestSuite_virtio_event_idx_interrupt.py
index 37634f05..9aeaabf8 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, 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(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):
         """