[dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex)
thaq at marvell.com
thaq at marvell.com
Tue Apr 23 07:09:50 CEST 2019
From: thaq <thaq at marvell.com>
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 <thaq at marvell.com>
---
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
More information about the dts
mailing list