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 74C0AA05D3 for ; Tue, 23 Apr 2019 07:10:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31FC51B4D1; Tue, 23 Apr 2019 07:10:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9201D1B4CD for ; Tue, 23 Apr 2019 07:10:17 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3N54wOh031331 for ; Mon, 22 Apr 2019 22:10:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=xqgn68qle/9bLRv0go3eu+7FPDbf9inExaeuya4a9d8=; b=I5vEH3wFy8NPNCCZbxISxH3+hCxYc5vjW8ppg2dsw0C+Q+jZMa1q32QaHp+q8G+kAcMx xn8Zpk/psFFh6f9Hbuwh5SOSN87ugLUcDjxKbI7kAvJ5Is4IMRto2mVV0bNOc/I3gzSO 8gTTmqCJSSvhFrm0QL1MHt1OTG1zZLSOzZTAhYdJQIyD8kFnhsBZrhk3m8UadVa8SjjS 45PwkGUCp2xf46nON9LVxdNP3EQ/XjjQs7fDPgpzesMxEfM6xlsa5CW8Odx7UQdt2ov5 oY/tPYLBJpVL/g5Zq4up4pY2V86+/R19IqU8sqVHtqN5rUY+EHDYoa513di6I7JpHDFu bg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2s1dm3u3fv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 22 Apr 2019 22:10:16 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 22 Apr 2019 22:10:15 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 22 Apr 2019 22:10:15 -0700 Received: from thaq.marvell.com (unknown [10.28.10.232]) by maili.marvell.com (Postfix) with ESMTP id A07BA3F7040; Mon, 22 Apr 2019 22:10:14 -0700 (PDT) From: To: CC: , , thaq Date: Tue, 23 Apr 2019 10:39:50 +0530 Message-ID: <1555996190-23344-1-git-send-email-thaq@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-22_01:, , signatures=0 Subject: [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" From: thaq 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 to support both the single/dual sockets cases. Signed-off-by: thaq --- tests/TestSuite_unit_tests_pmd_perf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): out = self.dut.send_expect("./usertools/cpu_layout.py", "#", 10) k = re.search("Core 0 (.*)", out) - result = re.findall("(\d+),", k.group()) socket_id = self.dut.ports_info[0]['port'].socket if socket_id == 0 or socket_id == -1: + result = re.findall("(\d+)", k.group()) return int(result[0]) else: + result = re.findall("(\d+),", k.group()) return int(result[1]) def test_pmd_burst(self): -- 1.8.3.1