From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82F18A04C1; Fri, 22 Nov 2019 07:26:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54ECD2C30; Fri, 22 Nov 2019 07:26:47 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 08F132C28 for ; Fri, 22 Nov 2019 07:26:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 22:26:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,228,1571727600"; d="scan'208";a="408801080" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 21 Nov 2019 22:26:44 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 22:26:44 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 22:26:43 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.248]) with mapi id 14.03.0439.000; Fri, 22 Nov 2019 14:26:42 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]framework/pmd_output: fix regex to match file_prefix argument Thread-Index: AQHVm3jNzPC+T58jQUC35DcTO+I286eWxKBw Date: Fri, 22 Nov 2019 06:26:41 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB6791B@SHSMSX101.ccr.corp.intel.com> References: <1573797105-38656-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1573797105-38656-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzg0NTAxY2EtYmQ2ZS00NGM0LWJmY2QtZmRkMjExOWY3OThmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNWVHQ1VXOFRodHFpMnB6QnFZWHYybVlzenRZcG9NT3BcL3RyQjlHcXR2azJnWVZtZnBieXFjMVU4YnI2VUE1SzMifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]framework/pmd_output: fix regex to match file_prefix argument X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai > Sent: Friday, November 15, 2019 1:52 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V1]framework/pmd_output: fix regex to match > file_prefix argument >=20 > testpmd can accept eal parameter file_prefix without equal mark >=20 > Signed-off-by: Xiao Qimai > --- > framework/pmd_output.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/framework/pmd_output.py b/framework/pmd_output.py index > 03183ce..762f335 100644 > --- a/framework/pmd_output.py > +++ b/framework/pmd_output.py > @@ -110,7 +110,7 @@ class PmdOutput(): > :return: > """ > re_w_pci_str =3D '\s?-w\\s+.+?:.+?:.+?\\..+?[,.*=3D\d+]?\s|\s?- > w\\s+.+?:.+?\\..+?[,.*=3D\d+]?\s' > - re_file_prefix_str =3D '--file-prefix=3D.+?\s' > + re_file_prefix_str =3D '--file-prefix[=3D\s+].+\s' > re_b_pci_str =3D '\s?-b\\s+.+?:.+?:.+?\\..+?[,.*=3D\d+]?\s|\s?- > b\\s+.+?:.+?\\..+?[,.*=3D\d+]?\s' > eal_param =3D eal_param + ' ' > # pci_str_list eg: ['-w 0000:1a:00.0 ', '-w 0000:1a:00.1,queue= -num-per- > vf=3D4 ', '-w 0000:aa:bb.1,queue-num-per-vf=3D4 '] > @@ -139,8 +139,8 @@ class PmdOutput(): >=20 > file_prefix =3D '' > if file_prefix_str: > - tmp =3D file_prefix_str[0].split('=3D') > - file_prefix =3D tmp[1].strip() > + tmp =3D re.split('(=3D|\s+)', file_prefix_str[-1].strip()) > + file_prefix =3D tmp[-1].strip() >=20 > other_eal_str =3D re.sub(re_w_pci_str, '', eal_param) > other_eal_str =3D re.sub(re_b_pci_str, '', other_eal_str) > -- > 2.17.1