[dts] [PATCH V1] fix tx_preparation failed case on fortville NIC
xu,huilong
huilongx.xu at intel.com
Wed Aug 23 09:15:55 CEST 2017
1.use one port run test case
2.only sniff send packet from dut, and filter lldp packet.
Signed-off-by: xu,huilong <huilongx.xu at intel.com>
---
tests/TestSuite_tx_preparation.py | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py
index 3c3080f..5916526 100644
--- a/tests/TestSuite_tx_preparation.py
+++ b/tests/TestSuite_tx_preparation.py
@@ -87,8 +87,9 @@ class TestTX_preparation(TestCase):
Run before each test case.
"""
self.dut_testpmd = PmdOutput(self.dut)
+ # use one port test the case
self.dut_testpmd.start_testpmd(
- "Default", "--port-topology=chained --max-pkt-len=%s" %Max_mtu)
+ "Default", " --portmask=1 --port-topology=chained --max-pkt-len=%s" %Max_mtu)
self.dmac = self.dut_testpmd.get_port_mac(0)
self.dut_testpmd.execute_cmd('set fwd csum')
self.dut_testpmd.execute_cmd('set verbose 1')
@@ -98,16 +99,8 @@ class TestTX_preparation(TestCase):
self.dut_testpmd.execute_cmd('csum set udp hw 0')
def start_tcpdump(self, rxItf):
-
- param = ""
- direct_param = r"(\s+)\[ -(\w) in\|out\|inout \]"
- tcpdump_help = subprocess.check_output("tcpdump -h; echo 0",
- stderr=subprocess.STDOUT,
- shell=True)
- for line in tcpdump_help.split('\n'):
- m = re.match(direct_param, line)
- if m:
- param = "-" + m.group(2) + " in"
+ # only sniff form dut packet and filter lldp packet
+ param = "ether[12:2]!=0x88cc and ether src %s" % self.dmac
self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#")
self.tester.send_expect("tcpdump %s -i %s -n -e -vv -w\
./getPackageByTcpdump.cap 2> /dev/null& " % (param,rxItf), "#")
--
1.9.3
More information about the dts
mailing list