From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 671117D53 for ; Wed, 23 Aug 2017 09:14:48 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 00:14:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,415,1498546800"; d="scan'208";a="1187206041" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 23 Aug 2017 00:14:40 -0700 From: "xu,huilong" To: dts@dpdk.org Cc: "xu,huilong" Date: Wed, 23 Aug 2017 15:15:55 +0800 Message-Id: <1503472555-85796-1-git-send-email-huilongx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] fix tx_preparation failed case on fortville NIC X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 07:14:48 -0000 1.use one port run test case 2.only sniff send packet from dut, and filter lldp packet. Signed-off-by: xu,huilong --- 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