[dts][PATCH] tests/coremask: fix all_core size

Thinh Tran thinhtr at linux.vnet.ibm.com
Thu Jun 30 19:34:45 CEST 2022


My system has 16 lcores, due to adding one (+1) to the length of
all_cores[] make the calculation of big_coremask wrong and cause test to fail.

Signed-off-by: Thinh Tran <thinhtr at linux.vnet.ibm.com>
---
 tests/TestSuite_coremask.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py
index db809cf3..8308f93c 100644
--- a/tests/TestSuite_coremask.py
+++ b/tests/TestSuite_coremask.py
@@ -82,9 +82,9 @@ class TestCoremask(TestCase):
         config_max_lcore = self.dut.get_def_rte_config('CONFIG_RTE_MAX_LCORE')
 
         if config_max_lcore:
-            available_max_lcore = min(int(config_max_lcore), len(self.all_cores) + 1)
+            available_max_lcore = min(int(config_max_lcore), len(self.all_cores))
         else:
-            available_max_lcore = len(self.all_cores) + 1
+            available_max_lcore = len(self.all_cores) 
 
         return available_max_lcore
 
@@ -151,6 +151,7 @@ class TestCoremask(TestCase):
         big_coremask = "0x"
         for _ in range(0, big_coremask_size, 4):
             big_coremask += "f"
+
         command = command_line % (self.app_test_path, big_coremask, self.mem_channel)
         try:
             out = self.dut.send_expect(command, "RTE>>", 10)
-- 
2.25.1



More information about the dts mailing list