test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lingli Chen <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: yuan.peng@intel.com, Lingli Chen <linglix.chen@intel.com>
Subject: [dts][PATCH V2 1/2] tests/queue_start_stop: modify script according to dpdk code change
Date: Fri, 16 Sep 2022 04:38:54 -0400	[thread overview]
Message-ID: <20220916083855.48856-1-linglix.chen@intel.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 5377 bytes --]

According to dpdk commit 3c4426db54fc(app/testpmd: do not poll stopped queues).
modify queue_start_stop: after set “port 0 txq 0 stop”, no print in testpmd.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
V2: modify test_plan add testpmd stop packets print.
    modify script add verify no print "ports 0 queue 0 receive " in testpmd

 test_plans/queue_start_stop_test_plan.rst | 45 +++++++++++++++++++----
 tests/TestSuite_queue_start_stop.py       | 20 +++++-----
 2 files changed, 47 insertions(+), 18 deletions(-)

diff --git a/test_plans/queue_start_stop_test_plan.rst b/test_plans/queue_start_stop_test_plan.rst
index cf660710..9780e6d1 100644
--- a/test_plans/queue_start_stop_test_plan.rst
+++ b/test_plans/queue_start_stop_test_plan.rst
@@ -29,7 +29,7 @@ To run the testpmd application in linuxapp environment with 4 lcores,
 Test Case: queue start/stop
 ---------------------------
 
-This case support PF (Intel® Ethernet 700 Series), VF (Intel® Ethernet 700 Series, 82599)
+This case support PF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series/82599), VF (Intel® Ethernet 700 Series, 82599)
 
 #. Update testpmd source code. Add the following C code in ./app/test-pmd/fwdmac.c::
 
@@ -38,12 +38,43 @@ This case support PF (Intel® Ethernet 700 Series), VF (Intel® Ethernet 700 Ser
 #. Compile testpmd again, then run testpmd.
 #. Run "set fwd mac" to set fwd type
 #. Run "start" to start fwd package
-#. Start packet generator to transmit and receive packets
+#. Start packet generator to transmit and tester port receive 4 packets
+#. Stop testpmd::
+
+    --------------------- Forward statistics for port 0  ----------------------
+    RX-packets: 4              RX-dropped: 0             RX-total: 4
+    TX-packets: 4              TX-dropped: 0             TX-total: 4
+    ----------------------------------------------------------------------------
+
 #. Run "port 0 rxq 0 stop" to stop rxq 0 in port 0
-#. Start packet generator to transmit and not receive packets
+#. Start packet generator to transmit and tester port not receive packets
+#. Stop testpmd::
+
+    ---------------------- Forward statistics for port 0  ----------------------
+    RX-packets: 4              RX-dropped: 0             RX-total: 4
+    TX-packets: 0              TX-dropped: 0             TX-total: 0
+    ----------------------------------------------------------------------------
+
 #. Run "port 0 rxq 0 start" to start rxq 0 in port 0
-#. Run "port 1 txq 1 stop" to start txq 0 in port 1
-#. Start packet generator to transmit and not receive packets but in testpmd it is a "ports 0 queue 0 received 1 packages" print
-#. Run "port 1 txq 1 start" to start txq 0 in port 1
-#. Start packet generator to transmit and receive packets
+#. Run "port 0 txq 0 stop" to stop txq 0 in port 0
+#. Start packet generator to transmit and tester port not receive packets
+#. Stop testpmd::
+
+    ---------------------- Forward statistics for port 0  ----------------------
+    RX-packets: 4              RX-dropped: 0             RX-total: 4
+    TX-packets: 0              TX-dropped: 0             TX-total: 0
+    ----------------------------------------------------------------------------
+
+#. Run "port 0 txq 0 start" to start txq 0 in port 0
+#. Start packet generator to transmit and tester port receive 4 packets::
+
+    in testpmd print "ports 0 queue 0 received 1 packages" * 4
+
+#. Stop testpmd::
+
+    ---------------------- Forward statistics for port 0  ----------------------
+    RX-packets: 4              RX-dropped: 0             RX-total: 4
+    TX-packets: 4              TX-dropped: 0             TX-total: 4
+    ----------------------------------------------------------------------------
+
 #. Test it again with VF
diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index 1df59a1b..b6f4ba96 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -137,17 +137,10 @@ class TestQueueStartStop(TestCase):
             out = self.dut.get_session_output()
         except Exception as e:
             raise IOError("queue start/stop forward failure: %s" % e)
-
-        if self.nic == "cavium_a063":
-            self.verify(
-                "ports 0 queue 0 receive 4 packages" in out,
-                "start queue revice package failed, out = %s" % out,
-            )
-        else:
-            self.verify(
-                "ports 0 queue 0 receive 1 packages\r\n" * 4 in out,
-                "start queue revice package failed, out = %s" % out,
-            )
+        self.verify(
+            "ports 0 queue 0 receive " not in out,
+            "start queue revice package failed, out = %s" % out,
+        )
 
         try:
             # start tx queue test
@@ -156,8 +149,13 @@ class TestQueueStartStop(TestCase):
             self.dut.send_expect("port 0 txq 0 start", "testpmd>")
             self.dut.send_expect("start", "testpmd>")
             self.check_forwarding([0, 0], self.nic)
+            out = self.dut.get_session_output()
         except Exception as e:
             raise IOError("queue start/stop forward failure: %s" % e)
+        self.verify(
+            "ports 0 queue 0 receive " in out,
+            "start queue revice package failed, out = %s" % out,
+        )
 
     def tear_down(self):
         """
-- 
2.17.1


             reply	other threads:[~2022-09-16  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16  8:38 Lingli Chen [this message]
2022-09-16  8:38 ` [dts][PATCH V2 2/2] tests/dynamic_queue: " Lingli Chen
2022-09-19  3:12   ` Li, WeiyuanX

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=20220916083855.48856-1-linglix.chen@intel.com \
    --to=linglix.chen@intel.com \
    --cc=dts@dpdk.org \
    --cc=yuan.peng@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).