test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V2]unit_tests_pmd_perf: update script according to dpdk update
@ 2020-05-15  8:21 Xiao Qimai
  2020-05-15  9:15 ` Xiao, QimaiX
  2020-06-02  5:48 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Xiao Qimai @ 2020-05-15  8:21 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

*. CONFIG_RTE_IXGBE_INC_VECTOR has been deleted in dpdk

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_unit_tests_pmd_perf.py | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py
index a01cf4e..f8b36d1 100644
--- a/tests/TestSuite_unit_tests_pmd_perf.py
+++ b/tests/TestSuite_unit_tests_pmd_perf.py
@@ -35,7 +35,6 @@ DPDK Test suite.
 This TestSuite runs the unit tests included in DPDK for pmd performance.
 """
 
-import utils
 import re
 from test_case import TestCase
 
@@ -61,23 +60,11 @@ class TestUnitTestsPmdPerf(TestCase):
         """
         self.dut_ports = self.dut.get_ports(self.nic)
         self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
-        [self.arch, machine, _, toolchain] = self.target.split('-')
+        self.arch = self.target.split('-')[0]
         self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request running in x86_64 or arm64")
         self.burst_ctlmodes = ['poll_before_xmit', 'poll_after_xmit']
         self.rxtx_modes = ['vector', 'scalar', 'full', 'hybrid']
         self.anchors = ['rxtx', 'rxonly', 'txonly']
-
-        # for better scalar performance data, need disable CONFIG_RTE_IXGBE_INC_VECTOR
-        [arch, machine, _, toolchain] = self.target.split('-')
-        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/' config/common_base", "# ", 30)
-        self.dut.build_install_dpdk(self.target)
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
-        self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "# ")
-        self.dut.send_expect("sed -i -e 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/' config/common_base", "# ", 30)
-        self.dut.build_install_dpdk(self.target)
-        out = self.dut.build_dpdk_apps('./app/test/')
-        self.verify('make: Leaving directory' in out, "Compilation failed")
         socket_id = self.dut.ports_info[0]['port'].socket
         self.cores = self.dut.get_core_list(config='1S/4C/1T', socket=socket_id)
 
@@ -93,7 +80,7 @@ class TestUnitTestsPmdPerf(TestCase):
         """
 
         eal_params = self.dut.create_eal_parameters(cores=self.cores, ports=[0,1])
-        self.dut.send_expect("./app/test/test %s" % (eal_params), "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test %s" % (self.target, 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)
@@ -115,13 +102,8 @@ class TestUnitTestsPmdPerf(TestCase):
         self.result_table_create(self.table_header)
         eal_params = self.dut.create_eal_parameters(cores=self.cores, ports=[0,1])
         print((self.table_header))
-
+        self.dut.send_expect("./%s/app/test %s" % (self.target, eal_params), "R.*T.*E.*>.*>", 60)
         for mode in self.rxtx_modes:
-            if mode is "scalar":
-                self.dut.send_expect("./app/test/test_scalar %s " % (eal_params), "R.*T.*E.*>.*>", 60)
-            else:
-                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)
             self.dut.send_expect("set_rxtx_mode %s" % mode, "RTE>>",10)
@@ -133,10 +115,8 @@ class TestUnitTestsPmdPerf(TestCase):
                 result = m.search(out)
                 self.verify(result, "Failed to get result")
                 table_row.append(result.group(1))
-
-            self.dut.send_expect("quit", "# ")
             self.result_table_add(table_row)
-
+        self.dut.send_expect("quit", "# ")
         self.result_table_print()
 
     def tear_down(self):
-- 
1.8.3.1


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

* Re: [dts] [PATCH V2]unit_tests_pmd_perf: update script according to dpdk update
  2020-05-15  8:21 [dts] [PATCH V2]unit_tests_pmd_perf: update script according to dpdk update Xiao Qimai
@ 2020-05-15  9:15 ` Xiao, QimaiX
  2020-06-02  5:48 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Xiao, QimaiX @ 2020-05-15  9:15 UTC (permalink / raw)
  To: dts

Tested-by: Xiao, QimaiX <qimaix.xiao@intel.com>

Regards,
Xiao Qimai

