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 F163DA328D for ; Tue, 22 Oct 2019 11:02:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC7881BE97; Tue, 22 Oct 2019 11:02:37 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 479C61BE95 for ; Tue, 22 Oct 2019 11:02:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 02:02:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="187820002" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 22 Oct 2019 02:02:34 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:02:33 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:02:33 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.225]) with mapi id 14.03.0439.000; Tue, 22 Oct 2019 17:02:31 +0800 From: "Tu, Lijuan" To: "Zhu, ShuaiX" , "dts@dpdk.org" CC: "Zhu, ShuaiX" Thread-Topic: [dts] [PATCH V2] tests/tso:Modify the code due to changes in the dts framework. Thread-Index: AQHVgyJpycYXhB6GQkCBn2AvKoK2aKdmaI7g Date: Tue, 22 Oct 2019 09:02:31 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB44E8C@SHSMSX101.ccr.corp.intel.com> References: <1571121481-141140-1-git-send-email-shuaix.zhu@intel.com> In-Reply-To: <1571121481-141140-1-git-send-email-shuaix.zhu@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjA0NzZkODEtOGViOC00MmFhLWI5NGEtZWIwYzY1NGVhMDdmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZEFMS1ZFdEpjdVBNNDBKbTNjK1V2UTNQSUN0WlNxSDVRaEt0eVk5YWxUVEU5dWRrbWp0eW5VZ1BkTU1SUUhBNSJ9 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 V2] tests/tso:Modify the code due to changes in the dts framework. 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 zhu,shuai > Sent: Tuesday, October 15, 2019 2:38 PM > To: dts@dpdk.org > Cc: Zhu, ShuaiX > Subject: [dts] [PATCH V2] tests/tso:Modify the code due to changes in the= dts > framework. >=20 > The method of modifying the function. >=20 > Signed-off-by: zhu,shuai > --- > tests/TestSuite_tso.py | 29 +++++++++++++++-------------- > 1 file changed, 15 insertions(+), 14 deletions(-) >=20 > diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index > 3ee2a21..ac94cc8 100644 > --- a/tests/TestSuite_tso.py > +++ b/tests/TestSuite_tso.py > @@ -44,7 +44,7 @@ import os > from test_case import TestCase > from settings import HEADER_SIZE > from pktgen import PacketGeneratorHelper -from packet import > load_pcapfile, save_packets > +from packet import Packet >=20 > DEFAULT_MUT =3D 1500 > TSO_MTU =3D 9000 > @@ -154,7 +154,7 @@ class TestTSO(TestCase): > """ > Execute scanner to return results > """ > - scanner_result =3D self.tester.send_expect(scanner, '#') > + scanner_result =3D self.tester.send_expect(scanner, '#', 60) > fially_result =3D re.findall(r'length( \d+)', scanner_result) > return list(fially_result) >=20 > @@ -166,23 +166,24 @@ class TestTSO(TestCase): > return self.tcpdump_scanner(scanner.format(**locals())) >=20 > def get_chksum_value_and_verify(self, dump_pcap, save_file, Nic_list= ): > - self.pks =3D load_pcapfile(dump_pcap) > + packet =3D Packet() > + self.pks =3D packet.read_pcapfile(dump_pcap, self.tester) > for i in range(len(self.pks)): > - self.pks =3D load_pcapfile(dump_pcap) > + self.pks =3D packet.read_pcapfile(dump_pcap, self.tester) > pks =3D self.pks[i] > - out =3D pks.pktgen.pkt.show > + out =3D pks.show > chksum_list =3D re.findall(r'chksum=3D(0x\w+)', str(out)) > - pks.pktgen.pkt['IP'].chksum=3DNone > + pks['IP'].chksum=3DNone > if "VXLAN" in str(out): > - pks.pktgen.pkt['UDP'].chksum=3DNone > - pks.pktgen.pkt['VXLAN']['IP'].chksum=3DNone > - pks.pktgen.pkt['VXLAN']['TCP'].chksum=3DNone > + pks['UDP'].chksum=3DNone > + pks['VXLAN']['IP'].chksum=3DNone > + pks['VXLAN']['TCP'].chksum=3DNone > elif "GRE" in str(out): > - pks.pktgen.pkt['GRE']['IP'].chksum=3DNone > - pks.pktgen.pkt['GRE']['TCP'].chksum=3DNone > - save_packets(self.pks, save_file) > - self.pks1 =3D load_pcapfile(save_file) > - out1 =3D self.pks1[i].pktgen.pkt.show > + pks['GRE']['IP'].chksum=3DNone > + pks['GRE']['TCP'].chksum=3DNone > + packet.save_pcapfile(self.tester, filename=3Dsave_file) > + self.pks1 =3D packet.read_pcapfile(save_file, self.tester) > + out1 =3D self.pks1[i].show > chksum_list1 =3D re.findall(r'chksum=3D(0x\w+)', str(out1)) > self.tester.send_expect("rm -rf %s" % save_file, "#") > if self.nic in Nic_list and "VXLAN" in str(out): > -- > 2.17.2