From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id E4DC04C92 for ; Fri, 30 Mar 2018 12:41:30 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 469641596; Fri, 30 Mar 2018 03:41:29 -0700 (PDT) Received: from phil-VirtualBox.shanghai.arm.com (unknown [10.169.107.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A278A3F487; Fri, 30 Mar 2018 03:41:28 -0700 (PDT) From: Phil Yang To: dts@dpdk.org Cc: nd@arm.com, yong.liu@intel.com Date: Fri, 30 Mar 2018 18:40:54 +0800 Message-Id: <1522406469-9251-2-git-send-email-phil.yang@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522406469-9251-1-git-send-email-phil.yang@arm.com> References: <1521792246-4950-1-git-send-email-phil.yang@arm.com> <1522406469-9251-1-git-send-email-phil.yang@arm.com> Subject: [dts] [PATCH v2 02/17] tests/checksum_offload: Replace sniff_packet to tester.tcpdump_sniff_packet 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: Fri, 30 Mar 2018 10:41:31 -0000 Make sniff_packet running on the tester. Create a ssh connection to the tester then call tcpdump. Signed-off-by: Phil Yang --- tests/TestSuite_checksum_offload.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py index 2ff5c2f..aa43263 100644 --- a/tests/TestSuite_checksum_offload.py +++ b/tests/TestSuite_checksum_offload.py @@ -43,7 +43,6 @@ import utils from test_case import TestCase from pmd_output import PmdOutput -from packet import Packet, sniff_packets, load_sniff_packets, strip_pktload from test_capabilities import DRIVER_TEST_LACK_CAPA class TestChecksumOffload(TestCase): @@ -175,13 +174,15 @@ class TestChecksumOffload(TestCase): self.tester.send_expect("exit()", "#") - inst = sniff_packets(intf=rx_interface, count=len(packets_sent), filters=[{'layer':'ether', 'config':{'src': sniff_src}}]) + inst = self.tester.tcpdump_sniff_packets(intf=rx_interface, count=len(packets_sent), + filters=[{'layer':'ether', 'config':{'src': sniff_src}}]) for packet_type in packets_sent.keys(): self.tester.scapy_append('sendp([%s], iface="%s")' % (packets_sent[packet_type], tx_interface)) self.tester.scapy_execute() - p = load_sniff_packets(inst) + self.tester.session.copy_file_from("/tmp/sniff_%s.pcap" % self.rx_interface, "/tmp/") + p = self.tester.load_tcpdump_sniff_packets(inst) nr_packets=len(p) reslist = [p[i].pktgen.pkt.sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)] out = string.join(reslist, ",") -- 2.7.4