> -----Original Message-----
> From: Xiao, QimaiX <qimaix.xiao@intel.com>
> Sent: Friday, May 15, 2020 4:22 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts][PATCH V2]unit_tests_pmd_perf: update script according to
> dpdk update
> 
> *. CONFIG_RTE_IXGBE_INC_VECTOR has been deleted in dpdk
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_unit_tests_pmd_perf.py | 28 ++++------------------------
>  1 file changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/tests/TestSuite_unit_tests_pmd_perf.py
> b/tests/TestSuite_unit_tests_pmd_perf.py
> index a01cf4e..f8b36d1 100644
> --- a/tests/TestSuite_unit_tests_pmd_perf.py
> +++ b/tests/TestSuite_unit_tests_pmd_perf.py
> @@ -35,7 +35,6 @@ DPDK Test suite.
>  This TestSuite runs the unit tests included in DPDK for pmd performance.
>  """
> 
> -import utils
>  import re
>  from test_case import TestCase
> 
> @@ -61,23 +60,11 @@ class TestUnitTestsPmdPerf(TestCase):
>          """
>          self.dut_ports = self.dut.get_ports(self.nic)
>          self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
> -        [self.arch, machine, _, toolchain] = self.target.split('-')
> +        self.arch = self.target.split('-')[0]
>          self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request running in
> x86_64 or arm64")
>          self.burst_ctlmodes = ['poll_before_xmit', 'poll_after_xmit']
>          self.rxtx_modes = ['vector', 'scalar', 'full', 'hybrid']
>          self.anchors = ['rxtx', 'rxonly', 'txonly']
> -
> -        # for better scalar performance data, need disable
> CONFIG_RTE_IXGBE_INC_VECTOR
> -        [arch, machine, _, toolchain] = self.target.split('-')
> -        self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=
> n/' config/common_base", "# ", 30)
> -        self.dut.build_install_dpdk(self.target)
> -        out = self.dut.build_dpdk_apps('./app/test/')
> -        self.verify('make: Leaving directory' in out, "Compilation failed")
> -        self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "#
> ")
> -        self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=
> y/' config/common_base", "# ", 30)
> -        self.dut.build_install_dpdk(self.target)
> -        out = self.dut.build_dpdk_apps('./app/test/')
> -        self.verify('make: Leaving directory' in out, "Compilation failed")
>          socket_id = self.dut.ports_info[0]['port'].socket
>          self.cores = self.dut.get_core_list(config='1S/4C/1T', socket=socket_id)
> 
> @@ -93,7 +80,7 @@ class TestUnitTestsPmdPerf(TestCase):
>          """
> 
>          eal_params = self.dut.create_eal_parameters(cores=self.cores,
> ports=[0,1])
> -        self.dut.send_expect("./app/test/test %s" % (eal_params),
> "R.*T.*E.*>.*>", 60)
> +        self.dut.send_expect("./%s/app/test %s" % (self.target,
> + 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) @@
> -115,13 +102,8 @@ class TestUnitTestsPmdPerf(TestCase):
>          self.result_table_create(self.table_header)
>          eal_params = self.dut.create_eal_parameters(cores=self.cores,
> ports=[0,1])
>          print((self.table_header))
> -
> +        self.dut.send_expect("./%s/app/test %s" % (self.target,
> + eal_params), "R.*T.*E.*>.*>", 60)
>          for mode in self.rxtx_modes:
> -            if mode is "scalar":
> -                self.dut.send_expect("./app/test/test_scalar %s " % (eal_params),
> "R.*T.*E.*>.*>", 60)
> -            else:
> -                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)
>              self.dut.send_expect("set_rxtx_mode %s" % mode, "RTE>>",10) @@
> -133,10 +115,8 @@ class TestUnitTestsPmdPerf(TestCase):
>                  result = m.search(out)
>                  self.verify(result, "Failed to get result")
>                  table_row.append(result.group(1))
> -
> -            self.dut.send_expect("quit", "# ")
>              self.result_table_add(table_row)
> -
> +        self.dut.send_expect("quit", "# ")
>          self.result_table_print()
> 
>      def tear_down(self):
> --
> 1.8.3.1


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

* Re: [dts] [PATCH V2]unit_tests_pmd_perf: update script according to dpdk update
  2020-05-15  8:21 [dts] [PATCH V2]unit_tests_pmd_perf: update script according to dpdk update Xiao Qimai
  2020-05-15  9:15 ` Xiao, QimaiX
@ 2020-06-02  5:48 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-06-02  5:48 UTC (permalink / raw)
  To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Friday, May 15, 2020 4:22 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V2]unit_tests_pmd_perf: update script according to
> dpdk update
> 
> *. CONFIG_RTE_IXGBE_INC_VECTOR has been deleted in dpdk
> 
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
>  tests/TestSuite_unit_tests_pmd_perf.py | 28 ++++------------------------
>  1 file changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/tests/TestSuite_unit_tests_pmd_perf.py
> b/tests/TestSuite_unit_tests_pmd_perf.py
> index a01cf4e..f8b36d1 100644
> --- a/tests/TestSuite_unit_tests_pmd_perf.py
> +++ b/tests/TestSuite_unit_tests_pmd_perf.py
> @@ -35,7 +35,6 @@ DPDK Test suite.
>  This TestSuite runs the unit tests included in DPDK for pmd performance.
>  """
> 
> -import utils
>  import re
>  from test_case import TestCase
> 
> @@ -61,23 +60,11 @@ class TestUnitTestsPmdPerf(TestCase):
>          """
>          self.dut_ports = self.dut.get_ports(self.nic)
>          self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
> -        [self.arch, machine, _, toolchain] = self.target.split('-')
> +        self.arch = self.target.split('-')[0]
>          self.verify(self.arch in ["x86_64", "arm64"], "pmd perf request running
> in x86_64 or arm64")
>          self.burst_ctlmodes = ['poll_before_xmit', 'poll_after_xmit']
>          self.rxtx_modes = ['vector', 'scalar', 'full', 'hybrid']
>          self.anchors = ['rxtx', 'rxonly', 'txonly']
> -
> -        # for better scalar performance data, need disable
> CONFIG_RTE_IXGBE_INC_VECTOR
> -        [arch, machine, _, toolchain] = self.target.split('-')
> -        self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_IXGBE_INC_VECTOR=y/CONFIG_RTE_IXGBE_INC_VECTOR=n/
> ' config/common_base", "# ", 30)
> -        self.dut.build_install_dpdk(self.target)
> -        out = self.dut.build_dpdk_apps('./app/test/')
> -        self.verify('make: Leaving directory' in out, "Compilation failed")
> -        self.dut.send_expect("mv -f ./app/test/test ./app/test/test_scalar", "# ")
> -        self.dut.send_expect("sed -i -e
> 's/CONFIG_RTE_IXGBE_INC_VECTOR=n/CONFIG_RTE_IXGBE_INC_VECTOR=y/
> ' config/common_base", "# ", 30)
> -        self.dut.build_install_dpdk(self.target)
> -        out = self.dut.build_dpdk_apps('./app/test/')
> -        self.verify('make: Leaving directory' in out, "Compilation failed")
>          socket_id = self.dut.ports_info[0]['port'].socket
>          self.cores = self.dut.get_core_list(config='1S/4C/1T', socket=socket_id)
> 
> @@ -93,7 +80,7 @@ class TestUnitTestsPmdPerf(TestCase):
>          """
> 
>          eal_params = self.dut.create_eal_parameters(cores=self.cores,
> ports=[0,1])
> -        self.dut.send_expect("./app/test/test %s" % (eal_params),
> "R.*T.*E.*>.*>", 60)
> +        self.dut.send_expect("./%s/app/test %s" % (self.target,
> + 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) @@ -
> 115,13 +102,8 @@ class TestUnitTestsPmdPerf(TestCase):
>          self.result_table_create(self.table_header)
>          eal_params = self.dut.create_eal_parameters(cores=self.cores,
> ports=[0,1])
>          print((self.table_header))
> -
> +        self.dut.send_expect("./%s/app/test %s" % (self.target,
> + eal_params), "R.*T.*E.*>.*>", 60)
>          for mode in self.rxtx_modes:
> -            if mode is "scalar":
> -                self.dut.send_expect("./app/test/test_scalar %s " % (eal_params),
> "R.*T.*E.*>.*>", 60)
> -            else:
> -                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)
>              self.dut.send_expect("set_rxtx_mode %s" % mode, "RTE>>",10) @@ -
> 133,10 +115,8 @@ class TestUnitTestsPmdPerf(TestCase):
>                  result = m.search(out)
>                  self.verify(result, "Failed to get result")
>                  table_row.append(result.group(1))
> -
> -            self.dut.send_expect("quit", "# ")
>              self.result_table_add(table_row)
> -
> +        self.dut.send_expect("quit", "# ")
>          self.result_table_print()
> 
>      def tear_down(self):
> --
> 1.8.3.1


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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15  8:21 [dts] [PATCH V2]unit_tests_pmd_perf: update script according to dpdk update Xiao Qimai
2020-05-15  9:15 ` Xiao, QimaiX
2020-06-02  5:48 ` 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