test suite reviews and discussions
 help / color / mirror / Atom feed
* [DTS][PATCH V1 0/1] uni_pkt/optimize script
@ 2023-03-30  8:23 Jin Ling
  2023-03-30  8:23 ` [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result Jin Ling
  0 siblings, 1 reply; 4+ messages in thread
From: Jin Ling @ 2023-03-30  8:23 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, lijuan.tu, Jin Ling

Delete code to check the hw flag only in the output.

Jin Ling (1):
  tests/uni_pkt: delete code for check result

 tests/TestSuite_uni_pkt.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

--
2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result
  2023-03-30  8:23 [DTS][PATCH V1 0/1] uni_pkt/optimize script Jin Ling
@ 2023-03-30  8:23 ` Jin Ling
  2023-04-11  7:49   ` lijuan.tu
  0 siblings, 1 reply; 4+ messages in thread
From: Jin Ling @ 2023-03-30  8:23 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, lijuan.tu, Jin Ling

hw ptype shows the info of NIC descriptor, and sw ptype shows the info of mbuf, both of them can indicate the packet type was detected, so delete the code of check hw ptype only.

Signed-off-by: Jin Ling <jin.ling@intel.com>
---
 tests/TestSuite_uni_pkt.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py
index abeb3c35..e883b84d 100644
--- a/tests/TestSuite_uni_pkt.py
+++ b/tests/TestSuite_uni_pkt.py
@@ -16,7 +16,6 @@ translate the offloaded packet types into these 7 fields of information, for
 user applications
 """

-import re
 import time

 import framework.utils as utils
@@ -60,13 +59,10 @@ class TestUniPacket(TestCase):
             pkt = Packet(pkt_type=pkt_type)
             pkt.send_pkt(self.tester, tx_port=self.tester_iface, count=4)
             out = self.dut.get_session_output(timeout=2)
-            pattern = re.compile(r"hw ptype: (.*?)sw")
-            hw_ptype = re.findall(pattern, out)
             for pkt_layer_name in pkt_names:
-                for tag in hw_ptype:
-                    if pkt_layer_name.strip() not in tag:
-                        print((utils.RED("Fail to detect %s" % pkt_layer_name)))
-                        raise VerifyFailure("Failed to detect %s" % pkt_layer_name)
+                if pkt_layer_name not in out:
+                    print((utils.RED("Fail to detect %s" % pkt_layer_name)))
+                    raise VerifyFailure("Failed to detect %s" % pkt_layer_name)
             print((utils.GREEN("Detected %s successfully" % pkt_type)))

     def test_l2pkt_detect(self):
--
2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result
  2023-03-30  8:23 ` [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result Jin Ling
@ 2023-04-11  7:49   ` lijuan.tu
  0 siblings, 0 replies; 4+ messages in thread
From: lijuan.tu @ 2023-04-11  7:49 UTC (permalink / raw)
  To: dts, Jin Ling; +Cc: yuan.peng, lijuan.tu, Jin Ling

On Thu, 30 Mar 2023 16:23:53 +0800, Jin Ling <jin.ling@intel.com> wrote:
> hw ptype shows the info of NIC descriptor, and sw ptype shows the info of mbuf, both of them can indicate the packet type was detected, so delete the code of check hw ptype only.
> 
> Signed-off-by: Jin Ling <jin.ling@intel.com>


Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [DTS][PATCH V1 0/1] uni_pkt/optimize script
@ 2023-03-07  4:21 Jin Ling
  0 siblings, 0 replies; 4+ messages in thread
From: Jin Ling @ 2023-03-07  4:21 UTC (permalink / raw)
  To: dts; +Cc: yuan.peng, lijuan.tu, Jin Ling

Add code to check the hw flag only in the output.

Jin Ling (1):
  tests/uni_pkt: optimize code for check result

 tests/TestSuite_uni_pkt.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--
2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-11  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30  8:23 [DTS][PATCH V1 0/1] uni_pkt/optimize script Jin Ling
2023-03-30  8:23 ` [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result Jin Ling
2023-04-11  7:49   ` lijuan.tu
  -- strict thread matches above, loose matches on Subject: below --
2023-03-07  4:21 [DTS][PATCH V1 0/1] uni_pkt/optimize script Jin Ling

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).