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 81E91A2EFC for ; Tue, 15 Oct 2019 07:56:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E3051C22C; Tue, 15 Oct 2019 07:56:22 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 21CFA1C223 for ; Tue, 15 Oct 2019 07:56:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 22:56:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,298,1566889200"; d="scan'208";a="208111674" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 14 Oct 2019 22:56:19 -0700 From: "zhu,shuai" To: dts@dpdk.org Cc: "zhu,shuai" Date: Tue, 15 Oct 2019 14:01:33 +0800 Message-Id: <1571119293-140221-1-git-send-email-shuaix.zhu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] 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" The method of modifying the function. Signed-off-by: zhu,shuai --- tests/TestSuite_tso.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py index 3ee2a21..8d721f9 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 DEFAULT_MUT = 1500 TSO_MTU = 9000 @@ -166,23 +166,24 @@ class TestTSO(TestCase): return self.tcpdump_scanner(scanner.format(**locals())) def get_chksum_value_and_verify(self, dump_pcap, save_file, Nic_list): - self.pks = load_pcapfile(dump_pcap) + packet = Packet() + self.pks = packet.read_pcapfile(dump_pcap, self.tester) for i in range(len(self.pks)): - self.pks = load_pcapfile(dump_pcap) + self.pks = packet.read_pcapfile(dump_pcap, self.tester) pks = self.pks[i] - out = pks.pktgen.pkt.show + out = pks.show chksum_list = re.findall(r'chksum=(0x\w+)', str(out)) - pks.pktgen.pkt['IP'].chksum=None + pks['IP'].chksum=None if "VXLAN" in str(out): - pks.pktgen.pkt['UDP'].chksum=None - pks.pktgen.pkt['VXLAN']['IP'].chksum=None - pks.pktgen.pkt['VXLAN']['TCP'].chksum=None + pks['UDP'].chksum=None + pks['VXLAN']['IP'].chksum=None + pks['VXLAN']['TCP'].chksum=None elif "GRE" in str(out): - pks.pktgen.pkt['GRE']['IP'].chksum=None - pks.pktgen.pkt['GRE']['TCP'].chksum=None - save_packets(self.pks, save_file) - self.pks1 = load_pcapfile(save_file) - out1 = self.pks1[i].pktgen.pkt.show + pks['GRE']['IP'].chksum=None + pks['GRE']['TCP'].chksum=None + packet.save_pcapfile(self.tester, filename=save_file) + self.pks1 = packet.read_pcapfile(save_file, self.tester) + out1 = self.pks1[i].show chksum_list1 = re.findall(r'chksum=(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