From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 62B73A05D3 for ; Tue, 23 Apr 2019 22:40:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 051CD1B3B9; Tue, 23 Apr 2019 22:40:29 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 9E9481B1FE for ; Tue, 23 Apr 2019 22:40:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 13:40:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,387,1549958400"; d="scan'208";a="167251666" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 23 Apr 2019 13:40:15 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 23 Apr 2019 13:40:15 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 23 Apr 2019 13:40:15 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.39]) with mapi id 14.03.0415.000; Wed, 24 Apr 2019 04:40:13 +0800 From: "Tu, Lijuan" To: "thaq@marvell.com" , "dts@dpdk.org" CC: "fmasood@marvell.com" , "avijay@marvell.com" Thread-Topic: [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex) Thread-Index: AQHU+ZLv/7QVud/YykGpNYDqDy8efqZKNlDw Date: Tue, 23 Apr 2019 20:40:12 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA659E5@SHSMSX101.ccr.corp.intel.com> References: <1555996190-23344-1-git-send-email-thaq@marvell.com> In-Reply-To: <1555996190-23344-1-git-send-email-thaq@marvell.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.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmI4MTY5OTYtOGY5OS00YzkyLWEzOWMtZjBjODA4Y2NjOWFjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNFBuUXArVHN6Yit4ZTBTWHA4TFkxT1BLbEV3SUlweFFzZVVTOFJBVEFiY0NaU1J6SGpDVW5hTTdmMysxVjVScyJ9 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] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex) 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 thaq@marvell.com > Sent: Monday, April 22, 2019 10:10 PM > To: dts@dpdk.org > Cc: fmasood@marvell.com; avijay@marvell.com; thaq > Subject: [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to > match Single socket CPU list using Regular-Expression(Regex) >=20 > From: thaq >=20 > Cores listed using "/usertools/cpu_layout.py" scripts is based on the > socket/cores. > Currently RE.match "match String expression" matchs only dual socket cpu > list, Incase case of single socket RE.match "string" fails. So modifyed t= o > support both the single/dual sockets cases. >=20 > Signed-off-by: thaq > --- > tests/TestSuite_unit_tests_pmd_perf.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/TestSuite_unit_tests_pmd_perf.py > b/tests/TestSuite_unit_tests_pmd_perf.py > index 6938839..0d332bf 100644 > --- a/tests/TestSuite_unit_tests_pmd_perf.py > +++ b/tests/TestSuite_unit_tests_pmd_perf.py > @@ -92,11 +92,12 @@ class TestUnitTestsPmdPerf(TestCase): >=20 > out =3D self.dut.send_expect("./usertools/cpu_layout.py", "#", 10= ) > k =3D re.search("Core 0 (.*)", out) > - result =3D re.findall("(\d+),", k.group()) > socket_id =3D self.dut.ports_info[0]['port'].socket > if socket_id =3D=3D 0 or socket_id =3D=3D -1: > + result =3D re.findall("(\d+)", k.group()) > return int(result[0]) > else: > + result =3D re.findall("(\d+),", k.group()) > return int(result[1]) >=20 > def test_pmd_burst(self): > -- > 1.8.3.1