[V1] tests/rxtx_offload: delete check times

Message ID 20220804164356.133220-1-songx.jiale@intel.com (mailing list archive)
State Superseded
Headers
Series [V1] tests/rxtx_offload: delete check times |

Checks

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

Commit Message

Jiale, SongX Aug. 4, 2022, 4:43 p.m. UTC
  optimize script, the number of TX packages can not reach the specified
number within the specified times.therefore, delete the check times.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_rxtx_offload.py | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
  

Patch

diff --git a/tests/TestSuite_rxtx_offload.py b/tests/TestSuite_rxtx_offload.py
index c60bb68b..c3c9bde1 100644
--- a/tests/TestSuite_rxtx_offload.py
+++ b/tests/TestSuite_rxtx_offload.py
@@ -228,11 +228,11 @@  class TestRxTx_Offload(TestCase):
                 )
             i = i + 1
 
-    def verify_packets_increasing(self, rxtx="tx", count=2):
+    def verify_packets_increasing(self, rxtx="tx"):
         # Verify RXTX-packets increasing on each ports, check count < 25
         out1 = self.dut.send_expect("show port stats all", "testpmd> ")
-        i = 0
-        while i < count:
+        i = 1
+        while i:
             if rxtx == "tx":
                 pks_l1 = re.findall(r"TX-packets: (\w+)", out1)
                 time.sleep(15)
@@ -241,8 +241,6 @@  class TestRxTx_Offload(TestCase):
                 self.logger.info(
                     "Times="
                     + str(i)
-                    + ", count="
-                    + str(count)
                     + ", pks2_cur="
                     + str(pks_l2)
                     + ", pks1_before="
@@ -252,12 +250,10 @@  class TestRxTx_Offload(TestCase):
                     self.verify(
                         int(pks_l2[index]) > int(pks_l1[index]), "TX-packets hang"
                     )
-                if int(pks_l1[index]) < 100000000 or int(pks_l2[index]) < 100000000:
-                    count += 1
-            i += 1
-            if count > 25:
-                self.verify(False, "Check count timeout")
-                break
+                if int(pks_l2[index]) < 100000000:
+                    i += 1
+                else:
+                    break
 
     def get_queue_number(self, packet):
         """