test suite reviews and discussions
 help / color / mirror / Atom feed
From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
To: dts@dpdk.org
Cc: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Subject: [dts][PATCH] tests/coremask: fix all_core size
Date: Thu, 30 Jun 2022 17:34:45 +0000	[thread overview]
Message-ID: <20220630173445.3751472-1-thinhtr@linux.vnet.ibm.com> (raw)

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

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


             reply	other threads:[~2022-06-30 17:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 17:34 Thinh Tran [this message]
2022-07-01  7:30 ` David Marchand

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=20220630173445.3751472-1-thinhtr@linux.vnet.ibm.com \
    --to=thinhtr@linux.vnet.ibm.com \
    --cc=dts@dpdk.org \
    /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).