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 6F358A0613 for ; Fri, 30 Aug 2019 05:26:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 60CAF1E535; Fri, 30 Aug 2019 05:26:41 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 829671E4DC for ; Fri, 30 Aug 2019 05:26:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2019 20:26:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,445,1559545200"; d="scan'208";a="381871844" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 29 Aug 2019 20:26:38 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 29 Aug 2019 20:26:38 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 29 Aug 2019 20:26:38 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.112]) with mapi id 14.03.0439.000; Fri, 30 Aug 2019 11:26:36 +0800 From: "Tu, Lijuan" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH] tests: fix the issue of using scapy to send packet Thread-Index: AQHVV9C2ksHy0djY8EenjefVheHHnacTFc4Q Date: Fri, 30 Aug 2019 03:26:35 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB078F6@SHSMSX101.ccr.corp.intel.com> References: <1566328538-190992-1-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1566328538-190992-1-git-send-email-xinfengx.zhao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjhlNWZkNzctOGMwNC00YmFjLThlNTktY2MyNjU5NDZmMmIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibHpcL0t1dzJTUnp3cE15cmw0aEw2ZlZmMUVCWXVvYVYrSFwvbmZoUzlsRVF2ZzUwUitsbVVaaWowRjd4RDRacDMrIn0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] tests: fix the issue of using scapy to send 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xinfeng Zhao > Sent: Wednesday, August 21, 2019 3:16 AM > To: dts@dpdk.org > Cc: Zhao, XinfengX > Subject: [dts] [PATCH] tests: fix the issue of using scapy to send packet >=20 > failed to send packet using the method, because there should be delayed a > few seconds bettwen sending packet and exiting scapy, and now instead it > with dts scapy method >=20 > Signed-off-by: Xinfeng Zhao > --- > tests/TestSuite_vlan_ethertype_config.py | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) >=20 > diff --git a/tests/TestSuite_vlan_ethertype_config.py > b/tests/TestSuite_vlan_ethertype_config.py > index 1cb1083..727067f 100644 > --- a/tests/TestSuite_vlan_ethertype_config.py > +++ b/tests/TestSuite_vlan_ethertype_config.py > @@ -46,7 +46,6 @@ from pmd_output import PmdOutput from scapy.utils > import struct, socket, wrpcap, rdpcap from scapy.layers.inet import Ethe= r, IP, > TCP, UDP, ICMP from scapy.layers.l2 import Dot1Q, ARP, GRE -from > scapy.sendrecv import sendp from settings import DPDK_RXMODE_SETTING > from settings import load_global_setting >=20 > @@ -145,11 +144,10 @@ class TestVlanEthertypeConfig(TestCase): > out =3D self.tester.send_expect("hexdump -ve '%s' '%s' |sed > 's/8100000181000002/%s/' |xxd -r -p > '%s'" % ( > fmt, self.tpid_ori_file, replace, self.tpid_new_file), "= # ") >=20 > - self.tester.send_expect("scapy", ">>> ") > - self.tester.send_expect( > - "pkt=3Drdpcap('%s')" % self.tpid_new_file, ">>> ") > - self.tester.send_expect("sendp(pkt, iface=3D'%s')" % self.txItf,= ">>> ") > - self.tester.send_expect("quit()", "# ") > + self.tester.scapy_foreground() > + self.tester.scapy_append("pkt=3Drdpcap('%s')" % self.tpid_new_fi= le) > + self.tester.scapy_append("sendp(pkt, iface=3D'%s')" % self.txItf= ) > + self.tester.scapy_execute() >=20 > def check_vlan_packets(self, vlan, tpid, rxItf, result=3DTrue): >=20 > -- > 2.17.1