From: Zhou Jun <junx.w.zhou@intel.com>
To: dts@dpdk.org
Cc: Zhou Jun <junx.w.zhou@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_dynamic_config:Modify the hard coded appparameter
Date: Thu, 10 Dec 2020 19:26:55 +0800 [thread overview]
Message-ID: <20201210112655.22020-1-junx.w.zhou@intel.com> (raw)
Modify the hard coded app parameter to call the platform interface
Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
tests/TestSuite_dynamic_config.py | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py
index a9c482e5..92f15d36 100644
--- a/tests/TestSuite_dynamic_config.py
+++ b/tests/TestSuite_dynamic_config.py
@@ -72,16 +72,12 @@ class TestDynamicConfig(TestCase):
self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
# Prepare cores and ports
- cores = self.dut.get_core_list('1S/2C/2T')
- self.coreMask = utils.create_mask(cores)
self.portMask = utils.create_mask(self.dut_ports[:2])
self.path=self.dut.apps_name['test-pmd']
# launch app
- cmd = "%s -c %s -n 3 -- -i --rxpt=0 \
- --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.path, self.coreMask, self.portMask)
-
- self.dut.send_expect("%s" % cmd, "testpmd> ", 120)
-
+ self.eal_para = self.dut.create_eal_parameters(cores="1S/2C/2T")
+ self.dut.send_expect(r'%s %s -- -i --rxpt=0 --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s'
+ % (self.path, self.eal_para, self.portMask), "testpmd>", 120)
# get dest address from self.target port
out = self.dut.send_expect(
"show port info %d" % self.dut_ports[0], "testpmd> ")
@@ -118,10 +114,9 @@ class TestDynamicConfig(TestCase):
"""
Run before each test case.
"""
- cmd = "%s -n 3 -- -i --rxpt=0 \
- --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s" % (self.path, self.portMask)
-
- self.dut.send_expect("%s" % cmd, "testpmd> ", 120)
+ self.eal_para = self.dut.create_eal_parameters('1S/2C/2T')
+ self.dut.send_expect(r'%s %s -- -i --rxpt=0 --rxht=0 --rxwt=0 --txpt=39 --txht=0 --txwt=0 --portmask=%s'
+ % (self.path, self.eal_para, self.portMask), "testpmd>", 120)
time.sleep(5)
self.dut.send_expect("start", "testpmd> ", 120)
--
2.17.1
next reply other threads:[~2020-12-10 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 11:26 Zhou Jun [this message]
2020-12-15 5:53 ` 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=20201210112655.22020-1-junx.w.zhou@intel.com \
--to=junx.w.zhou@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).