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 E30394CC0 for ; Tue, 4 Sep 2018 10:30:01 +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 60F3880D; Tue, 4 Sep 2018 01:30:01 -0700 (PDT) Received: from phil-VirtualBox.shanghai.arm.com (unknown [10.169.109.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9DE2D3F614; Tue, 4 Sep 2018 01:30:00 -0700 (PDT) From: Phil Yang Date: Tue, 4 Sep 2018 16:26:27 +0800 Message-Id: <1536049595-22271-14-git-send-email-phil.yang@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536049595-22271-1-git-send-email-phil.yang@arm.com> References: <1523526771-7437-1-git-send-email-phil.yang@arm.com> <1536049595-22271-1-git-send-email-phil.yang@arm.com> Subject: [dts] [PATCH v5 14/22] tests/vf_vlan: replaced 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: Tue, 04 Sep 2018 08:30:02 -0000 From: Phil Yang Make packet sniff run on the Tester. Signed-off-by: Phil Yang Suggested-by: Marvin Liu --- tests/TestSuite_vf_vlan.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index 75d99f2..4c7b42d 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -6,7 +6,7 @@ import time from virt_common import VM from test_case import TestCase from pmd_output import PmdOutput -from packet import Packet, sniff_packets, load_sniff_packets +from packet import Packet from settings import get_nic_name import random @@ -173,9 +173,9 @@ class TestVfVlan(TestCase): pkt = Packet(pkt_type='UDP') pkt.config_layer('ether', {'dst': self.vf1_mac}) - inst = sniff_packets(self.tester_intf0, timeout=5) + inst = self.tester.tcpdump_sniff_packets(self.tester_intf0, timeout=5) pkt.send_pkt(tx_port=self.tester_intf1) - pkts = load_sniff_packets(inst) + pkts = self.tester.load_tcpdump_sniff_packets(inst) self.verify(len(pkts), "Not receive expected packet") self.vm0_testpmd.quit() @@ -258,13 +258,13 @@ class TestVfVlan(TestCase): "ip link set %s vf 0 vlan 0" % (self.host_intf0), "# ") def tx_and_check(self, tx_vlan=1): - inst = sniff_packets(self.tester_intf0, timeout=5) + inst = self.tester.tcpdump_sniff_packets(self.tester_intf0, timeout=5) self.vm0_testpmd.execute_cmd('set burst 1') self.vm0_testpmd.execute_cmd('start tx_first') self.vm0_testpmd.execute_cmd('stop') # strip sniffered vlans - pkts = load_sniff_packets(inst) + pkts = self.tester.load_tcpdump_sniff_packets(inst) vlans = [] for pkt in pkts: vlan = pkt.strip_element_vlan("vlan") -- 2.7.4