From: Jin Ling <jin.ling@intel.com>
To: dts@dpdk.org
Cc: yuan.peng@intel.com, lijuan.tu@intel.com, Jin Ling <jin.ling@intel.com>
Subject: [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result
Date: Thu, 30 Mar 2023 16:23:53 +0800 [thread overview]
Message-ID: <20230330082353.2404798-2-jin.ling@intel.com> (raw)
In-Reply-To: <20230330082353.2404798-1-jin.ling@intel.com>
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
next prev parent reply other threads:[~2023-03-30 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 8:23 [DTS][PATCH V1 0/1] uni_pkt/optimize script Jin Ling
2023-03-30 8:23 ` Jin Ling [this message]
2023-04-11 7:49 ` [DTS][PATCH V1 1/1] tests/uni_pkt: delete code for check result lijuan.tu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230330082353.2404798-2-jin.ling@intel.com \
--to=jin.ling@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
--cc=yuan.peng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).