test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] fix tx_preparation failed case on fortville NIC
@ 2017-08-23  7:15 xu,huilong
  2017-08-24 13:31 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: xu,huilong @ 2017-08-23  7:15 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

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@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] fix tx_preparation failed case on fortville NIC
  2017-08-23  7:15 [dts] [PATCH V1] fix tx_preparation failed case on fortville NIC xu,huilong
@ 2017-08-24 13:31 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2017-08-24 13:31 UTC (permalink / raw)
  To: xu,huilong, dts

Thanks gang, applied.

On 08/23/2017 03:15 PM, xu,huilong wrote:
> 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@intel.com>
> ---

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-24  4:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23  7:15 [dts] [PATCH V1] fix tx_preparation failed case on fortville NIC xu,huilong
2017-08-24 13:31 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).