[dts] [PATCH V1] tests/vhost_multi_queue_qemu: fix issue abuot get interface of tester

malihong lihongx.ma at intel.com
Wed Feb 12 03:09:05 CET 2020


From: lihong <lihongx.ma at intel.com>

Signed-off-by: lihong <lihongx.ma at intel.com>
---
 tests/TestSuite_vhost_multi_queue_qemu.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_vhost_multi_queue_qemu.py b/tests/TestSuite_vhost_multi_queue_qemu.py
index 1232cf3..5a1a660 100644
--- a/tests/TestSuite_vhost_multi_queue_qemu.py
+++ b/tests/TestSuite_vhost_multi_queue_qemu.py
@@ -49,8 +49,6 @@ class TestVhostUserOneCopyOneVm(TestCase):
         # Get and verify the ports
         self.dut_ports = self.dut.get_ports()
         self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
-        local_port = self.tester.get_local_port(self.dut_ports[0])
-        self.tx_interface = self.tester.get_interface(local_port)
         # Get the port's socket
         self.pf = self.dut_ports[0]
         netdev = self.dut.ports_info[self.pf]['port']
@@ -177,6 +175,8 @@ class TestVhostUserOneCopyOneVm(TestCase):
         While verify_type is "vhost queue < virtio queue", the vhost should forward all set of data
         While verify_type is "vhost queue > virtio queue", the vhost should forward at least one set of data
         """
+        local_port = self.tester.get_local_port(self.dut_ports[0])
+        self.tx_interface = self.tester.get_interface(local_port)
         for frame_size in self.frame_sizes:
             info = "Running test %s, and %d frame size." % (self.running_case, frame_size)
             self.logger.info(info)
-- 
1.9.3



More information about the dts mailing list