test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts]  [PATCH V1] tests/coremask: correct Master lcore
@ 2019-03-27 21:21 David Wilder
  2019-04-15 22:35 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: David Wilder @ 2019-03-27 21:21 UTC (permalink / raw)
  To: dts; +Cc: pradeep, wilder

The "test_all_cores_core-mask sub-test validates that the Master lcore
becomes ready, the test assumes this to be core 1, this is not correct
for all architectures or all configurations.  For example this test will
fail on x86_64 with bypass_core0=False and on Power9 with most smt
configurations.  This patch determines the first (lowest numbered) core
from the list of available cores and tests that that core becomes ready.

I validated this change that the test will pass on both Power9 and
x86_64 with both true and false setting of bypass_core0.o

Signed-off-by: David Wilder <dwilder@us.ibm.com>
---
 tests/TestSuite_coremask.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py
index 921dc31..7299e0c 100644
--- a/tests/TestSuite_coremask.py
+++ b/tests/TestSuite_coremask.py
@@ -92,14 +92,16 @@ class TestCoremask(TestCase):
 
         core_mask = utils.create_mask(self.all_cores[:available_max_lcore - 1])
 
+        first_core=self.all_cores[0]
+
         command = command_line % (self.target, core_mask, self.mem_channel)
 
         out = self.dut.send_expect(command, "RTE>>", 10)
-        self.verify("EAL: Master lcore 1 is ready" in out,
-                    "Core 1 not ready")
+        self.verify("EAL: Master lcore %s is ready" % first_core in out,
+                    "Core %s not ready" % first_core )
 
-        self.verify("EAL: Detected lcore 1 as core" in out,
-                    "Core 1 not detected")
+        self.verify("EAL: Detected lcore %s as core" % first_core in out,
+                    "Core %s not detected" % first_core )
 
         for core in self.all_cores[1:available_max_lcore - 1]:
             self.verify("EAL: lcore %s is ready" % core in out,
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1] tests/coremask: correct Master lcore
  2019-03-27 21:21 [dts] [PATCH V1] tests/coremask: correct Master lcore David Wilder
@ 2019-04-15 22:35 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-04-15 22:35 UTC (permalink / raw)
  To: David Wilder, dts; +Cc: pradeep, wilder

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of David Wilder
> Sent: Wednesday, March 27, 2019 2:22 PM
> To: dts@dpdk.org
> Cc: pradeep@us.ibm.com; wilder@us.ibm.com
> Subject: [dts] [PATCH V1] tests/coremask: correct Master lcore
> 
> The "test_all_cores_core-mask sub-test validates that the Master lcore
> becomes ready, the test assumes this to be core 1, this is not correct for all
> architectures or all configurations.  For example this test will fail on x86_64
> with bypass_core0=False and on Power9 with most smt configurations.  This
> patch determines the first (lowest numbered) core from the list of available
> cores and tests that that core becomes ready.
> 
> I validated this change that the test will pass on both Power9 and
> x86_64 with both true and false setting of bypass_core0.o
> 
> Signed-off-by: David Wilder <dwilder@us.ibm.com>
> ---
>  tests/TestSuite_coremask.py | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py index
> 921dc31..7299e0c 100644
> --- a/tests/TestSuite_coremask.py
> +++ b/tests/TestSuite_coremask.py
> @@ -92,14 +92,16 @@ class TestCoremask(TestCase):
> 
>          core_mask = utils.create_mask(self.all_cores[:available_max_lcore - 1])
> 
> +        first_core=self.all_cores[0]
> +
>          command = command_line % (self.target, core_mask,
> self.mem_channel)
> 
>          out = self.dut.send_expect(command, "RTE>>", 10)
> -        self.verify("EAL: Master lcore 1 is ready" in out,
> -                    "Core 1 not ready")
> +        self.verify("EAL: Master lcore %s is ready" % first_core in out,
> +                    "Core %s not ready" % first_core )
> 
> -        self.verify("EAL: Detected lcore 1 as core" in out,
> -                    "Core 1 not detected")
> +        self.verify("EAL: Detected lcore %s as core" % first_core in out,
> +                    "Core %s not detected" % first_core )
> 
>          for core in self.all_cores[1:available_max_lcore - 1]:
>              self.verify("EAL: lcore %s is ready" % core in out,
> --
> 1.8.3.1


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

end of thread, other threads:[~2019-04-15 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 21:21 [dts] [PATCH V1] tests/coremask: correct Master lcore David Wilder
2019-04-15 22:35 ` Tu, Lijuan

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).