From: lingwei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: lingwei <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/ipfrag: add -a params when tester and dut in the same server
Date: Tue, 15 Dec 2020 19:27:54 +0800 [thread overview]
Message-ID: <20201215112754.25422-1-weix.ling@intel.com> (raw)
1.add -a params when tester and dut in the same server
2.use dut.create_eal_parameters method create params
Signed-off-by: lingwei <weix.ling@intel.com>
---
tests/TestSuite_ipfrag.py | 31 ++++++++++---------------------
1 file changed, 10 insertions(+), 21 deletions(-)
diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index 84725dad..e9972659 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -85,20 +85,20 @@ class TestIpfrag(TestCase):
"""
# Based on h/w type, choose how many ports to use
- ports = self.dut.get_ports()
+ self.ports = self.dut.get_ports()
# Verify that enough ports are available
- self.verify(len(ports) >= 2, "Insufficient ports for testing")
+ self.verify(len(self.ports) >= 2, "Insufficient ports for testing")
- self.ports_socket = self.dut.get_numa_id(ports[0])
+ self.ports_socket = self.dut.get_numa_id(self.ports[0])
# Verify that enough threads are available
cores = self.dut.get_core_list("1S/1C/1T")
self.verify(cores is not None, "Insufficient cores for speed testing")
global P0, P1
- P0 = ports[0]
- P1 = ports[1]
+ P0 = self.ports[0]
+ P1 = self.ports[1]
pat = re.compile("P([0123])")
@@ -123,13 +123,9 @@ class TestIpfrag(TestCase):
self.verify("Error" not in out, "compilation error 1")
self.verify("No such file" not in out, "compilation error 2")
- cores = self.dut.get_core_list("1S/1C/2T")
- self.eal_para = self.dut.create_eal_parameters(cores='1S/1C/2T')
- coremask = utils.create_mask(cores)
+ self.eal_para = self.dut.create_eal_parameters(cores='1S/1C/2T', socket=self.ports_socket, ports=self.ports)
portmask = utils.create_mask([P0, P1])
numPortThread = len([P0, P1]) / len(cores)
- result = True
- errString = ''
# run ipv4_frag
self.app_ip_fragmentation_path = self.dut.apps_name['ip_fragmentation']
@@ -299,20 +295,13 @@ class TestIpfrag(TestCase):
Pct = dict()
if int(lcore[0]) == 1:
- core_mask = utils.create_mask(self.dut.get_core_list(lcore, socket=self.ports_socket))
+ eal_param = self.dut.create_eal_parameters(cores=lcore, socket=self.ports_socket, ports=self.ports)
else:
- core_mask = utils.create_mask(self.dut.get_core_list(lcore))
-
+ eal_param = self.dut.create_eal_parameters(cores=lcore, ports=self.ports)
portmask = utils.create_mask([P0, P1])
- eal_param = ""
- for i in [P0, P1]:
- eal_param += " -w %s" % self.dut.ports_info[i]['pci']
-
self.dut.send_expect("^c", "# ", 120)
- self.dut.send_expect("%s -c %s -n %d %s -- -p %s -q %s" % (self.app_ip_fragmentation_path, core_mask,
- self.dut.get_memory_channels(), eal_param, portmask,
- num_pthreads), "IP_FRAG:", 120)
-
+ self.dut.send_expect("%s %s -- -p %s -q %s" % (self.app_ip_fragmentation_path, eal_param, portmask,
+ num_pthreads), "IP_FRAG:", 120)
result = [2, lcore, num_pthreads]
for size in size_list:
dmac = self.dut.get_mac_address(P0)
--
2.17.1
next reply other threads:[~2020-12-15 3:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 11:27 lingwei [this message]
2020-12-15 3:33 ` Ling, WeiX
2020-12-15 7:18 ` 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=20201215112754.25422-1-weix.ling@intel.com \
--to=weix.ling@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).