* [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex)
@ 2019-04-23 5:09 thaq
2019-04-23 20:40 ` Tu, Lijuan
0 siblings, 1 reply; 2+ messages in thread
From: thaq @ 2019-04-23 5:09 UTC (permalink / raw)
To: dts; +Cc: fmasood, avijay, thaq
From: thaq <thaq@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex)
2019-04-23 5:09 [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex) thaq
@ 2019-04-23 20:40 ` Tu, Lijuan
0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-04-23 20:40 UTC (permalink / raw)
To: thaq, dts; +Cc: fmasood, avijay
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 <thaq@marvell.com>
> Subject: [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to
> match Single socket CPU list using Regular-Expression(Regex)
>
> From: thaq <thaq@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-23 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 5:09 [dts] [PATCH] TestSuite_unit_tests_pmd_perf.py:Added support to match Single socket CPU list using Regular-Expression(Regex) thaq
2019-04-23 20:40 ` Tu, Lijuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).