test suite reviews and discussions
 help / color / Atom feed
From: "huang,zhimin" <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: "huang,zhimin" <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1 02/14] tests/unit_tests_dump:addcreate_eal_parameters function
Date: Mon, 20 Jan 2020 17:00:16 +0800
Message-ID: <1579510828-133042-2-git-send-email-zhiminx.huang@intel.com> (raw)
In-Reply-To: <1579510828-133042-1-git-send-email-zhiminx.huang@intel.com>

Signed-off-by: huang,zhimin <zhiminx.huang@intel.com>
---
 tests/TestSuite_unit_tests_dump.py | 39 +++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py
index 7772223..57dfc3a 100644
--- a/tests/TestSuite_unit_tests_dump.py
+++ b/tests/TestSuite_unit_tests_dump.py
@@ -55,14 +55,14 @@ class TestUnitTestsDump(TestCase):
     # Test cases.
     #
 
+
     def set_up_all(self):
         """
         Run at the start of each test suite.
         Nothing to do here.
         """
         # Based on h/w type, choose how many ports to use
-        cores = self.dut.get_core_list("all")
-        self.coremask = utils.create_mask(cores)
+        self.cores = self.dut.get_core_list("all")
         self.dut_ports = self.dut.get_ports(self.nic)
         self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing")
         self.start_test_time = 60
@@ -79,7 +79,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run history log dump test case.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", self.start_test_time)
+        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.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_log_history", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
         self.verify("EAL" in out, "Test failed")
@@ -88,7 +89,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run history log dump test case.
         """
-        cmd = "./%s/app/testpmd -n 1 -c f -- -i" % self.target
+        eal_params = self.dut.create_eal_parameters(cores='1S/4C/1T')
+        cmd = "./%s/app/testpmd %s  -- -i" % (self.target,eal_params)
 
         self.dut.send_expect("%s" % cmd, "testpmd>", self.start_test_time)
         out = self.dut.send_expect("dump_ring", "testpmd>", self.run_cmd_time)
@@ -110,7 +112,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run mempool dump test case.
         """
-        cmd = "./%s/app/testpmd -n 1 -c f -- -i" % self.target
+        eal_params = self.dut.create_eal_parameters(cores='1S/4C/1T')
+        cmd = "./%s/app/testpmd %s  -- -i" % (self.target,eal_params)
 
         self.dut.send_expect("%s" % cmd, "testpmd>", self.start_test_time)
         out = self.dut.send_expect("dump_mempool", "testpmd>", self.run_cmd_time * 2)
@@ -131,7 +134,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run physical memory dump test case.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", self.start_test_time)
+        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.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_physmem", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
         elements = ['Segment', 'IOVA', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank']
@@ -151,7 +155,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run memzone dump test case.
         """
-        cmd = "./%s/app/testpmd -n 1 -c f -- -i" % self.target
+        eal_params = self.dut.create_eal_parameters(cores='1S/4C/1T')
+        cmd = "./%s/app/testpmd %s  -- -i" % (self.target,eal_params)
 
         self.dut.send_expect("%s" % cmd, "testpmd>", self.start_test_time)
         out = self.dut.send_expect("dump_memzone", "testpmd>", self.run_cmd_time * 2)
@@ -174,7 +179,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run struct size dump test case.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", self.start_test_time)
+        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.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_struct_sizes", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
 
@@ -194,15 +200,15 @@ class TestUnitTestsDump(TestCase):
         """
         test_port = self.dut_ports[0]
         pci_address = self.dut.ports_info[test_port]['pci'];
-        self.dut.send_expect("./%s/app/test -n 1 -c %s -b %s"
-                             % (self.target, self.coremask, pci_address), "R.*T.*E.*>.*>", self.start_test_time)
+        eal_params = self.dut.create_eal_parameters(cores=self.cores,b_ports=[pci_address])
+        self.dut.send_expect("./%s/app/test %s" % (self.target,eal_params), "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_devargs", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
         black_str = " %s" % pci_address
         self.verify(black_str in out, "Dump black list failed")
 
-        self.dut.send_expect("./%s/app/test -n 1 -c %s -w %s"
-                             % (self.target, self.coremask, pci_address), "R.*T.*E.*>.*>", self.start_test_time)
+        eal_params1 = self.dut.create_eal_parameters(cores=self.cores,ports=[pci_address])
+        self.dut.send_expect("./%s/app/test %s" % (self.target,eal_params1), "R.*T.*E.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_devargs", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
 
@@ -213,7 +219,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run dump malloc dump test case.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", self.start_test_time)
+        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.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_malloc_stats", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
         match_regex = "Heap id:(\d*)"
@@ -228,7 +235,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run malloc heaps dump test case.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", self.start_test_time)
+        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.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_malloc_heaps", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
 
@@ -247,7 +255,8 @@ class TestUnitTestsDump(TestCase):
         """
         Run log types dump test case.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, self.coremask), "R.*T.*E.*>.*>", self.start_test_time)
+        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.*>.*>", self.start_test_time)
         out = self.dut.send_expect("dump_log_types", "RTE>>", self.run_cmd_time * 2)
         self.dut.send_expect("quit", "# ")
 
-- 
1.8.3.1


  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  9:00 [dts] [PATCH V1 01/14] tests/unit_tests_crc:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` huang,zhimin [this message]
2020-01-20  9:00 ` [dts] [PATCH V1 03/14] tests/unit_tests_eal:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 04/14] tests/unit_tests_kni:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 05/14] tests/unit_tests_loopback:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 06/14] tests/unit_tests_lpm:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 07/14] tests/unit_tests_mbuf:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 08/14] tests/unit_tests_mempool:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 09/14] tests/unit_tests_pmd_perf:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 10/14] tests/unit_tests_power:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 11/14] tests/unit_tests_qos:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 12/14] tests/unit_tests_ring:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 13/14] tests/unit_tests_ringpmd:addcreate_eal_parameters function huang,zhimin
2020-01-20  9:00 ` [dts] [PATCH V1 14/14] tests/unit_tests_timer:addcreate_eal_parameters function huang,zhimin

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579510828-133042-2-git-send-email-zhiminx.huang@intel.com \
    --to=zhiminx.huang@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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