test suite reviews and discussions
 help / color / mirror / Atom feed
From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org
Cc: Weiyuan li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1] tests/vf_offload: fix syntax errors
Date: Tue, 10 Jan 2023 15:49:38 +0800	[thread overview]
Message-ID: <20230110074938.20461-1-weiyuanx.li@intel.com> (raw)

From: Weiyuan li <weiyuanx.li@intel.com>

Scapy send package count can't have quotation marks. Otherwise, send the packet fails.

Signed-off-by: Weiyuan li <weiyuanx.li@intel.com>
---
 tests/TestSuite_vf_offload.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index a212133..329501f 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -887,7 +887,7 @@ class TestVfOffload(TestCase):
         )
 
         mac = self.vm0_testpmd.get_port_mac(0)
-        self.vm0_testpmd.execute_cmd("set verbose 1", "testpmd> ", 120)
+        self.vm0_testpmd.execute_cmd("set verbose 0", "testpmd> ", 120)
         self.vm0_testpmd.execute_cmd("set fwd csum", "testpmd>", 120)
         self.vm0_testpmd.execute_cmd("set promisc 0 on", "testpmd> ", 120)
         self.vm0_testpmd.execute_cmd("set promisc 1 on", "testpmd> ", 120)
@@ -934,7 +934,7 @@ class TestVfOffload(TestCase):
                     (
                         'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/'
                         + pkts_outer[key_outer]
-                        + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count = %s)'
+                        + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)'
                     )
                     % (mac, loading_size, tx_interface, packet_count)
                 )
@@ -952,7 +952,7 @@ class TestVfOffload(TestCase):
                         rx_stats == tx_stats
                         and all(
                             [
-                                payload_size_list == loading_size
+                                payload_size_list[j] == loading_size
                                 for j in range(packet_count)
                             ]
                         ),
@@ -994,11 +994,12 @@ class TestVfOffload(TestCase):
                     self.tester.scapy_append(
                         "from scapy.contrib.gtp import GTP_U_Header"
                     )
+                self.logger.info([mac, loading_size, tx_interface, packet_count])
                 self.tester.scapy_append(
                     (
                         'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/'
                         + pkts_outer[key_outer]
-                        + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")'
+                        + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s", count=%s)'
                     )
                     % (mac, loading_size, tx_interface, packet_count)
                 )
-- 
1.8.3.1


                 reply	other threads:[~2023-01-10  7:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230110074938.20461-1-weiyuanx.li@intel.com \
    --to=weiyuanx.li@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).