From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id A3CE6A48B for ; Fri, 30 Mar 2018 12:41:41 +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 2014715AB; Fri, 30 Mar 2018 03:41:40 -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 7A0063F487; Fri, 30 Mar 2018 03:41:39 -0700 (PDT) From: Phil Yang To: dts@dpdk.org Cc: nd@arm.com, yong.liu@intel.com Date: Fri, 30 Mar 2018 18:41:01 +0800 Message-Id: <1522406469-9251-9-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 09/17] tests/rxtx_callback: Replace sniff_packets to tester.tcpdump_sniff_packets 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:41 -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_rxtx_callbacks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_rxtx_callbacks.py b/tests/TestSuite_rxtx_callbacks.py index dd968a4..aeddf59 100644 --- a/tests/TestSuite_rxtx_callbacks.py +++ b/tests/TestSuite_rxtx_callbacks.py @@ -41,7 +41,6 @@ from test_case import TestCase from plotting import Plotting from settings import HEADER_SIZE from etgen import IxiaPacketGenerator -from packet import Packet, sniff_packets, load_sniff_packets class TestRxtxCallbacks(TestCase): @@ -77,7 +76,7 @@ class TestRxtxCallbacks(TestCase): self.iface_port0 = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0])) self.iface_port1 = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[1])) - self.inst_port1 = sniff_packets(self.iface_port1) + self.inst_port1 = self.tester.tcpdump_sniff_packets(self.iface_port1) self.scapy_send_packet(self.iface_port0) out_port1 = self.get_tcpdump_package(self.inst_port1) @@ -92,7 +91,8 @@ class TestRxtxCallbacks(TestCase): self.tester.scapy_execute() def get_tcpdump_package(self,inst): - pkts = load_sniff_packets(inst) + self.tester.session.copy_file_from("/tmp/sniff_%s.pcap" % self.iface_port1, "/tmp/") + pkts = self.tester.load_tcpdump_sniff_packets(inst) dsts = [] for packet in pkts: dst = packet.strip_element_layer2("dst") -- 2.7.4