[V3] tests/multiprocess modify the regular expression
Checks
Commit Message
On some NIC(I40E_10G-10G_BASE_T_X722/I40E_10G-SFP_X722/I40E_40G-QSFP_A), the old regular expression cannot match the expected result, modify the regular expression.
Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
---
tests/TestSuite_multiprocess.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Comments
> -----Original Message-----
> From: Dukai Yuan <dukaix.yuan@intel.com>
> Sent: Sunday, October 9, 2022 1:04 PM
> To: dts@dpdk.org
> Cc: Yuan, DukaiX <dukaix.yuan@intel.com>
> Subject: [dts][PATCH V3] tests/multiprocess modify the regular expression
>
> On some NIC(I40E_10G-10G_BASE_T_X722/I40E_10G-SFP_X722/I40E_40G-
> QSFP_A), the old regular expression cannot match the expected result,
> modify the regular expression.
>
> Signed-off-by: Dukai Yuan <dukaix.yuan@intel.com>
> ---
Reviewed-by: Wei Ling <weix.ling@intel.com>
@@ -1014,10 +1014,12 @@ 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,