diff mbox series

[V1,2/2] tests/*: modify script according to dpdk code change

Message ID 20220624071704.6651-2-linglix.chen@intel.com (mailing list archive)
State Changes Requested
Headers show
Series [V1,1/2] test_plans/*: modify script according to dpdk code change | expand

Checks

Context Check Description
ci/Intel-dts-suite-test success Testing OK
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-format-test success Testing OK

Commit Message

Lingli Chen June 24, 2022, 7:17 a.m. UTC
According to dpdk commit 3c4426db54fc(app/testpmd: do not poll stopped queues)
dynamic_queue: Tx stopped queue not display
queue_start_stop: after set “port 0 txq 0 stop”, no print in testpmd

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 tests/TestSuite_dynamic_queue.py    | 15 ++++++++-------
 tests/TestSuite_queue_start_stop.py | 12 ------------
 2 files changed, 8 insertions(+), 19 deletions(-)

Comments

Tu, Lijuan June 29, 2022, 2:09 a.m. UTC | #1
> -        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,
> -            )

The test plan says "Start testpmd, then stop, check this stopped queue not display". 
No output doesn't mean no verification.
diff mbox series

Patch

diff --git a/tests/TestSuite_dynamic_queue.py b/tests/TestSuite_dynamic_queue.py
index ebbe869c..5a826bd1 100644
--- a/tests/TestSuite_dynamic_queue.py
+++ b/tests/TestSuite_dynamic_queue.py
@@ -163,13 +163,14 @@  class TestDynamicQueue(TestCase):
             out = self.dut_testpmd.execute_cmd("stop")
             tx_num = qringsize - 1
 
-            if self.nic in ["cavium_a063", "cavium_a064"]:
-                self.verify("TX-packets: 0" in out, "Fail to stop txq at runtime")
-            else:
-                # Check Tx stopped queue only transmits qringsize-1 packets
-                self.verify(
-                    "TX-packets: %d" % tx_num in out, "Fail to stop txq at runtime"
-                )
+            # check rxq start successful
+            self.verify("TX-packets:" in out, "txq start failed")
+            # check Tx stopped queue not display
+            self.verify(
+                "TX Port= 0/Queue={:>2}".format(queue) not in out,
+                "Fail to stop txq at runtime",
+            )
+
             if chgflag == 1:
                 chg_qringsize = qringsize % 1024 + 256
                 if qringsize == 512:
diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index 1df59a1b..f5028e8b 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -134,21 +134,9 @@  class TestQueueStartStop(TestCase):
             self.dut.send_expect("port 0 txq 0 stop", "testpmd>")
             self.dut.send_expect("start", "testpmd>")
             self.check_forwarding([0, 0], self.nic, received=False)
-            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,
-            )
-
         try:
             # start tx queue test
             print("test start rx and tx queue")