test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1] tests/unit_tests_pmd_perf: modify app cmd according to dpdk change
@ 2020-02-12  7:43 malihong
  2020-02-13  1:19 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: malihong @ 2020-02-12  7:43 UTC (permalink / raw)
  To: dts; +Cc: malihong

Signed-off-by: malihong <lihongx.ma@intel.com>
---
 tests/TestSuite_unit_tests_pmd_perf.py | 29 +++++++-------------------
 1 file changed, 7 insertions(+), 22 deletions(-)

diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
index 6ecd993..2c932bb 100644
--- a/tests/TestSuite_unit_tests_pmd_perf.py
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -85,29 +85,14 @@ class TestUnitTestsPmdPerf(TestCase):
         """
         pass
 
-    def get_core_from_socket(self):
-       """
-       select  the port and lcores from same socket.
-       """
-    
-       out = self.dut.send_expect("./usertools/cpu_layout.py", "#", 10)
-       k = re.search("Core 0 (.*)", out)
-       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):
         """
         Run pmd stream control mode burst test case.
         """
 
-        self.core = self.get_core_from_socket()
-        eal_params = self.dut.create_eal_parameters()
-        self.dut.send_expect("./app/test/test %s --lcores='%d-%d'" % (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
+        socket_id = self.dut.ports_info[0]['port'].socket
+        eal_params = self.dut.create_eal_parameters(socket=socket_id)
+        self.dut.send_expect("./app/test/test %s" % (eal_params), "R.*T.*E.*>.*>", 60)
         for mode in self.burst_ctlmodes:
             self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10)
             out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120)
@@ -124,18 +109,18 @@ class TestUnitTestsPmdPerf(TestCase):
         Run pmd stream control mode continues test case.
         """
         
-        self.core = self.get_core_from_socket()
         self.table_header = ['Mode']
         self.table_header += self.anchors
         self.result_table_create(self.table_header)
-        eal_params = self.dut.create_eal_parameters()
+        socket_id = self.dut.ports_info[0]['port'].socket
+        eal_params = self.dut.create_eal_parameters(socket=socket_id)
         print((self.table_header))
 
         for mode in self.rxtx_modes:
             if mode is "scalar":
-                self.dut.send_expect("./app/test/test_scalar %s --lcores='%d-%d'" % (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
+                self.dut.send_expect("./app/test/test_scalar %s " % (eal_params), "R.*T.*E.*>.*>", 60)
             else:
-                self.dut.send_expect("./app/test/test %s --lcores='%d-%d'" % (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
+                self.dut.send_expect("./app/test/test %s " % (eal_params), "R.*T.*E.*>.*>", 60)
 
             table_row = [mode]
             self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10)
-- 
2.17.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] tests/unit_tests_pmd_perf: modify app cmd according to dpdk change
  2020-02-12  7:43 [dts] [PATCH V1] tests/unit_tests_pmd_perf: modify app cmd according to dpdk change malihong
@ 2020-02-13  1:19 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-02-13  1:19 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of malihong
> Sent: Wednesday, February 12, 2020 3:43 PM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/unit_tests_pmd_perf: modify app cmd
> according to dpdk change
> 
> Signed-off-by: malihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_unit_tests_pmd_perf.py | 29 +++++++-------------------
>  1 file changed, 7 insertions(+), 22 deletions(-)
> 
> diff --git a/tests/TestSuite_unit_tests_pmd_perf.py
> b/tests/TestSuite_unit_tests_pmd_perf.py
> index 6ecd993..2c932bb 100644
> --- a/tests/TestSuite_unit_tests_pmd_perf.py
> +++ b/tests/TestSuite_unit_tests_pmd_perf.py
> @@ -85,29 +85,14 @@ class TestUnitTestsPmdPerf(TestCase):
>          """
>          pass
> 
> -    def get_core_from_socket(self):
> -       """
> -       select  the port and lcores from same socket.
> -       """
> -
> -       out = self.dut.send_expect("./usertools/cpu_layout.py", "#", 10)
> -       k = re.search("Core 0 (.*)", out)
> -       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):
>          """
>          Run pmd stream control mode burst test case.
>          """
> 
> -        self.core = self.get_core_from_socket()
> -        eal_params = self.dut.create_eal_parameters()
> -        self.dut.send_expect("./app/test/test %s --lcores='%d-%d'" %
> (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> +        socket_id = self.dut.ports_info[0]['port'].socket
> +        eal_params = self.dut.create_eal_parameters(socket=socket_id)
> +        self.dut.send_expect("./app/test/test %s" % (eal_params),
> + "R.*T.*E.*>.*>", 60)
>          for mode in self.burst_ctlmodes:
>              self.dut.send_expect("set_rxtx_sc %s" % mode, "RTE>>", 10)
>              out = self.dut.send_expect("pmd_perf_autotest", "RTE>>", 120) @@ -
> 124,18 +109,18 @@ class TestUnitTestsPmdPerf(TestCase):
>          Run pmd stream control mode continues test case.
>          """
> 
> -        self.core = self.get_core_from_socket()
>          self.table_header = ['Mode']
>          self.table_header += self.anchors
>          self.result_table_create(self.table_header)
> -        eal_params = self.dut.create_eal_parameters()
> +        socket_id = self.dut.ports_info[0]['port'].socket
> +        eal_params = self.dut.create_eal_parameters(socket=socket_id)
>          print((self.table_header))
> 
>          for mode in self.rxtx_modes:
>              if mode is "scalar":
> -                self.dut.send_expect("./app/test/test_scalar %s --lcores='%d-%d'" %
> (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> +                self.dut.send_expect("./app/test/test_scalar %s " %
> + (eal_params), "R.*T.*E.*>.*>", 60)
>              else:
> -                self.dut.send_expect("./app/test/test %s --lcores='%d-%d'" %
> (eal_params,self.core, self.core + 1), "R.*T.*E.*>.*>", 60)
> +                self.dut.send_expect("./app/test/test %s " %
> + (eal_params), "R.*T.*E.*>.*>", 60)
> 
>              table_row = [mode]
>              self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10)
> --
> 2.17.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12  7:43 [dts] [PATCH V1] tests/unit_tests_pmd_perf: modify app cmd according to dpdk change malihong
2020-02-13  1:19 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox