test suite reviews and discussions
 help / color / mirror / Atom feed
From: xizhan4x <xix.zhang@intel.com>
To: dts@dpdk.org
Cc: xizhan4x <xix.zhang@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_checksum_offload:Fix package error
Date: Wed, 23 Sep 2020 13:16:32 +0800	[thread overview]
Message-ID: <1600838192-16940-1-git-send-email-xix.zhang@intel.com> (raw)

Fix package error and add vxlan Tunnel

Signed-off-by: xizhan4x <xix.zhang@intel.com>
---
 tests/TestSuite_checksum_offload.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 8f212cb..c917a15 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -129,6 +129,7 @@ class TestChecksumOffload(TestCase):
 
     def checksum_enablehw(self, port):
         self.dut.send_expect("port stop all", "testpmd>")
+        self.dut.send_expect("rx_vxlan_port add 4789 0 ", "testpmd>")
         self.dut.send_expect("csum set ip hw %d" % port, "testpmd>")
         self.dut.send_expect("csum set udp hw %d" % port, "testpmd>")
         self.dut.send_expect("csum set tcp hw %d" % port, "testpmd>")
@@ -685,7 +686,6 @@ class TestChecksumOffload(TestCase):
             self.result_table_print()
 
     def test_hardware_checksum_check_ip_rx(self):
-        self.dut.send_expect("start", "testpmd>")
         self.tester.send_expect("scapy", ">>>")
         self.checksum_enablehw(self.dut_ports[0])
         self.dut.send_expect("start", "testpmd>")
@@ -791,8 +791,9 @@ class TestChecksumOffload(TestCase):
 
         # Tunneled
         # VXLAN
+        VXLAN_l4_protos=['UDP']
         for l3 in l3_protos:
-            for l4 in l4_protos:
+            for l4 in VXLAN_l4_protos:
                 for outer_arg in "", "chksum=0xf":
                     for inner_arg in "", "chksum=0xf":
                         for flag in "PKT_RX_L4_CKSUM_", "PKT_RX_OUTER_L4_CKSUM_":
@@ -801,8 +802,8 @@ class TestChecksumOffload(TestCase):
                             else:  # flag == PKT_RX_OUTER_L4_CKSUM_
                                 should_pass = outer_arg == ""
                             vf = self.send_pkt_expect_good_bad_from_flag_catch_failure(
-                                f"eth/{l3}()/{l4}({outer_arg})/VXLAN()/{l3}()/"
-                                f"{l4}(chksum={inner_arg})/('X'*50)",
+                                f"eth/{l3}()/{l4}(dport=4789,{outer_arg})/VXLAN()/eth/{l3}()/"
+                                f"{l4}({inner_arg})/('X'*50)",
                                 flag, f"{l3}/{l4}/VXLAN/{l3}/{l4}",
                                 should_pass=should_pass)
 
@@ -846,7 +847,7 @@ class TestChecksumOffload(TestCase):
         #                             if vf is not None:
         #                                 verification_errors.append(vf)
 
-        self.tester.send_expect("quit", "#")
+        self.tester.send_expect("quit()", "#")
         self.dut.send_expect("stop", "testpmd>")
 
         for err in verification_errors:
@@ -871,7 +872,7 @@ class TestChecksumOffload(TestCase):
         packet_file_path = "/tmp/test_hardware_checksum_check_l4_tx_packets.pcap"
         capture_file_path = "/tmp/tester/" + capture_file_name
 
-        self.tester.send_expect(f"tcpdump -i {iface} -s 65535 -w {capture_file_path} &", "# ")
+        self.tester.send_expect(f"tcpdump -i '{iface}' -s 65535 -w {capture_file_path} &", "# ")
 
         wrpcap(packet_file_path, packets)
         self.tester.session.copy_file_to(packet_file_path, packet_file_path)
-- 
1.8.3.1


             reply	other threads:[~2020-09-23  5:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  5:16 xizhan4x [this message]
2020-09-23  5:35 ` Zhang, XiX
2020-09-29  1:29   ` Ma, LihongX
2020-10-12  8:15 ` Tu, Lijuan

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=1600838192-16940-1-git-send-email-xix.zhang@intel.com \
    --to=xix.zhang@intel.com \
    --cc=dts@dpdk.org \
    /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).