diff mbox series

[V1] tests/vlan: optimization script

Message ID 20220913124944.143017-1-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/vlan: optimization script | expand

Checks

Context Check Description
ci/Intel-dts-suite-test fail Testing issues
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-format-test success Testing OK

Commit Message

Song Jiale Sept. 13, 2022, 12:49 p.m. UTC
when the ports of dut and tester do not correspond one-to-one in
sequence, the acquired tester port is wrong.

Signed-off-by: Song Jiale <songx.jiale@intel.com>
---
 tests/TestSuite_vlan.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Tu, Lijuan Sept. 20, 2022, 8:25 a.m. UTC | #1
On Tue, 13 Sep 2022 12:49:44 +0000, Song Jiale <songx.jiale@intel.com> wrote:
> when the ports of dut and tester do not correspond one-to-one in
> sequence, the acquired tester port is wrong.
> 
> Signed-off-by: Song Jiale <songx.jiale@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks
diff mbox series

Patch

diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index 27e9a30c..3d8811f9 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -33,7 +33,8 @@  class TestVlan(TestCase):
 
         self.dut_ports = self.dut.get_ports(self.nic)
         self.used_dut_port_0 = self.dut_ports[0]
-        self.tester_intf_0 = self.tester.get_interface(self.used_dut_port_0)
+        self.used_tester_port = self.tester.get_local_port(self.used_dut_port_0)
+        self.tester_intf_0 = self.tester.get_interface(self.used_tester_port)
 
         # Verify that enough ports are available
         self.verify(len(ports) >= 1, "Insufficient ports")