test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Zhu, WenhuiX" <wenhuix.zhu@intel.com>
To: "Zhu, ShuaiX" <shuaix.zhu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Zhu, ShuaiX" <shuaix.zhu@intel.com>
Subject: Re: [dts] [PATCH V1] tests/tso:Modify the code due to changes in the	dts framework.
Date: Tue, 15 Oct 2019 05:57:40 +0000	[thread overview]
Message-ID: <E08767FB2CE10642B6780736EAC070F6049E0C86@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1571119293-140221-1-git-send-email-shuaix.zhu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2842 bytes --]


Tested-by: Zhu, WenhuiX <wenhuix.zhu@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhu,shuai
Sent: Tuesday, October 15, 2019 2:02 PM
To: dts@dpdk.org
Cc: Zhu, ShuaiX <shuaix.zhu@intel.com>
Subject: [dts] [PATCH V1] tests/tso:Modify the code due to changes in the dts framework.

The method of modifying the function.

Signed-off-by: zhu,shuai <shuaix.zhu@intel.com>
---
 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


[-- Attachment #2: TestTSO.LOG --]
[-- Type: application/octet-stream, Size: 669618 bytes --]

      reply	other threads:[~2019-10-15  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  6:01 zhu,shuai
2019-10-15  5:57 ` Zhu, WenhuiX [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E08767FB2CE10642B6780736EAC070F6049E0C86@shsmsx102.ccr.corp.intel.com \
    --to=wenhuix.zhu@intel.com \
    --cc=dts@dpdk.org \
    --cc=shuaix.zhu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).