test suite reviews and discussions
 help / color / mirror / Atom feed
From: yaobing <bingx.y.yao@intel.com>
To: dts@dpdk.org
Cc: yaobing <bingx.y.yao@intel.com>
Subject: [dts] [PATCH V1] tests/unit_tests_kni:fix invalid coremask when dts coding
Date: Mon, 22 Oct 2018 17:18:09 +0800	[thread overview]
Message-ID: <1540199889-3620-1-git-send-email-bingx.y.yao@intel.com> (raw)

get local coremask due to script hard code

Signed-off-by: yaobing <bingx.y.yao@intel.com>
---
 tests/TestSuite_unit_tests_kni.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py
index ea8ef79..6ed8b9b 100644
--- a/tests/TestSuite_unit_tests_kni.py
+++ b/tests/TestSuite_unit_tests_kni.py
@@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK for KNI feature.
 """
 
 from test_case import TestCase
+import utils
 
 #
 #
@@ -72,7 +73,14 @@ class TestUnitTestsKni(TestCase):
 
         KNI Prerequisites
         """
-
+        core_number = len(self.dut.cores)
+        if core_number < 2:
+            raise
+        else:
+            self.default_cores = "1S/2C/1T"
+
+        cores = self.dut.get_core_list("1S/2C/1T")
+        self.coremask = utils.create_mask(cores)
         self.insmod_kni()
 
     def set_up(self):
@@ -85,7 +93,7 @@ class TestUnitTestsKni(TestCase):
         """
         Run kni autotest.
         """
-        self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target, "R.*T.*E.*>.*>", 60)
+        self.dut.send_expect("./%s/app/test -n 1 -c %s" % (self.target,self.coremask), "R.*T.*E.*>.*>", 60)
         out = self.dut.send_expect("kni_autotest", "RTE>>", 60)
         self.dut.send_expect("quit", "# ")
 
-- 
2.17.2

             reply	other threads:[~2018-10-22  9:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22  9:18 yaobing [this message]
2018-10-22  9:38 ` Tu, Lijuan

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=1540199889-3620-1-git-send-email-bingx.y.yao@intel.com \
    --to=bingx.y.yao@intel.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).