test suite reviews and discussions
 help / color / mirror / Atom feed
From: Dukai Yuan <dukaix.yuan@intel.com>
To: dts@dpdk.org
Cc: Dukai Yuan <dukaix.yuan@intel.com>
Subject: [dts][PATCH V1] tests/multiprocess modify the regular expression
Date: Mon, 29 Aug 2022 17:44:42 +0800	[thread overview]
Message-ID: <20220829094442.25202-1-dukaix.yuan@intel.com> (raw)

I40E_10G-SFP_XL710/I40E_10G-10G_BASE_T_X722/IGC-I226_LM use re.search,return (0, 0).
Use re.findall will right.

Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
---
 tests/TestSuite_multiprocess.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
index da382a41..7cbf64c2 100644
--- a/tests/TestSuite_multiprocess.py
+++ b/tests/TestSuite_multiprocess.py
@@ -1014,10 +1014,10 @@ class TestMultiprocess(TestCase):
                 self.logger.err("Error occured:{}".format(traceback.format_exc(e)))
             finally:
                 session_obj.close()
-        res = re.search(
-            r"Port \d+\s+-\s+rx:\s+(?P<rx>\d+)\s+tx:.*PORTS", out, re.DOTALL
+        res = re.findall(
+            r"Port \d+\s+-\s+rx:\s+\d+.*?Client\s+[1]\s+-.*?tx_drop:\s+\d+", out, re.DOTALL
         )
-        rx_num = re.findall(r"Client\s+\d\s+-\s+rx:\s+(\d+)", res.group(0))
+        rx_num = re.findall(r"Client\s+\d\s+-\s+rx:\s+(\d+)", res[-1])
         for i in range(proc_num):
             self.verify(
                 int(rx_num[i]) > 0,
-- 
2.17.1


             reply	other threads:[~2022-08-29  9:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29  9:44 Dukai Yuan [this message]
2022-08-30  7:43 Dukai Yuan

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=20220829094442.25202-1-dukaix.yuan@intel.com \
    --to=dukaix.yuan@intel.com \
    --cc=dts@dpdk.org \
    /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).