[V1] tests/vlan: optimization script
Checks
Commit Message
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
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
@@ -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")