* [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number @ 2016-11-18 6:20 Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu ` (3 more replies) 0 siblings, 4 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-18 6:20 UTC (permalink / raw) To: dts; +Cc: Jianbo Liu The coremask for the application should be dependent on how many cores it has, not the fixed number (ffff), as DUT's cores number could be less than 16. Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> --- tests/TestSuite_unit_tests_cmdline.py | 5 ++++- tests/TestSuite_unit_tests_dump.py | 22 ++++++++++++++-------- tests/TestSuite_unit_tests_eal.py | 8 +++++--- tests/TestSuite_unit_tests_lpm.py | 9 ++++++--- tests/TestSuite_unit_tests_mbuf.py | 4 +++- tests/TestSuite_unit_tests_mempool.py | 7 +++++-- tests/TestSuite_unit_tests_pmd_perf.py | 10 ++++++---- tests/TestSuite_unit_tests_qos.py | 12 ++++++++---- tests/TestSuite_unit_tests_ring.py | 7 +++++-- tests/TestSuite_unit_tests_ringpmd.py | 6 ++++-- tests/TestSuite_unit_tests_timer.py | 7 +++++-- 11 files changed, 65 insertions(+), 32 deletions(-) diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py index 93faf49..199d233 100644 --- a/tests/TestSuite_unit_tests_cmdline.py +++ b/tests/TestSuite_unit_tests_cmdline.py @@ -36,6 +36,7 @@ Cmdline autotest """ +import utils from test_case import TestCase # @@ -69,7 +70,9 @@ class TestUnitTestsCmdline(TestCase): Run cmdline autotests in RTE comand line. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "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") diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py index 08c3ba6..4d8686f 100644 --- a/tests/TestSuite_unit_tests_dump.py +++ b/tests/TestSuite_unit_tests_dump.py @@ -30,6 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import re +import utils """ DPDK Test suite. @@ -76,7 +77,8 @@ class TestUnitTestsDump(TestCase): """ Run history log dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "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") @@ -112,7 +114,8 @@ class TestUnitTestsDump(TestCase): """ Run physical memory dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "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', 'phys', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank'] @@ -132,7 +135,8 @@ class TestUnitTestsDump(TestCase): """ Run memzone dump test case. """ - self.dut.send_expect("./%s/app/testpmd -n 1 -c ffff -- -i" % (self.target), "testpmd>", self.start_test_time) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/testpmd -n 1 -c %s -- -i" % (self.target, core_mask), "testpmd>", self.start_test_time) out = self.dut.send_expect("dump_memzone", "testpmd>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") @@ -154,7 +158,8 @@ class TestUnitTestsDump(TestCase): """ Run struct size dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "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", "# ") @@ -171,17 +176,18 @@ class TestUnitTestsDump(TestCase): """ Run devargs dump test case. """ + core_mask = utils.create_mask(self.dut.get_core_list("all")) 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 ffff -b %s" - % (self.target, pci_address), "R.*T.*E.*>.*>", self.start_test_time) + self.dut.send_expect("./%s/app/test -n 1 -c %s -b %s" + % (self.target, core_mask, pci_address), "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 = "PCI blacklist %s" % pci_address self.verify(black_str in out, "Dump black list failed") - self.dut.send_expect("./%s/app/test -n 1 -c ffff -w %s" - % (self.target, pci_address), "R.*T.*E.*>.*>", self.start_test_time) + self.dut.send_expect("./%s/app/test -n 1 -c %s -w %s" + % (self.target, core_mask, pci_address), "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", "# ") diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py index 8fea148..02191c2 100644 --- a/tests/TestSuite_unit_tests_eal.py +++ b/tests/TestSuite_unit_tests_eal.py @@ -34,7 +34,8 @@ class TestUnitTestsEal(TestCase): [arch, machine, self.env, toolchain] = self.target.split('-') self.start_test_time = 60 self.run_cmd_time = 180 - self.test_app_cmdline = "./%s/app/test -n 1 -c ffff" % self.target + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.test_app_cmdline = "./%s/app/test -n 1 -c %s" % (self.target, core_mask) def set_up(self): """ @@ -147,7 +148,7 @@ class TestUnitTestsEal(TestCase): cmdline = self.test_app_cmdline else: # mask cores only on socket 0 - cmdline = "%s ./%s/app/test -n 1 -c 5555" % (self.dut.taskset(1), self.target) + cmdline = "%s ./%s/app/test -n 1 -c 55" % (self.dut.taskset(1), self.target) self.dut.send_expect(cmdline, "R.*T.*E.*>.*>", self.start_test_time) out = self.dut.send_expect("func_reentrancy_autotest", "RTE>>", self.run_cmd_time) self.dut.send_expect("quit", "# ") @@ -157,8 +158,9 @@ class TestUnitTestsEal(TestCase): """ Run pci autotest. """ + core_mask = utils.create_mask(self.dut.get_core_list("all")) # should re-compile test app, this is only a demo. will implementation after framework support - self.dut.send_expect("./%s/app/test_pci -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>" , self.start_test_time) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>" , self.start_test_time) out = self.dut.send_expect("pci_autotest", "RTE>>", self.run_cmd_time) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py index 4a26e03..4418852 100644 --- a/tests/TestSuite_unit_tests_lpm.py +++ b/tests/TestSuite_unit_tests_lpm.py @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK for LPM methods in l3fwd. """ +import utils from test_case import TestCase # @@ -70,7 +71,8 @@ class TestUnitTestsLpmIpv6(TestCase): """ Run lpm for IPv6 autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("lpm_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -80,7 +82,7 @@ class TestUnitTestsLpmIpv6(TestCase): Run lpm for IPv6 autotest. """ [arch, machine, env, toolchain] = self.target.split('-') - self.verify(arch == "x86_64", "lpm6 request huge memory") + self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge memory") if env == 'bsdapp': pass else: @@ -89,7 +91,8 @@ class TestUnitTestsLpmIpv6(TestCase): hugepage_num = self.dut.get_total_huge_pages() self.verify(hugepage_num >= 4096, "failed to request huge memory") - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600) self.dut.send_expect("quit", "# ") if env == 'bsdapp': diff --git a/tests/TestSuite_unit_tests_mbuf.py b/tests/TestSuite_unit_tests_mbuf.py index df73e5d..e7a2101 100644 --- a/tests/TestSuite_unit_tests_mbuf.py +++ b/tests/TestSuite_unit_tests_mbuf.py @@ -36,6 +36,7 @@ Run all mbuf autotests """ +import utils from test_case import TestCase # @@ -68,7 +69,8 @@ class TestUnitTestsMbuf(TestCase): Run mbuf autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mbuf_autotest", "RTE>>", 60) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py index 70cf4f3..a1134c3 100644 --- a/tests/TestSuite_unit_tests_mempool.py +++ b/tests/TestSuite_unit_tests_mempool.py @@ -36,6 +36,7 @@ Run all Mempool autotests """ +import utils from test_case import TestCase # @@ -68,7 +69,8 @@ class TestUnitTestsMempool(TestCase): Run memory pool autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mempool_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -77,7 +79,8 @@ class TestUnitTestsMempool(TestCase): """ Run memory pool performance autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 700) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py index 695c8de..af5e9d4 100644 --- a/tests/TestSuite_unit_tests_pmd_perf.py +++ b/tests/TestSuite_unit_tests_pmd_perf.py @@ -62,7 +62,7 @@ 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, env, toolchain] = self.target.split('-') - self.verify(self.arch == "x86_64", "pmd perf request running in x86_64") + 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'] @@ -90,7 +90,8 @@ class TestUnitTestsPmdPerf(TestCase): Run pmd stream control mode burst test case. """ - self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./app/test/test -n 1 -c %s" % core_mask, "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) @@ -111,11 +112,12 @@ class TestUnitTestsPmdPerf(TestCase): self.result_table_create(self.table_header) print self.table_header + core_mask = utils.create_mask(self.dut.get_core_list("all")) for mode in self.rxtx_modes: if mode is "scalar": - self.dut.send_expect("./app/test/test_scalar -n 1 -c ffff", "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test_scalar -n 1 -c %s" % core_mask, "R.*T.*E.*>.*>", 60) else: - self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1 -c %s" % core_mask, "R.*T.*E.*>.*>", 60) table_row = [mode] self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) diff --git a/tests/TestSuite_unit_tests_qos.py b/tests/TestSuite_unit_tests_qos.py index 1bc5f8d..42a7bf8 100644 --- a/tests/TestSuite_unit_tests_qos.py +++ b/tests/TestSuite_unit_tests_qos.py @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK for Random Early Detection, Metering and Scheduling QoS features. """ +import utils from test_case import TestCase # @@ -70,7 +71,8 @@ class TestUnitTestsQos(TestCase): Run RED autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 30) out = self.dut.send_expect("red_autotest", "RTE>>", 180) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -80,7 +82,8 @@ class TestUnitTestsQos(TestCase): Run meter autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 30) out = self.dut.send_expect("meter_autotest", "RTE>>", 5) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -91,9 +94,10 @@ class TestUnitTestsQos(TestCase): """ [arch, machine, env, toolchain] = self.target.split('-') - self.verify(arch == "x86_64", "Sched auto_test not support in i686") + self.verify(arch in ["x86_64" ,"arm64"], "Sched auto_test only support in x86_64 or arm64") - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 30) out = self.dut.send_expect("sched_autotest", "RTE>>", 5) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_ring.py b/tests/TestSuite_unit_tests_ring.py index baa6610..6a701b2 100644 --- a/tests/TestSuite_unit_tests_ring.py +++ b/tests/TestSuite_unit_tests_ring.py @@ -36,6 +36,7 @@ Run all Ring autotests """ +import utils from test_case import TestCase # @@ -68,7 +69,8 @@ class TestUnitTestsRing(TestCase): Run ring autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("ring_autotest", "RTE>>", 36000) self.verify("Test OK" in out, "Test failed") self.dut.send_expect("set_watermark test 100", "RTE>>") @@ -81,7 +83,8 @@ class TestUnitTestsRing(TestCase): Run ring performance autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("ring_perf_autotest", "RTE>>", 210) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_ringpmd.py b/tests/TestSuite_unit_tests_ringpmd.py index b6d21bb..c62b8d6 100644 --- a/tests/TestSuite_unit_tests_ringpmd.py +++ b/tests/TestSuite_unit_tests_ringpmd.py @@ -36,6 +36,7 @@ Run Inter-VM share memory autotests """ +import utils from test_case import TestCase # @@ -71,12 +72,13 @@ class TestUnitTestsRingPmd(TestCase): """ dev_str = "--vdev=net_ring0 --vdev=net_ring1" - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 10) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 10) out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Default no eth_ring devices Test failed") - self.dut.send_expect("./%s/app/test -n 1 -c ffff %s" % (self.target, dev_str), "R.*T.*E.*>.*>", 10) + self.dut.send_expect("./%s/app/test -n 1 -c %s %s" % (self.target, core_mask, dev_str), "R.*T.*E.*>.*>", 10) out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Two eth_ring devices test failed") diff --git a/tests/TestSuite_unit_tests_timer.py b/tests/TestSuite_unit_tests_timer.py index 2d5eb49..e79687d 100644 --- a/tests/TestSuite_unit_tests_timer.py +++ b/tests/TestSuite_unit_tests_timer.py @@ -36,6 +36,7 @@ Run all timer autotests """ +import utils from test_case import TestCase # @@ -67,7 +68,8 @@ class TestUnitTestsTimer(TestCase): """ Run timer autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("timer_autotest", "RTE>>", 60) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -76,7 +78,8 @@ class TestUnitTestsTimer(TestCase): """ Run timer autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + core_mask = utils.create_mask(self.dut.get_core_list("all")) + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("timer_perf_autotest", "RTE>>", 60) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dts] [PATCH 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time 2016-11-18 6:20 [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Jianbo Liu @ 2016-11-18 6:20 ` Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 3/3] framework project_dpdk: fix dpdk recompile error Jianbo Liu ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-18 6:20 UTC (permalink / raw) To: dts; +Cc: Jianbo Liu It takes longer to do perf testing on ARM platform, so change the value from 700s to 900s. Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> --- tests/TestSuite_unit_tests_mempool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py index a1134c3..9c0ffc0 100644 --- a/tests/TestSuite_unit_tests_mempool.py +++ b/tests/TestSuite_unit_tests_mempool.py @@ -81,7 +81,7 @@ class TestUnitTestsMempool(TestCase): """ core_mask = utils.create_mask(self.dut.get_core_list("all")) self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, core_mask), "R.*T.*E.*>.*>", 60) - out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 700) + out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 900) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dts] [PATCH 3/3] framework project_dpdk: fix dpdk recompile error 2016-11-18 6:20 [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu @ 2016-11-18 6:20 ` Jianbo Liu 2016-11-18 6:34 ` [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Xu, HuilongX 2016-11-21 7:42 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Jianbo Liu 3 siblings, 0 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-18 6:20 UTC (permalink / raw) To: dts; +Cc: Jianbo Liu Remove temporay files in the app/test to make recompile successfully. Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> --- framework/project_dpdk.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 0b6ef2d..067590b 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -174,6 +174,8 @@ class DPDKdut(Dut): # clean all self.send_expect("rm -rf " + target, "#") self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") # compile out = self.send_expect("make -j install T=%s %s" % (target, extra_options), "# ", build_time) @@ -193,6 +195,8 @@ class DPDKdut(Dut): # clean all self.send_expect("rm -rf " + target, "#") self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") # compile out = self.send_expect("make -j %d install T=%s CC=gcc48" % (self.number_of_cores, @@ -322,6 +326,8 @@ class DPDKdut(Dut): else: timeout = 90 self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") return self.send_expect("make -j -C %s %s" % (folder, extra_options), "# ", timeout) @@ -330,6 +336,8 @@ class DPDKdut(Dut): Build dpdk sample applications on Freebsd. """ self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") return self.send_expect("make -j -C %s %s CC=gcc48" % (folder, extra_options), "# ", 180) -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number 2016-11-18 6:20 [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 3/3] framework project_dpdk: fix dpdk recompile error Jianbo Liu @ 2016-11-18 6:34 ` Xu, HuilongX 2016-11-18 7:35 ` Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Jianbo Liu 3 siblings, 1 reply; 9+ messages in thread From: Xu, HuilongX @ 2016-11-18 6:34 UTC (permalink / raw) To: Jianbo Liu, dts Hi jianbo, A comments as below, please check, Thanks a lot. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu > Sent: Friday, November 18, 2016 2:21 PM > To: dts@dpdk.org > Cc: Jianbo Liu > Subject: [dts] [PATCH 1/3] tests unit_test_*: use the coremask according > to DUT's core number > > The coremask for the application should be dependent on how many cores > it has, > not the fixed number (ffff), as DUT's cores number could be less than 16. > > Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> > --- > tests/TestSuite_unit_tests_cmdline.py | 5 ++++- > tests/TestSuite_unit_tests_dump.py | 22 ++++++++++++++-------- > tests/TestSuite_unit_tests_eal.py | 8 +++++--- > tests/TestSuite_unit_tests_lpm.py | 9 ++++++--- > tests/TestSuite_unit_tests_mbuf.py | 4 +++- > tests/TestSuite_unit_tests_mempool.py | 7 +++++-- > tests/TestSuite_unit_tests_pmd_perf.py | 10 ++++++---- > tests/TestSuite_unit_tests_qos.py | 12 ++++++++---- > tests/TestSuite_unit_tests_ring.py | 7 +++++-- > tests/TestSuite_unit_tests_ringpmd.py | 6 ++++-- > tests/TestSuite_unit_tests_timer.py | 7 +++++-- > 11 files changed, 65 insertions(+), 32 deletions(-) > > diff --git a/tests/TestSuite_unit_tests_cmdline.py > b/tests/TestSuite_unit_tests_cmdline.py > index 93faf49..199d233 100644 > --- a/tests/TestSuite_unit_tests_cmdline.py > +++ b/tests/TestSuite_unit_tests_cmdline.py > @@ -36,6 +36,7 @@ Cmdline autotest > > """ > > +import utils > from test_case import TestCase > > # > @@ -69,7 +70,9 @@ class TestUnitTestsCmdline(TestCase): > Run cmdline autotests in RTE comand line. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) Could you used 2 core for unit test, because, some platforms have a lot of cores(72+) When we used all cores, must use more huge page. But on 32it platforms the max memsize is 4GB. Thanks a lot > + > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "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") > diff --git a/tests/TestSuite_unit_tests_dump.py > b/tests/TestSuite_unit_tests_dump.py > index 08c3ba6..4d8686f 100644 > --- a/tests/TestSuite_unit_tests_dump.py > +++ b/tests/TestSuite_unit_tests_dump.py > @@ -30,6 +30,7 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > import re > +import utils > > """ > DPDK Test suite. > @@ -76,7 +77,8 @@ class TestUnitTestsDump(TestCase): > """ > Run history log dump test case. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % > (self.target), "R.*T.*E.*>.*>", self.start_test_time) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "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") > @@ -112,7 +114,8 @@ class TestUnitTestsDump(TestCase): > """ > Run physical memory dump test case. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % > (self.target), "R.*T.*E.*>.*>", self.start_test_time) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "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', 'phys', 'len', 'virt', 'socket_id', > 'hugepage_sz', 'nchannel', 'nrank'] > @@ -132,7 +135,8 @@ class TestUnitTestsDump(TestCase): > """ > Run memzone dump test case. > """ > - self.dut.send_expect("./%s/app/testpmd -n 1 -c ffff -- -i" % > (self.target), "testpmd>", self.start_test_time) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/testpmd -n 1 -c %s -- -i" % > (self.target, core_mask), "testpmd>", self.start_test_time) > out = self.dut.send_expect("dump_memzone", "testpmd>", > self.run_cmd_time * 2) > self.dut.send_expect("quit", "# ") > > @@ -154,7 +158,8 @@ class TestUnitTestsDump(TestCase): > """ > Run struct size dump test case. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % > (self.target), "R.*T.*E.*>.*>", self.start_test_time) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "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", "# ") > > @@ -171,17 +176,18 @@ class TestUnitTestsDump(TestCase): > """ > Run devargs dump test case. > """ > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > 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 ffff -b %s" > - % (self.target, pci_address), > "R.*T.*E.*>.*>", self.start_test_time) > + self.dut.send_expect("./%s/app/test -n 1 -c %s -b %s" > + % (self.target, core_mask, pci_address), > "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 = "PCI blacklist %s" % pci_address > self.verify(black_str in out, "Dump black list failed") > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff -w %s" > - % (self.target, pci_address), > "R.*T.*E.*>.*>", self.start_test_time) > + self.dut.send_expect("./%s/app/test -n 1 -c %s -w %s" > + % (self.target, core_mask, pci_address), > "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", "# ") > > diff --git a/tests/TestSuite_unit_tests_eal.py > b/tests/TestSuite_unit_tests_eal.py > index 8fea148..02191c2 100644 > --- a/tests/TestSuite_unit_tests_eal.py > +++ b/tests/TestSuite_unit_tests_eal.py > @@ -34,7 +34,8 @@ class TestUnitTestsEal(TestCase): > [arch, machine, self.env, toolchain] = self.target.split('-') > self.start_test_time = 60 > self.run_cmd_time = 180 > - self.test_app_cmdline = "./%s/app/test -n 1 -c ffff" % > self.target > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.test_app_cmdline = "./%s/app/test -n 1 -c %s" % > (self.target, core_mask) > > def set_up(self): > """ > @@ -147,7 +148,7 @@ class TestUnitTestsEal(TestCase): > cmdline = self.test_app_cmdline > else: > # mask cores only on socket 0 > - cmdline = "%s ./%s/app/test -n 1 -c 5555" % > (self.dut.taskset(1), self.target) > + cmdline = "%s ./%s/app/test -n 1 -c 55" % > (self.dut.taskset(1), self.target) > self.dut.send_expect(cmdline, "R.*T.*E.*>.*>", > self.start_test_time) > out = self.dut.send_expect("func_reentrancy_autotest", "RTE>>", > self.run_cmd_time) > self.dut.send_expect("quit", "# ") > @@ -157,8 +158,9 @@ class TestUnitTestsEal(TestCase): > """ > Run pci autotest. > """ > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > # should re-compile test app, this is only a demo. will > implementation after framework support > - self.dut.send_expect("./%s/app/test_pci -n 1 -c ffff" % > self.target, "R.*T.*E.*>.*>" , self.start_test_time) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>" , self.start_test_time) > out = self.dut.send_expect("pci_autotest", "RTE>>", > self.run_cmd_time) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > diff --git a/tests/TestSuite_unit_tests_lpm.py > b/tests/TestSuite_unit_tests_lpm.py > index 4a26e03..4418852 100644 > --- a/tests/TestSuite_unit_tests_lpm.py > +++ b/tests/TestSuite_unit_tests_lpm.py > @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK > for LPM methods in l3fwd. > """ > > > +import utils > from test_case import TestCase > > # > @@ -70,7 +71,8 @@ class TestUnitTestsLpmIpv6(TestCase): > """ > Run lpm for IPv6 autotest. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("lpm_autotest", "RTE>>", 120) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > @@ -80,7 +82,7 @@ class TestUnitTestsLpmIpv6(TestCase): > Run lpm for IPv6 autotest. > """ > [arch, machine, env, toolchain] = self.target.split('-') > - self.verify(arch == "x86_64", "lpm6 request huge memory") > + self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge > memory") > if env == 'bsdapp': > pass > else: > @@ -89,7 +91,8 @@ class TestUnitTestsLpmIpv6(TestCase): > hugepage_num = self.dut.get_total_huge_pages() > self.verify(hugepage_num >= 4096, "failed to request huge > memory") > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600) > self.dut.send_expect("quit", "# ") > if env == 'bsdapp': > diff --git a/tests/TestSuite_unit_tests_mbuf.py > b/tests/TestSuite_unit_tests_mbuf.py > index df73e5d..e7a2101 100644 > --- a/tests/TestSuite_unit_tests_mbuf.py > +++ b/tests/TestSuite_unit_tests_mbuf.py > @@ -36,6 +36,7 @@ Run all mbuf autotests > """ > > > +import utils > from test_case import TestCase > > # > @@ -68,7 +69,8 @@ class TestUnitTestsMbuf(TestCase): > Run mbuf autotest. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("mbuf_autotest", "RTE>>", 60) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > diff --git a/tests/TestSuite_unit_tests_mempool.py > b/tests/TestSuite_unit_tests_mempool.py > index 70cf4f3..a1134c3 100644 > --- a/tests/TestSuite_unit_tests_mempool.py > +++ b/tests/TestSuite_unit_tests_mempool.py > @@ -36,6 +36,7 @@ Run all Mempool autotests > """ > > > +import utils > from test_case import TestCase > > # > @@ -68,7 +69,8 @@ class TestUnitTestsMempool(TestCase): > Run memory pool autotest. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("mempool_autotest", "RTE>>", 120) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > @@ -77,7 +79,8 @@ class TestUnitTestsMempool(TestCase): > """ > Run memory pool performance autotest. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", > 700) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > diff --git a/tests/TestSuite_unit_tests_pmd_perf.py > b/tests/TestSuite_unit_tests_pmd_perf.py > index 695c8de..af5e9d4 100644 > --- a/tests/TestSuite_unit_tests_pmd_perf.py > +++ b/tests/TestSuite_unit_tests_pmd_perf.py > @@ -62,7 +62,7 @@ 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, env, toolchain] = self.target.split('-') > - self.verify(self.arch == "x86_64", "pmd perf request running in > x86_64") > + 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'] > @@ -90,7 +90,8 @@ class TestUnitTestsPmdPerf(TestCase): > Run pmd stream control mode burst test case. > """ > > - self.dut.send_expect("./app/test/test -n 1 -c ffff", > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./app/test/test -n 1 -c %s" % core_mask, > "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) > @@ -111,11 +112,12 @@ class TestUnitTestsPmdPerf(TestCase): > self.result_table_create(self.table_header) > print self.table_header > > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > for mode in self.rxtx_modes: > if mode is "scalar": > - self.dut.send_expect("./app/test/test_scalar -n 1 -c > ffff", "R.*T.*E.*>.*>", 60) > + self.dut.send_expect("./app/test/test_scalar -n 1 - > c %s" % core_mask, "R.*T.*E.*>.*>", 60) > else: > - self.dut.send_expect("./app/test/test -n 1 -c ffff", > "R.*T.*E.*>.*>", 60) > + self.dut.send_expect("./app/test/test -n 1 -c %s" % > core_mask, "R.*T.*E.*>.*>", 60) > > table_row = [mode] > self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) > diff --git a/tests/TestSuite_unit_tests_qos.py > b/tests/TestSuite_unit_tests_qos.py > index 1bc5f8d..42a7bf8 100644 > --- a/tests/TestSuite_unit_tests_qos.py > +++ b/tests/TestSuite_unit_tests_qos.py > @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK > for Random Early > Detection, Metering and Scheduling QoS features. > """ > > +import utils > from test_case import TestCase > > # > @@ -70,7 +71,8 @@ class TestUnitTestsQos(TestCase): > Run RED autotest. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 30) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 30) > out = self.dut.send_expect("red_autotest", "RTE>>", 180) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > @@ -80,7 +82,8 @@ class TestUnitTestsQos(TestCase): > Run meter autotest. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 30) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 30) > out = self.dut.send_expect("meter_autotest", "RTE>>", 5) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > @@ -91,9 +94,10 @@ class TestUnitTestsQos(TestCase): > """ > > [arch, machine, env, toolchain] = self.target.split('-') > - self.verify(arch == "x86_64", "Sched auto_test not support in > i686") > + self.verify(arch in ["x86_64" ,"arm64"], "Sched auto_test only > support in x86_64 or arm64") > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 30) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 30) > out = self.dut.send_expect("sched_autotest", "RTE>>", 5) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > diff --git a/tests/TestSuite_unit_tests_ring.py > b/tests/TestSuite_unit_tests_ring.py > index baa6610..6a701b2 100644 > --- a/tests/TestSuite_unit_tests_ring.py > +++ b/tests/TestSuite_unit_tests_ring.py > @@ -36,6 +36,7 @@ Run all Ring autotests > """ > > > +import utils > from test_case import TestCase > > # > @@ -68,7 +69,8 @@ class TestUnitTestsRing(TestCase): > Run ring autotest. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("ring_autotest", "RTE>>", 36000) > self.verify("Test OK" in out, "Test failed") > self.dut.send_expect("set_watermark test 100", "RTE>>") > @@ -81,7 +83,8 @@ class TestUnitTestsRing(TestCase): > Run ring performance autotest. > """ > > - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("ring_perf_autotest", "RTE>>", 210) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > diff --git a/tests/TestSuite_unit_tests_ringpmd.py > b/tests/TestSuite_unit_tests_ringpmd.py > index b6d21bb..c62b8d6 100644 > --- a/tests/TestSuite_unit_tests_ringpmd.py > +++ b/tests/TestSuite_unit_tests_ringpmd.py > @@ -36,6 +36,7 @@ Run Inter-VM share memory autotests > """ > > > +import utils > from test_case import TestCase > > # > @@ -71,12 +72,13 @@ class TestUnitTestsRingPmd(TestCase): > """ > dev_str = "--vdev=net_ring0 --vdev=net_ring1" > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 10) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 10) > out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Default no eth_ring devices Test > failed") > > - self.dut.send_expect("./%s/app/test -n 1 -c ffff %s" % > (self.target, dev_str), "R.*T.*E.*>.*>", 10) > + self.dut.send_expect("./%s/app/test -n 1 -c %s %s" % > (self.target, core_mask, dev_str), "R.*T.*E.*>.*>", 10) > out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Two eth_ring devices test > failed") > diff --git a/tests/TestSuite_unit_tests_timer.py > b/tests/TestSuite_unit_tests_timer.py > index 2d5eb49..e79687d 100644 > --- a/tests/TestSuite_unit_tests_timer.py > +++ b/tests/TestSuite_unit_tests_timer.py > @@ -36,6 +36,7 @@ Run all timer autotests > """ > > > +import utils > from test_case import TestCase > > # > @@ -67,7 +68,8 @@ class TestUnitTestsTimer(TestCase): > """ > Run timer autotest. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("timer_autotest", "RTE>>", 60) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > @@ -76,7 +78,8 @@ class TestUnitTestsTimer(TestCase): > """ > Run timer autotest. > """ > - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, > "R.*T.*E.*>.*>", 60) > + core_mask = utils.create_mask(self.dut.get_core_list("all")) > + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, > core_mask), "R.*T.*E.*>.*>", 60) > out = self.dut.send_expect("timer_perf_autotest", "RTE>>", 60) > self.dut.send_expect("quit", "# ") > self.verify("Test OK" in out, "Test failed") > -- > 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number 2016-11-18 6:34 ` [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Xu, HuilongX @ 2016-11-18 7:35 ` Jianbo Liu 0 siblings, 0 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-18 7:35 UTC (permalink / raw) To: Xu, HuilongX; +Cc: dts On 18 November 2016 at 14:34, Xu, HuilongX <huilongx.xu@intel.com> wrote: > Hi jianbo, > A comments as below, please check, > Thanks a lot. >> -----Original Message----- >> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianbo Liu >> Sent: Friday, November 18, 2016 2:21 PM >> To: dts@dpdk.org >> Cc: Jianbo Liu >> Subject: [dts] [PATCH 1/3] tests unit_test_*: use the coremask according >> to DUT's core number >> >> The coremask for the application should be dependent on how many cores >> it has, >> not the fixed number (ffff), as DUT's cores number could be less than 16. >> >> Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> >> --- >> tests/TestSuite_unit_tests_cmdline.py | 5 ++++- >> tests/TestSuite_unit_tests_dump.py | 22 ++++++++++++++-------- >> tests/TestSuite_unit_tests_eal.py | 8 +++++--- >> tests/TestSuite_unit_tests_lpm.py | 9 ++++++--- >> tests/TestSuite_unit_tests_mbuf.py | 4 +++- >> tests/TestSuite_unit_tests_mempool.py | 7 +++++-- >> tests/TestSuite_unit_tests_pmd_perf.py | 10 ++++++---- >> tests/TestSuite_unit_tests_qos.py | 12 ++++++++---- >> tests/TestSuite_unit_tests_ring.py | 7 +++++-- >> tests/TestSuite_unit_tests_ringpmd.py | 6 ++++-- >> tests/TestSuite_unit_tests_timer.py | 7 +++++-- >> 11 files changed, 65 insertions(+), 32 deletions(-) >> >> diff --git a/tests/TestSuite_unit_tests_cmdline.py >> b/tests/TestSuite_unit_tests_cmdline.py >> index 93faf49..199d233 100644 >> --- a/tests/TestSuite_unit_tests_cmdline.py >> +++ b/tests/TestSuite_unit_tests_cmdline.py >> @@ -36,6 +36,7 @@ Cmdline autotest >> >> """ >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -69,7 +70,9 @@ class TestUnitTestsCmdline(TestCase): >> Run cmdline autotests in RTE comand line. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) > Could you used 2 core for unit test, because, some platforms have a lot of cores(72+) > When we used all cores, must use more huge page. But on 32it platforms the max memsize is 4GB. OK, I'll try... > Thanks a lot >> + >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "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") >> diff --git a/tests/TestSuite_unit_tests_dump.py >> b/tests/TestSuite_unit_tests_dump.py >> index 08c3ba6..4d8686f 100644 >> --- a/tests/TestSuite_unit_tests_dump.py >> +++ b/tests/TestSuite_unit_tests_dump.py >> @@ -30,6 +30,7 @@ >> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >> >> import re >> +import utils >> >> """ >> DPDK Test suite. >> @@ -76,7 +77,8 @@ class TestUnitTestsDump(TestCase): >> """ >> Run history log dump test case. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % >> (self.target), "R.*T.*E.*>.*>", self.start_test_time) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "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") >> @@ -112,7 +114,8 @@ class TestUnitTestsDump(TestCase): >> """ >> Run physical memory dump test case. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % >> (self.target), "R.*T.*E.*>.*>", self.start_test_time) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "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', 'phys', 'len', 'virt', 'socket_id', >> 'hugepage_sz', 'nchannel', 'nrank'] >> @@ -132,7 +135,8 @@ class TestUnitTestsDump(TestCase): >> """ >> Run memzone dump test case. >> """ >> - self.dut.send_expect("./%s/app/testpmd -n 1 -c ffff -- -i" % >> (self.target), "testpmd>", self.start_test_time) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/testpmd -n 1 -c %s -- -i" % >> (self.target, core_mask), "testpmd>", self.start_test_time) >> out = self.dut.send_expect("dump_memzone", "testpmd>", >> self.run_cmd_time * 2) >> self.dut.send_expect("quit", "# ") >> >> @@ -154,7 +158,8 @@ class TestUnitTestsDump(TestCase): >> """ >> Run struct size dump test case. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % >> (self.target), "R.*T.*E.*>.*>", self.start_test_time) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "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", "# ") >> >> @@ -171,17 +176,18 @@ class TestUnitTestsDump(TestCase): >> """ >> Run devargs dump test case. >> """ >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> 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 ffff -b %s" >> - % (self.target, pci_address), >> "R.*T.*E.*>.*>", self.start_test_time) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s -b %s" >> + % (self.target, core_mask, pci_address), >> "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 = "PCI blacklist %s" % pci_address >> self.verify(black_str in out, "Dump black list failed") >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff -w %s" >> - % (self.target, pci_address), >> "R.*T.*E.*>.*>", self.start_test_time) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s -w %s" >> + % (self.target, core_mask, pci_address), >> "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", "# ") >> >> diff --git a/tests/TestSuite_unit_tests_eal.py >> b/tests/TestSuite_unit_tests_eal.py >> index 8fea148..02191c2 100644 >> --- a/tests/TestSuite_unit_tests_eal.py >> +++ b/tests/TestSuite_unit_tests_eal.py >> @@ -34,7 +34,8 @@ class TestUnitTestsEal(TestCase): >> [arch, machine, self.env, toolchain] = self.target.split('-') >> self.start_test_time = 60 >> self.run_cmd_time = 180 >> - self.test_app_cmdline = "./%s/app/test -n 1 -c ffff" % >> self.target >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.test_app_cmdline = "./%s/app/test -n 1 -c %s" % >> (self.target, core_mask) >> >> def set_up(self): >> """ >> @@ -147,7 +148,7 @@ class TestUnitTestsEal(TestCase): >> cmdline = self.test_app_cmdline >> else: >> # mask cores only on socket 0 >> - cmdline = "%s ./%s/app/test -n 1 -c 5555" % >> (self.dut.taskset(1), self.target) >> + cmdline = "%s ./%s/app/test -n 1 -c 55" % >> (self.dut.taskset(1), self.target) >> self.dut.send_expect(cmdline, "R.*T.*E.*>.*>", >> self.start_test_time) >> out = self.dut.send_expect("func_reentrancy_autotest", "RTE>>", >> self.run_cmd_time) >> self.dut.send_expect("quit", "# ") >> @@ -157,8 +158,9 @@ class TestUnitTestsEal(TestCase): >> """ >> Run pci autotest. >> """ >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> # should re-compile test app, this is only a demo. will >> implementation after framework support >> - self.dut.send_expect("./%s/app/test_pci -n 1 -c ffff" % >> self.target, "R.*T.*E.*>.*>" , self.start_test_time) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>" , self.start_test_time) >> out = self.dut.send_expect("pci_autotest", "RTE>>", >> self.run_cmd_time) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> diff --git a/tests/TestSuite_unit_tests_lpm.py >> b/tests/TestSuite_unit_tests_lpm.py >> index 4a26e03..4418852 100644 >> --- a/tests/TestSuite_unit_tests_lpm.py >> +++ b/tests/TestSuite_unit_tests_lpm.py >> @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK >> for LPM methods in l3fwd. >> """ >> >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -70,7 +71,8 @@ class TestUnitTestsLpmIpv6(TestCase): >> """ >> Run lpm for IPv6 autotest. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("lpm_autotest", "RTE>>", 120) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> @@ -80,7 +82,7 @@ class TestUnitTestsLpmIpv6(TestCase): >> Run lpm for IPv6 autotest. >> """ >> [arch, machine, env, toolchain] = self.target.split('-') >> - self.verify(arch == "x86_64", "lpm6 request huge memory") >> + self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge >> memory") >> if env == 'bsdapp': >> pass >> else: >> @@ -89,7 +91,8 @@ class TestUnitTestsLpmIpv6(TestCase): >> hugepage_num = self.dut.get_total_huge_pages() >> self.verify(hugepage_num >= 4096, "failed to request huge >> memory") >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600) >> self.dut.send_expect("quit", "# ") >> if env == 'bsdapp': >> diff --git a/tests/TestSuite_unit_tests_mbuf.py >> b/tests/TestSuite_unit_tests_mbuf.py >> index df73e5d..e7a2101 100644 >> --- a/tests/TestSuite_unit_tests_mbuf.py >> +++ b/tests/TestSuite_unit_tests_mbuf.py >> @@ -36,6 +36,7 @@ Run all mbuf autotests >> """ >> >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -68,7 +69,8 @@ class TestUnitTestsMbuf(TestCase): >> Run mbuf autotest. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("mbuf_autotest", "RTE>>", 60) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> diff --git a/tests/TestSuite_unit_tests_mempool.py >> b/tests/TestSuite_unit_tests_mempool.py >> index 70cf4f3..a1134c3 100644 >> --- a/tests/TestSuite_unit_tests_mempool.py >> +++ b/tests/TestSuite_unit_tests_mempool.py >> @@ -36,6 +36,7 @@ Run all Mempool autotests >> """ >> >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -68,7 +69,8 @@ class TestUnitTestsMempool(TestCase): >> Run memory pool autotest. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("mempool_autotest", "RTE>>", 120) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> @@ -77,7 +79,8 @@ class TestUnitTestsMempool(TestCase): >> """ >> Run memory pool performance autotest. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", >> 700) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> diff --git a/tests/TestSuite_unit_tests_pmd_perf.py >> b/tests/TestSuite_unit_tests_pmd_perf.py >> index 695c8de..af5e9d4 100644 >> --- a/tests/TestSuite_unit_tests_pmd_perf.py >> +++ b/tests/TestSuite_unit_tests_pmd_perf.py >> @@ -62,7 +62,7 @@ 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, env, toolchain] = self.target.split('-') >> - self.verify(self.arch == "x86_64", "pmd perf request running in >> x86_64") >> + 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'] >> @@ -90,7 +90,8 @@ class TestUnitTestsPmdPerf(TestCase): >> Run pmd stream control mode burst test case. >> """ >> >> - self.dut.send_expect("./app/test/test -n 1 -c ffff", >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./app/test/test -n 1 -c %s" % core_mask, >> "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) >> @@ -111,11 +112,12 @@ class TestUnitTestsPmdPerf(TestCase): >> self.result_table_create(self.table_header) >> print self.table_header >> >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> for mode in self.rxtx_modes: >> if mode is "scalar": >> - self.dut.send_expect("./app/test/test_scalar -n 1 -c >> ffff", "R.*T.*E.*>.*>", 60) >> + self.dut.send_expect("./app/test/test_scalar -n 1 - >> c %s" % core_mask, "R.*T.*E.*>.*>", 60) >> else: >> - self.dut.send_expect("./app/test/test -n 1 -c ffff", >> "R.*T.*E.*>.*>", 60) >> + self.dut.send_expect("./app/test/test -n 1 -c %s" % >> core_mask, "R.*T.*E.*>.*>", 60) >> >> table_row = [mode] >> self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) >> diff --git a/tests/TestSuite_unit_tests_qos.py >> b/tests/TestSuite_unit_tests_qos.py >> index 1bc5f8d..42a7bf8 100644 >> --- a/tests/TestSuite_unit_tests_qos.py >> +++ b/tests/TestSuite_unit_tests_qos.py >> @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK >> for Random Early >> Detection, Metering and Scheduling QoS features. >> """ >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -70,7 +71,8 @@ class TestUnitTestsQos(TestCase): >> Run RED autotest. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 30) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 30) >> out = self.dut.send_expect("red_autotest", "RTE>>", 180) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> @@ -80,7 +82,8 @@ class TestUnitTestsQos(TestCase): >> Run meter autotest. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 30) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 30) >> out = self.dut.send_expect("meter_autotest", "RTE>>", 5) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> @@ -91,9 +94,10 @@ class TestUnitTestsQos(TestCase): >> """ >> >> [arch, machine, env, toolchain] = self.target.split('-') >> - self.verify(arch == "x86_64", "Sched auto_test not support in >> i686") >> + self.verify(arch in ["x86_64" ,"arm64"], "Sched auto_test only >> support in x86_64 or arm64") >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 30) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 30) >> out = self.dut.send_expect("sched_autotest", "RTE>>", 5) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> diff --git a/tests/TestSuite_unit_tests_ring.py >> b/tests/TestSuite_unit_tests_ring.py >> index baa6610..6a701b2 100644 >> --- a/tests/TestSuite_unit_tests_ring.py >> +++ b/tests/TestSuite_unit_tests_ring.py >> @@ -36,6 +36,7 @@ Run all Ring autotests >> """ >> >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -68,7 +69,8 @@ class TestUnitTestsRing(TestCase): >> Run ring autotest. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("ring_autotest", "RTE>>", 36000) >> self.verify("Test OK" in out, "Test failed") >> self.dut.send_expect("set_watermark test 100", "RTE>>") >> @@ -81,7 +83,8 @@ class TestUnitTestsRing(TestCase): >> Run ring performance autotest. >> """ >> >> - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("ring_perf_autotest", "RTE>>", 210) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> diff --git a/tests/TestSuite_unit_tests_ringpmd.py >> b/tests/TestSuite_unit_tests_ringpmd.py >> index b6d21bb..c62b8d6 100644 >> --- a/tests/TestSuite_unit_tests_ringpmd.py >> +++ b/tests/TestSuite_unit_tests_ringpmd.py >> @@ -36,6 +36,7 @@ Run Inter-VM share memory autotests >> """ >> >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -71,12 +72,13 @@ class TestUnitTestsRingPmd(TestCase): >> """ >> dev_str = "--vdev=net_ring0 --vdev=net_ring1" >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 10) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 10) >> out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Default no eth_ring devices Test >> failed") >> >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff %s" % >> (self.target, dev_str), "R.*T.*E.*>.*>", 10) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s %s" % >> (self.target, core_mask, dev_str), "R.*T.*E.*>.*>", 10) >> out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Two eth_ring devices test >> failed") >> diff --git a/tests/TestSuite_unit_tests_timer.py >> b/tests/TestSuite_unit_tests_timer.py >> index 2d5eb49..e79687d 100644 >> --- a/tests/TestSuite_unit_tests_timer.py >> +++ b/tests/TestSuite_unit_tests_timer.py >> @@ -36,6 +36,7 @@ Run all timer autotests >> """ >> >> >> +import utils >> from test_case import TestCase >> >> # >> @@ -67,7 +68,8 @@ class TestUnitTestsTimer(TestCase): >> """ >> Run timer autotest. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("timer_autotest", "RTE>>", 60) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> @@ -76,7 +78,8 @@ class TestUnitTestsTimer(TestCase): >> """ >> Run timer autotest. >> """ >> - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, >> "R.*T.*E.*>.*>", 60) >> + core_mask = utils.create_mask(self.dut.get_core_list("all")) >> + self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target, >> core_mask), "R.*T.*E.*>.*>", 60) >> out = self.dut.send_expect("timer_perf_autotest", "RTE>>", 60) >> self.dut.send_expect("quit", "# ") >> self.verify("Test OK" in out, "Test failed") >> -- >> 1.9.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores 2016-11-18 6:20 [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Jianbo Liu ` (2 preceding siblings ...) 2016-11-18 6:34 ` [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Xu, HuilongX @ 2016-11-21 7:42 ` Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu ` (2 more replies) 3 siblings, 3 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-21 7:42 UTC (permalink / raw) To: dts; +Cc: Jianbo Liu The coremask (now is ffff) for applications is too large, reduce to f. Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> --- tests/TestSuite_unit_tests_cmdline.py | 2 +- tests/TestSuite_unit_tests_dump.py | 12 ++++++------ tests/TestSuite_unit_tests_eal.py | 6 +++--- tests/TestSuite_unit_tests_lpm.py | 6 +++--- tests/TestSuite_unit_tests_mbuf.py | 2 +- tests/TestSuite_unit_tests_mempool.py | 4 ++-- tests/TestSuite_unit_tests_pmd_perf.py | 8 ++++---- tests/TestSuite_unit_tests_qos.py | 8 ++++---- tests/TestSuite_unit_tests_ring.py | 4 ++-- tests/TestSuite_unit_tests_ringpmd.py | 4 ++-- tests/TestSuite_unit_tests_timer.py | 4 ++-- 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py index 93faf49..57111e4 100644 --- a/tests/TestSuite_unit_tests_cmdline.py +++ b/tests/TestSuite_unit_tests_cmdline.py @@ -69,7 +69,7 @@ class TestUnitTestsCmdline(TestCase): Run cmdline autotests in RTE comand line. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "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") diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py index 08c3ba6..a39fcd1 100644 --- a/tests/TestSuite_unit_tests_dump.py +++ b/tests/TestSuite_unit_tests_dump.py @@ -76,7 +76,7 @@ class TestUnitTestsDump(TestCase): """ Run history log dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + self.dut.send_expect("./%s/app/test -n 1 -c f" % (self.target), "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") @@ -112,7 +112,7 @@ class TestUnitTestsDump(TestCase): """ Run physical memory dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + self.dut.send_expect("./%s/app/test -n 1 -c f" % (self.target), "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', 'phys', 'len', 'virt', 'socket_id', 'hugepage_sz', 'nchannel', 'nrank'] @@ -132,7 +132,7 @@ class TestUnitTestsDump(TestCase): """ Run memzone dump test case. """ - self.dut.send_expect("./%s/app/testpmd -n 1 -c ffff -- -i" % (self.target), "testpmd>", self.start_test_time) + self.dut.send_expect("./%s/app/testpmd -n 1 -c f -- -i" % (self.target), "testpmd>", self.start_test_time) out = self.dut.send_expect("dump_memzone", "testpmd>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") @@ -154,7 +154,7 @@ class TestUnitTestsDump(TestCase): """ Run struct size dump test case. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % (self.target), "R.*T.*E.*>.*>", self.start_test_time) + self.dut.send_expect("./%s/app/test -n 1 -c f" % (self.target), "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", "# ") @@ -173,14 +173,14 @@ 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 ffff -b %s" + self.dut.send_expect("./%s/app/test -n 1 -c f -b %s" % (self.target, pci_address), "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 = "PCI blacklist %s" % pci_address self.verify(black_str in out, "Dump black list failed") - self.dut.send_expect("./%s/app/test -n 1 -c ffff -w %s" + self.dut.send_expect("./%s/app/test -n 1 -c f -w %s" % (self.target, pci_address), "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", "# ") diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py index 8fea148..d27ba39 100644 --- a/tests/TestSuite_unit_tests_eal.py +++ b/tests/TestSuite_unit_tests_eal.py @@ -34,7 +34,7 @@ class TestUnitTestsEal(TestCase): [arch, machine, self.env, toolchain] = self.target.split('-') self.start_test_time = 60 self.run_cmd_time = 180 - self.test_app_cmdline = "./%s/app/test -n 1 -c ffff" % self.target + self.test_app_cmdline = "./%s/app/test -n 1 -c f" % self.target def set_up(self): """ @@ -147,7 +147,7 @@ class TestUnitTestsEal(TestCase): cmdline = self.test_app_cmdline else: # mask cores only on socket 0 - cmdline = "%s ./%s/app/test -n 1 -c 5555" % (self.dut.taskset(1), self.target) + cmdline = "%s ./%s/app/test -n 1 -c 5" % (self.dut.taskset(1), self.target) self.dut.send_expect(cmdline, "R.*T.*E.*>.*>", self.start_test_time) out = self.dut.send_expect("func_reentrancy_autotest", "RTE>>", self.run_cmd_time) self.dut.send_expect("quit", "# ") @@ -158,7 +158,7 @@ class TestUnitTestsEal(TestCase): Run pci autotest. """ # should re-compile test app, this is only a demo. will implementation after framework support - self.dut.send_expect("./%s/app/test_pci -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>" , self.start_test_time) + self.dut.send_expect("./%s/app/test_pci -n 1 -c f" % self.target, "R.*T.*E.*>.*>" , self.start_test_time) out = self.dut.send_expect("pci_autotest", "RTE>>", self.run_cmd_time) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py index 4a26e03..e8149ff 100644 --- a/tests/TestSuite_unit_tests_lpm.py +++ b/tests/TestSuite_unit_tests_lpm.py @@ -70,7 +70,7 @@ class TestUnitTestsLpmIpv6(TestCase): """ Run lpm for IPv6 autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("lpm_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -80,7 +80,7 @@ class TestUnitTestsLpmIpv6(TestCase): Run lpm for IPv6 autotest. """ [arch, machine, env, toolchain] = self.target.split('-') - self.verify(arch == "x86_64", "lpm6 request huge memory") + self.verify(arch in ["x86_64", "arm64"], "lpm6 request huge memory") if env == 'bsdapp': pass else: @@ -89,7 +89,7 @@ class TestUnitTestsLpmIpv6(TestCase): hugepage_num = self.dut.get_total_huge_pages() self.verify(hugepage_num >= 4096, "failed to request huge memory") - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("lpm6_autotest", "RTE>>", 3600) self.dut.send_expect("quit", "# ") if env == 'bsdapp': diff --git a/tests/TestSuite_unit_tests_mbuf.py b/tests/TestSuite_unit_tests_mbuf.py index df73e5d..4fd660d 100644 --- a/tests/TestSuite_unit_tests_mbuf.py +++ b/tests/TestSuite_unit_tests_mbuf.py @@ -68,7 +68,7 @@ class TestUnitTestsMbuf(TestCase): Run mbuf autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mbuf_autotest", "RTE>>", 60) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py index 70cf4f3..42129e5 100644 --- a/tests/TestSuite_unit_tests_mempool.py +++ b/tests/TestSuite_unit_tests_mempool.py @@ -68,7 +68,7 @@ class TestUnitTestsMempool(TestCase): Run memory pool autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mempool_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -77,7 +77,7 @@ class TestUnitTestsMempool(TestCase): """ Run memory pool performance autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c e" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 700) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py index 695c8de..a3284a0 100644 --- a/tests/TestSuite_unit_tests_pmd_perf.py +++ b/tests/TestSuite_unit_tests_pmd_perf.py @@ -62,7 +62,7 @@ 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, env, toolchain] = self.target.split('-') - self.verify(self.arch == "x86_64", "pmd perf request running in x86_64") + 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'] @@ -90,7 +90,7 @@ class TestUnitTestsPmdPerf(TestCase): Run pmd stream control mode burst test case. """ - self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1 -c f", "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) @@ -113,9 +113,9 @@ class TestUnitTestsPmdPerf(TestCase): for mode in self.rxtx_modes: if mode is "scalar": - self.dut.send_expect("./app/test/test_scalar -n 1 -c ffff", "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test_scalar -n 1 -c f", "R.*T.*E.*>.*>", 60) else: - self.dut.send_expect("./app/test/test -n 1 -c ffff", "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./app/test/test -n 1 -c f", "R.*T.*E.*>.*>", 60) table_row = [mode] self.dut.send_expect("set_rxtx_sc continuous", "RTE>>", 10) diff --git a/tests/TestSuite_unit_tests_qos.py b/tests/TestSuite_unit_tests_qos.py index 1bc5f8d..2c29db6 100644 --- a/tests/TestSuite_unit_tests_qos.py +++ b/tests/TestSuite_unit_tests_qos.py @@ -70,7 +70,7 @@ class TestUnitTestsQos(TestCase): Run RED autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 30) out = self.dut.send_expect("red_autotest", "RTE>>", 180) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -80,7 +80,7 @@ class TestUnitTestsQos(TestCase): Run meter autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 30) out = self.dut.send_expect("meter_autotest", "RTE>>", 5) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -91,9 +91,9 @@ class TestUnitTestsQos(TestCase): """ [arch, machine, env, toolchain] = self.target.split('-') - self.verify(arch == "x86_64", "Sched auto_test not support in i686") + self.verify(arch in ["x86_64" ,"arm64"], "Sched auto_test only support in x86_64 or arm64") - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 30) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 30) out = self.dut.send_expect("sched_autotest", "RTE>>", 5) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_ring.py b/tests/TestSuite_unit_tests_ring.py index baa6610..9ef39fa 100644 --- a/tests/TestSuite_unit_tests_ring.py +++ b/tests/TestSuite_unit_tests_ring.py @@ -68,7 +68,7 @@ class TestUnitTestsRing(TestCase): Run ring autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("ring_autotest", "RTE>>", 36000) self.verify("Test OK" in out, "Test failed") self.dut.send_expect("set_watermark test 100", "RTE>>") @@ -81,7 +81,7 @@ class TestUnitTestsRing(TestCase): Run ring performance autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c e" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("ring_perf_autotest", "RTE>>", 210) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") diff --git a/tests/TestSuite_unit_tests_ringpmd.py b/tests/TestSuite_unit_tests_ringpmd.py index b6d21bb..e82bd1d 100644 --- a/tests/TestSuite_unit_tests_ringpmd.py +++ b/tests/TestSuite_unit_tests_ringpmd.py @@ -71,12 +71,12 @@ class TestUnitTestsRingPmd(TestCase): """ dev_str = "--vdev=net_ring0 --vdev=net_ring1" - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 10) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 10) out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Default no eth_ring devices Test failed") - self.dut.send_expect("./%s/app/test -n 1 -c ffff %s" % (self.target, dev_str), "R.*T.*E.*>.*>", 10) + self.dut.send_expect("./%s/app/test -n 1 -c f %s" % (self.target, dev_str), "R.*T.*E.*>.*>", 10) out = self.dut.send_expect("ring_pmd_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Two eth_ring devices test failed") diff --git a/tests/TestSuite_unit_tests_timer.py b/tests/TestSuite_unit_tests_timer.py index 2d5eb49..e3597b8 100644 --- a/tests/TestSuite_unit_tests_timer.py +++ b/tests/TestSuite_unit_tests_timer.py @@ -67,7 +67,7 @@ class TestUnitTestsTimer(TestCase): """ Run timer autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("timer_autotest", "RTE>>", 60) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") @@ -76,7 +76,7 @@ class TestUnitTestsTimer(TestCase): """ Run timer autotest. """ - self.dut.send_expect("./%s/app/test -n 1 -c ffff" % self.target, "R.*T.*E.*>.*>", 60) + self.dut.send_expect("./%s/app/test -n 1 -c f" % self.target, "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("timer_perf_autotest", "RTE>>", 60) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dts] [PATCH v2 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time 2016-11-21 7:42 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Jianbo Liu @ 2016-11-21 7:42 ` Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 3/3] framework project_dpdk: fix dpdk recompile error Jianbo Liu 2016-11-23 2:37 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Liu, Yong 2 siblings, 0 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-21 7:42 UTC (permalink / raw) To: dts; +Cc: Jianbo Liu It takes longer to do perf testing on ARM platform, so change the value from 700s to 900s. Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> --- tests/TestSuite_unit_tests_mempool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py index 42129e5..5a0b505 100644 --- a/tests/TestSuite_unit_tests_mempool.py +++ b/tests/TestSuite_unit_tests_mempool.py @@ -78,7 +78,7 @@ class TestUnitTestsMempool(TestCase): Run memory pool performance autotest. """ self.dut.send_expect("./%s/app/test -n 1 -c e" % self.target, "R.*T.*E.*>.*>", 60) - out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 700) + out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 900) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Test failed") -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dts] [PATCH v2 3/3] framework project_dpdk: fix dpdk recompile error 2016-11-21 7:42 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu @ 2016-11-21 7:42 ` Jianbo Liu 2016-11-23 2:37 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Liu, Yong 2 siblings, 0 replies; 9+ messages in thread From: Jianbo Liu @ 2016-11-21 7:42 UTC (permalink / raw) To: dts; +Cc: Jianbo Liu Remove temporay files in the app/test to make recompile successfully. Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org> --- framework/project_dpdk.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 0b6ef2d..067590b 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -174,6 +174,8 @@ class DPDKdut(Dut): # clean all self.send_expect("rm -rf " + target, "#") self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") # compile out = self.send_expect("make -j install T=%s %s" % (target, extra_options), "# ", build_time) @@ -193,6 +195,8 @@ class DPDKdut(Dut): # clean all self.send_expect("rm -rf " + target, "#") self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") # compile out = self.send_expect("make -j %d install T=%s CC=gcc48" % (self.number_of_cores, @@ -322,6 +326,8 @@ class DPDKdut(Dut): else: timeout = 90 self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") return self.send_expect("make -j -C %s %s" % (folder, extra_options), "# ", timeout) @@ -330,6 +336,8 @@ class DPDKdut(Dut): Build dpdk sample applications on Freebsd. """ self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#") + self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#") return self.send_expect("make -j -C %s %s CC=gcc48" % (folder, extra_options), "# ", 180) -- 1.9.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores 2016-11-21 7:42 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 3/3] framework project_dpdk: fix dpdk recompile error Jianbo Liu @ 2016-11-23 2:37 ` Liu, Yong 2 siblings, 0 replies; 9+ messages in thread From: Liu, Yong @ 2016-11-23 2:37 UTC (permalink / raw) To: Jianbo Liu, dts Thanks Jianbo, applied into master branch. On 11/21/2016 03:42 PM, Jianbo Liu wrote: > The coremask (now is ffff) for applications is too large, reduce to f. > > Signed-off-by: Jianbo Liu<jianbo.liu@linaro.org> > --- > tests/TestSuite_unit_tests_cmdline.py | 2 +- > tests/TestSuite_unit_tests_dump.py | 12 ++++++------ > tests/TestSuite_unit_tests_eal.py | 6 +++--- > tests/TestSuite_unit_tests_lpm.py | 6 +++--- > tests/TestSuite_unit_tests_mbuf.py | 2 +- > tests/TestSuite_unit_tests_mempool.py | 4 ++-- > tests/TestSuite_unit_tests_pmd_perf.py | 8 ++++---- > tests/TestSuite_unit_tests_qos.py | 8 ++++---- > tests/TestSuite_unit_tests_ring.py | 4 ++-- > tests/TestSuite_unit_tests_ringpmd.py | 4 ++-- > tests/TestSuite_unit_tests_timer.py | 4 ++-- > 11 files changed, 30 insertions(+), 30 deletions(-) ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-11-23 2:38 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-11-18 6:20 [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu 2016-11-18 6:20 ` [dts] [PATCH 3/3] framework project_dpdk: fix dpdk recompile error Jianbo Liu 2016-11-18 6:34 ` [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number Xu, HuilongX 2016-11-18 7:35 ` Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 2/3] tests unit_tests_mempool: prolong mempool_perf waiting time Jianbo Liu 2016-11-21 7:42 ` [dts] [PATCH v2 3/3] framework project_dpdk: fix dpdk recompile error Jianbo Liu 2016-11-23 2:37 ` [dts] [PATCH v2 1/3] tests unit_test_*: specify the coremask to use fewer DUT's cores Liu, Yong
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).