From patchwork Sun Oct 9 05:04:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuan, DukaiX" X-Patchwork-Id: 117714 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 944A9A0542; Sun, 9 Oct 2022 07:08:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D026400D5; Sun, 9 Oct 2022 07:08:51 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9A89940042 for ; Sun, 9 Oct 2022 07:08:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665292130; x=1696828130; h=from:to:cc:subject:date:message-id; bh=+Y/V/fpqMyzcg+fF/Pe/isqyPPvf/ZZNpjza4PqC/nM=; b=GRDUvUSLKbFKByyUJ3zu9iAOhqh1VptOYf6I4OhvZaKzrQzRG/OOlnzR u4/4ueZ8BLPR+IU5wzkCd8WgIjnQP6dJ9sDpsM6kFyCOYcv+lFHdcM9O9 +pJ8BlpJkHUoaGuvl3KThCEuUdzAeTRssMb2LaxtKwrvI+BPkdbz8x44z c4YsOb2LBCLhYJmZcrgxQ20JWlVVfCH7BBc9FWmSYjAjf+pUNMk8HxO5s kAJCNQwpdhYz1Ut8L/+tP4huUrD99V2PVCjLiCShLhAWBEk0s5sGm8DnS 9MaA8vJMETV67SnMMvZDTu2ze8fpGum8nLyGPQphHUiClNVv1wW7CoCtZ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="284399032" X-IronPort-AV: E=Sophos;i="5.95,170,1661842800"; d="scan'208";a="284399032" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2022 22:08:49 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10494"; a="627914485" X-IronPort-AV: E=Sophos;i="5.95,170,1661842800"; d="scan'208";a="627914485" Received: from unknown (HELO localhost.localdomain) ([10.239.252.15]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2022 22:08:48 -0700 From: Dukai Yuan To: dts@dpdk.org Cc: Dukai Yuan Subject: [dts][PATCH V3] tests/multiprocess modify the regular expression Date: Sun, 9 Oct 2022 13:04:18 +0800 Message-Id: <20221009050418.15804-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 Reviewed-by: Wei Ling --- 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,