test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jianbo Liu <jianbo.liu@linaro.org>
To: "Xu, HuilongX" <huilongx.xu@intel.com>
Cc: "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH 1/3] tests unit_test_*: use the coremask according to DUT's core number
Date: Fri, 18 Nov 2016 15:35:58 +0800	[thread overview]
Message-ID: <CAP4Qi3-g24ttJ9fVNexpPBZt=V7018VWhqa7bQLO3TM8oSj7_w@mail.gmail.com> (raw)
In-Reply-To: <DF2A19295B96364286FEB7F3DDA27A46661BA5F3@SHSMSX101.ccr.corp.intel.com>

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
>

  reply	other threads:[~2016-11-18  7:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 [this message]
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

Reply instructions:

You may reply publicly 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='CAP4Qi3-g24ttJ9fVNexpPBZt=V7018VWhqa7bQLO3TM8oSj7_w@mail.gmail.com' \
    --to=jianbo.liu@linaro.org \
    --cc=dts@dpdk.org \
    --cc=huilongx.xu@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).