[dts][PATCH V1] tests/tx_preparation: modify match string of packet content

Dukai Yuan dukaix.yuan at intel.com
Mon Aug 29 10:17:06 CEST 2022


When send 5986 byte packet, testpmd will receive 4 1460 byte packets and 1 146 byte
packet, when use out.count("length 146"), it will retrun 5, it's worng, when use 
out.count("length 146:"), it will retrun 1 it's right.

Signed-off-by: Dukai Yuan <dukaix.yuan at intel.com>
---
 tests/TestSuite_tx_preparation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py
index 9b70699c..5b1a7cf0 100644
--- a/tests/TestSuite_tx_preparation.py
+++ b/tests/TestSuite_tx_preparation.py
@@ -171,7 +171,7 @@ class TestTX_preparation(TestCase):
                         "Failed to verify TSO correctness for large packets!!!",
                     )
                     if LastLength != 0:
-                        num = out.count("length %s" % LastLength)
+                        num = out.count("length %s:" % LastLength)
                         self.verify(
                             "length %s" % LastLength in out and num == count,
                             "Failed to verify TSO correctness for large packets!!!",
-- 
2.17.1



More information about the dts mailing list