test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 1/2] tests/l2fwd:add create_eal_parameters func
@ 2020-01-20  8:39 Haiyang Zhao
  2020-01-20  8:39 ` [dts] [PATCH V1 2/2] tests/unit_tests_cmdline: add " Haiyang Zhao
  2020-01-21  2:08 ` [dts] [PATCH V1 1/2] tests/l2fwd:add " Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Haiyang Zhao @ 2020-01-20  8:39 UTC (permalink / raw)
  To: dts; +Cc: Haiyang Zhao

*.call create_eal_parameters before start l2fwd for ABI test.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 tests/TestSuite_l2fwd.py | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py
index 92f49d1..459b9c9 100644
--- a/tests/TestSuite_l2fwd.py
+++ b/tests/TestSuite_l2fwd.py
@@ -106,8 +106,10 @@ class TestL2fwd(TestCase):
         """
         # the cases use the first two ports
         port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])
+        eal_params = self.dut.create_eal_parameters()
 
-        self.dut.send_expect("./examples/l2fwd/build/app/l2fwd -n 1 -c f -- -q 8 -p %s  &" % port_mask, "L2FWD: entering main loop", 60)
+        self.dut.send_expect("./examples/l2fwd/build/app/l2fwd %s -- -q 8 -p %s  &" % (eal_params, port_mask),
+                             "L2FWD: entering main loop", 60)
 
         for i in [0, 1]:
             tx_port = self.tester.get_local_port(self.dut_ports[i])
@@ -136,14 +138,14 @@ class TestL2fwd(TestCase):
         """
         # the cases use the first two ports
         port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])
-
+        cores = self.dut.get_core_list(self.core_config, socket=self.ports_socket)
         core_mask = utils.create_mask(self.dut.get_core_list(self.core_config,
-                                                           socket=self.ports_socket))
+                                                             socket=self.ports_socket))
+        eal_params = self.dut.create_eal_parameters(cores=cores)
         for queues in self.test_queues:
 
-            command_line = "./examples/l2fwd/build/app/l2fwd -n %d -c %s -- -q %s -p %s &" % \
-                (self.dut.get_memory_channels(), core_mask,
-                 str(queues['queues']), port_mask)
+            command_line = "./examples/l2fwd/build/app/l2fwd  %s -- -q %s -p %s &" % \
+                           (eal_params, str(queues['queues']), port_mask)
 
             self.dut.send_expect(command_line, "L2FWD: entering main loop", 60)
 
@@ -167,8 +169,9 @@ class TestL2fwd(TestCase):
             ports.append(self.dut_ports[port])
 
         port_mask = utils.create_mask(ports)
-        core_mask = utils.create_mask(self.dut.get_core_list(self.core_config,
-                                                           socket=self.ports_socket))
+        cores = self.dut.get_core_list(self.core_config, socket=self.ports_socket)
+
+        eal_params = self.dut.create_eal_parameters(cores=cores)
 
         for frame_size in self.frame_sizes:
 
@@ -188,11 +191,10 @@ class TestL2fwd(TestCase):
                 self.tester.scapy_execute()
                 cnt += 1
 
-            for queues in self.test_queues:
+            for queues in self.test_queues[0:2]:
 
-                command_line = "./examples/l2fwd/build/app/l2fwd -n %d -c %s -- -q %s -p %s &" % \
-                    (self.dut.get_memory_channels(), core_mask,
-                     str(queues['queues']), port_mask)
+                command_line = "./examples/l2fwd/build/app/l2fwd %s -- -q %s -p %s &" % \
+                    (eal_params, str(queues['queues']), port_mask)
 
 #                self.dut.send_expect(command_line, "memory mapped", 60)
                 self.dut.send_expect(command_line, "L2FWD: entering main loop", 60)
-- 
1.8.3.1


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

* [dts] [PATCH V1 2/2] tests/unit_tests_cmdline: add create_eal_parameters func
  2020-01-20  8:39 [dts] [PATCH V1 1/2] tests/l2fwd:add create_eal_parameters func Haiyang Zhao
@ 2020-01-20  8:39 ` " Haiyang Zhao
  2020-01-21  2:08 ` [dts] [PATCH V1 1/2] tests/l2fwd:add " Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Haiyang Zhao @ 2020-01-20  8:39 UTC (permalink / raw)
  To: dts; +Cc: Haiyang Zhao

*.call create_eal_parameters before start test for ABI test.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 tests/TestSuite_unit_tests_cmdline.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py
index 86c8d82..057020c 100644
--- a/tests/TestSuite_unit_tests_cmdline.py
+++ b/tests/TestSuite_unit_tests_cmdline.py
@@ -58,8 +58,7 @@ class TestUnitTestsCmdline(TestCase):
         Run at the start of each test suite.
         """
         # icc compilation cost long long time.
-        cores = self.dut.get_core_list("all")
-        self.coremask = utils.create_mask(cores)
+        self.cores = self.dut.get_core_list("all")
 
     def set_up(self):
         """
