[dts] [PATCH V1] tests/coremask: correct Master lcore

David Wilder dwilder at us.ibm.com
Wed Mar 27 22:21:45 CET 2019


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 at 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



More information about the dts mailing list