tests/coremask: fix all_core size

Message ID 20220630173445.3751472-1-thinhtr@linux.vnet.ibm.com (mailing list archive)
State Changes Requested
Headers
Series tests/coremask: fix all_core size |

Checks

Context Check Description
ci/Intel-dts-suite-test fail Apply issues

Commit Message

Thinh Tran June 30, 2022, 5:34 p.m. UTC
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@linux.vnet.ibm.com>
---
 tests/TestSuite_coremask.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

David Marchand July 1, 2022, 7:30 a.m. UTC | #1
On Thu, Jun 30, 2022 at 7:35 PM Thinh Tran <thinhtr@linux.vnet.ibm.com> wrote:
>
> 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@linux.vnet.ibm.com>

This code changed with:
https://git.dpdk.org/tools/dts/commit/?id=049a60d99f0b2f750087215ba0badc6a7001a36c

I suppose you looked at the current HEAD, but it pointed to the
'master' branch that is not updated anymore.
The current code is in the main branch now.
I fixed the HEAD issue in the dts repository on the server side.

Can you try with the latest code?

Thanks.
  

Patch

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)