[dts] [PATCH] fix bug that tx_vlan command not work in vlan suite

Yong Liu yong.liu at intel.com
Tue Jul 14 10:09:34 CEST 2015


From: Marvin Liu <yong.liu at intel.com>

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
index fc6f2cb..2f5dfd4 100644
--- a/tests/TestSuite_vlan.py
+++ b/tests/TestSuite_vlan.py
@@ -92,6 +92,7 @@ class TestVlan(TestCase):
     def get_tcpdump_package(self):
         self.tester.send_expect("killall tcpdump","#")
         return self.tester.send_expect("tcpdump -nn -e -v -r ./vlan_test.cap","#")
+
     def vlan_send_packet(self, vid, num=1):
         """
         Send $num of packet to portid
@@ -112,6 +113,7 @@ class TestVlan(TestCase):
         self.tester.scapy_append('sendp([Ether(src="%s",dst="%s")/Dot1Q(vlan=%s)/IP(len=46)], iface="%s")' % (self.smac, self.dmac, vid, txItf))
 
         self.tester.scapy_execute()
+
     def set_up(self):
         """
         Run before each test case.
@@ -197,7 +199,7 @@ class TestVlan(TestCase):
         intf = self.tester.get_interface(port)
 
         self.dut.send_expect("set nbport 2", "testpmd> ")
-        self.dut.send_expect("tx_vlan set %d %s" % (self.vlan, dutTxPortId), "testpmd> ")
+        self.dut.send_expect("tx_vlan set %s %d" % (dutTxPortId, self.vlan), "testpmd> ")
 
         self.tester.scapy_background()
         self.tester.scapy_append('p = sniff(iface="%s", count=1, timeout=5)' % intf)
-- 
1.9.3



More information about the dts mailing list