diff mbox series

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

Message ID 20220829081706.24031-1-dukaix.yuan@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/tx_preparation: modify match string of packet content | expand

Checks

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

Commit Message

Dukai Yuan Aug. 29, 2022, 8:17 a.m. UTC
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@intel.com>
---
 tests/TestSuite_tx_preparation.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lijuan Tu Sept. 2, 2022, 1:42 a.m. UTC | #1
On Mon, 29 Aug 2022 16:17:06 +0800, Dukai Yuan <dukaix.yuan@intel.com> wrote:
> 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@intel.com>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks
diff mbox series

Patch

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!!!",