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_external_memory:Modify the hard coded appparameter
Date: Thu, 10 Dec 2020 19:30:41 +0800 [thread overview]
Message-ID: <20201210113041.22140-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_external_memory.py | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/tests/TestSuite_external_memory.py b/tests/TestSuite_external_memory.py
index f899ae74..53522a79 100644
--- a/tests/TestSuite_external_memory.py
+++ b/tests/TestSuite_external_memory.py
@@ -46,11 +46,9 @@ class TestExternalMemory(TestCase):
"""
Run at the start of each test suite.
"""
-
self.dut_ports = self.dut.get_ports(self.nic)
self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
- cores = self.dut.get_core_list("1S/4C/1T")
- self.coremask = utils.create_mask(cores)
+
self.app_testpmd_path = self.dut.apps_name['test-pmd']
def set_up(self):
@@ -93,8 +91,9 @@ class TestExternalMemory(TestCase):
Verifier IGB_UIO and anonymous memory allocation
"""
self.insmod_modprobe(modename="igb_uio")
-
- cmd = "./%s -c %s -n 4 -- --mp-alloc=xmem -i" % (self.app_testpmd_path, self.coremask)
+ self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T")
+ self.dut.send_expect(r'./%s %s -- --mp-alloc=xmem -i'
+ % (self.app_testpmd_path, self.eal_para), "link state change event", 60)
self.dut.send_expect(cmd,"testpmd>",60)
self.verifier_result()
@@ -104,9 +103,9 @@ class TestExternalMemory(TestCase):
Verifier IGB_UIO and anonymous hugepage memory allocation
"""
self.insmod_modprobe(modename="igb_uio")
- cmd = "./%s -c %s -n 4 -- --mp-alloc=xmemhuge -i" % (self.app_testpmd_path, self.coremask)
-
- self.dut.send_expect(cmd,"testpmd>",60)
+ self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T")
+ self.dut.send_expect(r'./%s %s -- --mp-alloc=xmemhuge -i'
+ % (self.app_testpmd_path, self.eal_para), "link state change event", 60)
self.verifier_result()
def test_VFIO_PCI_xmem(self):
@@ -114,8 +113,10 @@ class TestExternalMemory(TestCase):
Verifier VFIO_PCI and anonymous memory allocation
"""
self.insmod_modprobe(modename="vfio-pci")
- cmd = "./%s -c %s -n 4 -- --mp-alloc=xmem -i" % (self.app_testpmd_path, self.coremask)
- self.dut.send_expect(cmd,"testpmd>",60)
+
+ self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T")
+ self.dut.send_expect(r'./%s %s -- --mp-alloc=xmem -i'
+ % (self.app_testpmd_path, self.eal_para),"testpmd>",60)
self.verifier_result()
@@ -124,8 +125,10 @@ class TestExternalMemory(TestCase):
Verifier VFIO and anonymous hugepage memory allocation
"""
self.insmod_modprobe(modename="vfio-pci")
- cmd = "./%s -c %s -n 4 -- --mp-alloc=xmemhuge -i" % (self.app_testpmd_path, self.coremask)
- self.dut.send_expect(cmd,"testpmd>",60)
+
+ self.eal_para = self.dut.create_eal_parameters(cores="1S/4C/1T")
+ self.dut.send_expect(r'./%s %s -- --mp-alloc=xmemhuge -i'
+ % (self.app_testpmd_path, self.eal_para),"testpmd>",60)
self.verifier_result()
--
2.17.1
next reply other threads:[~2020-12-10 11:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 11:30 Zhou Jun [this message]
2020-12-15 5:55 ` 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=20201210113041.22140-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).