From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A24CA3168 for ; Thu, 17 Oct 2019 09:32:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9004A1E886; Thu, 17 Oct 2019 09:32:01 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 941721E4E8 for ; Thu, 17 Oct 2019 09:32:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 00:31:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,306,1566889200"; d="scan'208";a="208181297" Received: from unknown (HELO dpdk-xiaoqimai-tester.sh.intel.com) ([10.240.179.35]) by orsmga002.jf.intel.com with ESMTP; 17 Oct 2019 00:31:58 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Thu, 17 Oct 2019 03:30:07 -0400 Message-Id: <1571297407-82596-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]tests/TestSuite_multicast: update to new packet api 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" update case to invoke new api Signed-off-by: Xiao Qimai --- tests/TestSuite_multicast.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_multicast.py b/tests/TestSuite_multicast.py index bcdb0bc..b9dc4e8 100644 --- a/tests/TestSuite_multicast.py +++ b/tests/TestSuite_multicast.py @@ -108,7 +108,7 @@ class TestMulticast(TestCase): for rx_port in trafficFlow[flow][1].split(","): sniff_src = "not 00:00:00:00:00:00" - inst = self.tester.tcpdump_sniff_packets(intf=self.tester.get_interface(eval(rx_port)), timeout=5, + inst = self.tester.tcpdump_sniff_packets(intf=self.tester.get_interface(eval(rx_port)), count=1, filters=[{"layer": "ether", "config": {"src": sniff_src}}] ) dmac = self.dut.get_mac_address(TGs[int(trafficFlow[flow][0][2])]) @@ -119,8 +119,8 @@ class TestMulticast(TestCase): time.sleep(5) # Wait for the sniffer to finish. pkts = self.tester.load_tcpdump_sniff_packets(inst) - for packet in pkts: - result = str(packet.pktgen.pkt.show) + for i in range(len(pkts)): + result = str(pkts[i].show) print result self.verify("Ether" in result, "No packet received") -- 1.8.3.1