@@ -71,8 +70,8 @@ class TestUnitTestsCmdline(TestCase):
         """
         Run cmdline autotests in RTE command line.
         """
-
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", 60)
+        eal_params = self.dut.create_eal_parameters(cores=self.cores)
+        self.dut.send_expect("./%s/app/test %s" % (self.target, eal_params), "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("cmdline_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
         self.verify("Test OK" in out, "Test failed")
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1 1/2] tests/l2fwd:add create_eal_parameters func
  2020-01-20  8:39 [dts] [PATCH V1 1/2] tests/l2fwd:add create_eal_parameters func Haiyang Zhao
  2020-01-20  8:39 ` [dts] [PATCH V1 2/2] tests/unit_tests_cmdline: add " Haiyang Zhao
@ 2020-01-21  2:08 ` " Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-01-21  2:08 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts; +Cc: Zhao, HaiyangX

Applied the series, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Haiyang Zhao
> Sent: Monday, January 20, 2020 4:39 PM
> To: dts@dpdk.org
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts] [PATCH V1 1/2] tests/l2fwd:add create_eal_parameters func
> 
> *.call create_eal_parameters before start l2fwd for ABI test.
> 
> Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
> ---
>  tests/TestSuite_l2fwd.py | 26 ++++++++++++++------------
>  1 file changed, 14 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py index
> 92f49d1..459b9c9 100644
> --- a/tests/TestSuite_l2fwd.py
> +++ b/tests/TestSuite_l2fwd.py
> @@ -106,8 +106,10 @@ class TestL2fwd(TestCase):
>          """
>          # the cases use the first two ports
>          port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])
> +        eal_params = self.dut.create_eal_parameters()
> 
> -        self.dut.send_expect("./examples/l2fwd/build/app/l2fwd -n 1 -c f -- -q
> 8 -p %s  &" % port_mask, "L2FWD: entering main loop", 60)
> +        self.dut.send_expect("./examples/l2fwd/build/app/l2fwd %s -- -q 8 -
> p %s  &" % (eal_params, port_mask),
> +                             "L2FWD: entering main loop", 60)
> 
>          for i in [0, 1]:
>              tx_port = self.tester.get_local_port(self.dut_ports[i])
> @@ -136,14 +138,14 @@ class TestL2fwd(TestCase):
>          """
>          # the cases use the first two ports
>          port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])
> -
> +        cores = self.dut.get_core_list(self.core_config,
> + socket=self.ports_socket)
>          core_mask = utils.create_mask(self.dut.get_core_list(self.core_config,
> -                                                           socket=self.ports_socket))
> +                                                             socket=self.ports_socket))
> +        eal_params = self.dut.create_eal_parameters(cores=cores)
>          for queues in self.test_queues:
> 
> -            command_line = "./examples/l2fwd/build/app/l2fwd -n %d -c %s -- -
> q %s -p %s &" % \
> -                (self.dut.get_memory_channels(), core_mask,
> -                 str(queues['queues']), port_mask)
> +            command_line = "./examples/l2fwd/build/app/l2fwd  %s -- -q %s -
> p %s &" % \
> +                           (eal_params, str(queues['queues']),
> + port_mask)
> 
>              self.dut.send_expect(command_line, "L2FWD: entering main loop",
> 60)
> 
> @@ -167,8 +169,9 @@ class TestL2fwd(TestCase):
>              ports.append(self.dut_ports[port])
> 
>          port_mask = utils.create_mask(ports)
> -        core_mask = utils.create_mask(self.dut.get_core_list(self.core_config,
> -                                                           socket=self.ports_socket))
> +        cores = self.dut.get_core_list(self.core_config,
> + socket=self.ports_socket)
> +
> +        eal_params = self.dut.create_eal_parameters(cores=cores)
> 
>          for frame_size in self.frame_sizes:
> 
> @@ -188,11 +191,10 @@ class TestL2fwd(TestCase):
>                  self.tester.scapy_execute()
>                  cnt += 1
> 
> -            for queues in self.test_queues:
> +            for queues in self.test_queues[0:2]:
> 
> -                command_line = "./examples/l2fwd/build/app/l2fwd -n %d -c %s --
> -q %s -p %s &" % \
> -                    (self.dut.get_memory_channels(), core_mask,
> -                     str(queues['queues']), port_mask)
> +                command_line = "./examples/l2fwd/build/app/l2fwd %s -- -q %s -
> p %s &" % \
> +                    (eal_params, str(queues['queues']), port_mask)
> 
>  #                self.dut.send_expect(command_line, "memory mapped", 60)
>                  self.dut.send_expect(command_line, "L2FWD: entering main loop",
> 60)
> --
> 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-01-20  8:39 [dts] [PATCH V1 1/2] tests/l2fwd:add create_eal_parameters func Haiyang Zhao
2020-01-20  8:39 ` [dts] [PATCH V1 2/2] tests/unit_tests_cmdline: add " Haiyang Zhao
2020-01-21  2:08 ` [dts] [PATCH V1 1/2] tests/l2fwd:add " 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