* Re: [dts] [PATCH V1] tests/tso:Modify the code due to changes in the dts framework.
2019-10-15 6:01 [dts] [PATCH V1] tests/tso:Modify the code due to changes in the dts framework zhu,shuai
@ 2019-10-15 5:57 ` Zhu, WenhuiX
0 siblings, 0 replies; 2+ messages in thread
From: Zhu, WenhuiX @ 2019-10-15 5:57 UTC (permalink / raw)
To: Zhu, ShuaiX, dts; +Cc: Zhu, ShuaiX
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dts] [PATCH V1] tests/tso:Modify the code due to changes in the dts framework.
@ 2019-10-15 6:01 zhu,shuai
2019-10-15 5:57 ` Zhu, WenhuiX
0 siblings, 1 reply; 2+ messages in thread
From: zhu,shuai @ 2019-10-15 6:01 UTC (permalink / raw)
To: dts; +Cc: zhu,shuai
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-15 5:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 6:01 [dts] [PATCH V1] tests/tso:Modify the code due to changes in the dts framework zhu,shuai
2019-10-15 5:57 ` Zhu, WenhuiX
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).