From patchwork Sun Oct 9 05:39:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, DukaiX" X-Patchwork-Id: 117715 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB20DA0542; Sun, 9 Oct 2022 07:44:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F3D9400D5; Sun, 9 Oct 2022 07:44:09 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C0FC140042 for ; Sun, 9 Oct 2022 07:44:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665294248; x=1696830248; h=from:to:cc:subject:date:message-id; bh=ZDrNpnmInAU1e/1FRJ4pbZiN++0BUNcSJuG/r7JMYsQ=; b=Q0OlN/FIQknJMv64NsQYRZTQDZJK7lVX9sGjYwjHvTCvnmawUwDhh0m/ aJp64PDyVTCKGg15BbjdDpT8oTtfQTQ9cIkMQXTxukIKDSHOJ2l+Nc2Eh 43dn6jyg/+DyQQdmeeYVcTEoJB+EwyOfK6b5XnVJAwdJDqHhNKhbfP+lY S/Wu0TaFFVCXJyLdKtLRpv9utC1TFlhc/iUNoWqH1v0yqfDlzL+7nAlwz 8/+VxJKK5K365c1TJITH7/6vDuB03Zcokcd1cvsxyZWG3SAYbT+xtZyu9 FDxzKipsgv6s6Xw1U2dnEmH5s0vpXfS16ND21Lb84SvXNcHiO7v4CHt7R w==; X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="330483306" X-IronPort-AV: E=Sophos;i="5.95,170,1661842800"; d="scan'208";a="330483306" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2022 22:44:07 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="730144712" X-IronPort-AV: E=Sophos;i="5.95,170,1661842800"; d="scan'208";a="730144712" Received: from unknown (HELO localhost.localdomain) ([10.239.252.15]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2022 22:44:06 -0700 From: Dukai Yuan To: dts@dpdk.org Cc: Dukai Yuan Subject: [dts][PATCH V2] tests/multiprocess modify the regular expression Date: Sun, 9 Oct 2022 13:39:52 +0800 Message-Id: <20221009053952.16044-1-dukaix.yuan@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 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 --- tests/TestSuite_multiprocess.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py index da382a41..4fdc8c27 100644 --- a/tests/TestSuite_multiprocess.py +++ b/tests/TestSuite_multiprocess.py @@ -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\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,