* [dts][PATCH V1 0/4] Support eal_param -a to avoid running containers
@ 2023-05-24 3:33 Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict Yu Jiang
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Yu Jiang @ 2023-05-24 3:33 UTC (permalink / raw)
To: lijuan.tu, dts; +Cc: Yu Jiang
Support eal_param -a to avoid running containers conflict
Yu Jiang (4):
tests/coremask: support eal_param -a to avoid running containers
conflict
tests/ethtool_stats: support eal_param -a to avoid running containers
conflict
tests/external_mempool_handler: support eal_param -a to avoid running
containers conflict
tests/multiple_pthread: support eal_param -a to avoid running
containers conflict
tests/TestSuite_coremask.py | 37 +++++++++++++----
tests/TestSuite_ethtool_stats.py | 10 +++--
tests/TestSuite_external_mempool_handler.py | 15 +++++--
tests/TestSuite_multiple_pthread.py | 46 ++++++++++++---------
4 files changed, 74 insertions(+), 34 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict
2023-05-24 3:33 [dts][PATCH V1 0/4] Support eal_param -a to avoid running containers Yu Jiang
@ 2023-05-24 3:33 ` Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 2/4] tests/ethtool_stats: " Yu Jiang
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Yu Jiang @ 2023-05-24 3:33 UTC (permalink / raw)
To: lijuan.tu, dts; +Cc: Yu Jiang
Support eal_param -a to avoid running containers conflict
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
tests/TestSuite_coremask.py | 37 ++++++++++++++++++++++++++++++-------
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py
index 8e95e998..210cd1f7 100644
--- a/tests/TestSuite_coremask.py
+++ b/tests/TestSuite_coremask.py
@@ -18,7 +18,7 @@ from framework.test_case import TestCase
# Test class.
#
-command_line = """./%s -c %s -n %d --log-level="lib.eal,8" """
+command_line = """./%s %s -c %s -n %d --log-level="lib.eal,8" """
class TestCoremask(TestCase):
@@ -43,6 +43,10 @@ class TestCoremask(TestCase):
self.all_cores = self.dut.get_core_list("all", socket=0)
else:
self.all_cores = self.dut.get_core_list("all")
+ self.dut_ports = self.dut.get_ports(self.nic)
+ self.eal_param_a = ""
+ for i in self.dut_ports:
+ self.eal_param_a += " -a {}".format(self.dut.ports_info[i]["pci"])
def set_up(self):
"""
@@ -58,8 +62,12 @@ class TestCoremask(TestCase):
for core in self.all_cores:
core_mask = utils.create_mask([core])
-
- command = command_line % (self.app_test_path, core_mask, self.mem_channel)
+ command = command_line % (
+ self.app_test_path,
+ self.eal_param_a,
+ core_mask,
+ self.mem_channel,
+ )
out = self.dut.send_expect(command, "RTE>>", 10)
self.verify(
@@ -82,7 +90,12 @@ class TestCoremask(TestCase):
first_core = self.all_cores[0]
- command = command_line % (self.app_test_path, core_mask, self.mem_channel)
+ command = command_line % (
+ self.app_test_path,
+ self.eal_param_a,
+ core_mask,
+ self.mem_channel,
+ )
out = self.dut.send_expect(command, "RTE>>", 10)
self.verify(
@@ -111,13 +124,18 @@ class TestCoremask(TestCase):
"""
Check coremask parsing for more cores than available.
"""
- command_line = """./%s -c %s -n %d --log-level="lib.eal,8" 2>&1 |tee out"""
+ command_line = """./%s %s -c %s -n %d --log-level="lib.eal,8" 2>&1 |tee out"""
# Create a extremely big coremask
big_coremask = "0x"
for _ in range(0, len(self.all_cores) + 1, 4):
big_coremask += "f"
- command = command_line % (self.app_test_path, big_coremask, self.mem_channel)
+ command = command_line % (
+ self.app_test_path,
+ self.eal_param_a,
+ big_coremask,
+ self.mem_channel,
+ )
try:
out = self.dut.send_expect(command, "RTE>>", 10)
except:
@@ -165,7 +183,12 @@ class TestCoremask(TestCase):
for coremask in wrong_coremasks:
- command = command_line % (self.app_test_path, coremask, self.mem_channel)
+ command = command_line % (
+ self.app_test_path,
+ self.eal_param_a,
+ coremask,
+ self.mem_channel,
+ )
try:
out = self.dut.send_expect(command, "# ", 5)
self.verify(
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts][PATCH V1 2/4] tests/ethtool_stats: support eal_param -a to avoid running containers conflict
2023-05-24 3:33 [dts][PATCH V1 0/4] Support eal_param -a to avoid running containers Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict Yu Jiang
@ 2023-05-24 3:33 ` Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 3/4] tests/external_mempool_handler: " Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 4/4] tests/multiple_pthread: " Yu Jiang
3 siblings, 0 replies; 6+ messages in thread
From: Yu Jiang @ 2023-05-24 3:33 UTC (permalink / raw)
To: lijuan.tu, dts; +Cc: Yu Jiang
Support eal_param -a to avoid running containers conflict
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
tests/TestSuite_ethtool_stats.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_ethtool_stats.py b/tests/TestSuite_ethtool_stats.py
index a148b7a9..9632c7e9 100644
--- a/tests/TestSuite_ethtool_stats.py
+++ b/tests/TestSuite_ethtool_stats.py
@@ -128,12 +128,10 @@ class TestEthtoolStats(TestCase):
def init_proc_info(self):
ports_count = len(self.dut_ports)
ports_mask = reduce(lambda x, y: x | y, [0x1 << x for x in range(ports_count)])
- app_name = self.dut.apps_name["proc-info"].split("/")[-1]
+ app_name = self.dut.apps_name["proc-info"]
self.query_tool = os.path.join(
self.target_dir,
- self.target,
- "app",
- app_name + "--file-prefix=%s" % self.prefix,
+ app_name + self.eal_param_a + " --file-prefix=%s" % self.prefix,
)
self.dpdk_proc_info = "%s -v -- -p %s" % (self.query_tool, ports_mask)
@@ -458,6 +456,10 @@ class TestEthtoolStats(TestCase):
self.dut_ports = self.dut.get_ports(self.nic)
self.verify(len(self.dut_ports) >= 1, "Insufficient ports")
self.prefix = "dpdk_" + self.dut.prefix_subfix
+ self.dut_ports = self.dut.get_ports(self.nic)
+ self.eal_param_a = ""
+ for i in self.dut_ports:
+ self.eal_param_a += " -a {}".format(self.dut.ports_info[i]["pci"])
self.preset_test_environment()
def set_up(self):
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts][PATCH V1 3/4] tests/external_mempool_handler: support eal_param -a to avoid running containers conflict
2023-05-24 3:33 [dts][PATCH V1 0/4] Support eal_param -a to avoid running containers Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 2/4] tests/ethtool_stats: " Yu Jiang
@ 2023-05-24 3:33 ` Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 4/4] tests/multiple_pthread: " Yu Jiang
3 siblings, 0 replies; 6+ messages in thread
From: Yu Jiang @ 2023-05-24 3:33 UTC (permalink / raw)
To: lijuan.tu, dts; +Cc: Yu Jiang
Support eal_param -a to avoid running containers conflict
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
tests/TestSuite_external_mempool_handler.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_external_mempool_handler.py b/tests/TestSuite_external_mempool_handler.py
index 58971e31..c214aae6 100644
--- a/tests/TestSuite_external_mempool_handler.py
+++ b/tests/TestSuite_external_mempool_handler.py
@@ -12,7 +12,7 @@ from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-class TestExternalMempool(TestCase):
+class TestExternalMempoolHandler(TestCase):
def set_up_all(self):
"""
Run at the start of each test suite.
@@ -20,7 +20,9 @@ class TestExternalMempool(TestCase):
self.dut_ports = self.dut.get_ports()
self.verify(len(self.dut_ports) >= 2, "Not enough ports")
-
+ self.eal_param_a = ""
+ for i in self.dut_ports:
+ self.eal_param_a += " -a {}".format(self.dut.ports_info[i]["pci"])
self.pmdout = PmdOutput(self.dut)
self.app_test_path = self.dut.apps_name["test"]
@@ -33,7 +35,8 @@ class TestExternalMempool(TestCase):
def verify_unit_func(self, ops=""):
self.dut.send_expect(
- "./%s -n 4 -c f --mbuf-pool-ops-name %s" % (self.app_test_path, ops),
+ "./%s%s -n 4 -c f --mbuf-pool-ops-name %s"
+ % (self.app_test_path, self.eal_param_a, ops),
"R.*T.*E.*>.*>",
60,
)
@@ -42,7 +45,11 @@ class TestExternalMempool(TestCase):
self.verify("Test OK" in out, "Mempool autotest failed")
def verify_unit_perf(self):
- self.dut.send_expect("./%s -n 4 -c f" % self.app_test_path, "R.*T.*E.*>.*>", 60)
+ self.dut.send_expect(
+ "./%s%s -n 4 -c f" % (self.app_test_path, self.eal_param_a),
+ "R.*T.*E.*>.*>",
+ 60,
+ )
out = self.dut.send_expect("mempool_perf_autotest", "RTE>>", 1200)
self.dut.send_expect("quit", "# ")
# may need to compare performance
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts][PATCH V1 4/4] tests/multiple_pthread: support eal_param -a to avoid running containers conflict
2023-05-24 3:33 [dts][PATCH V1 0/4] Support eal_param -a to avoid running containers Yu Jiang
` (2 preceding siblings ...)
2023-05-24 3:33 ` [dts][PATCH V1 3/4] tests/external_mempool_handler: " Yu Jiang
@ 2023-05-24 3:33 ` Yu Jiang
2023-05-25 2:36 ` lijuan.tu
3 siblings, 1 reply; 6+ messages in thread
From: Yu Jiang @ 2023-05-24 3:33 UTC (permalink / raw)
To: lijuan.tu, dts; +Cc: Yu Jiang
Support eal_param -a to avoid running containers conflict
Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
tests/TestSuite_multiple_pthread.py | 46 +++++++++++++++++------------
1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py
index 253d6a4a..6c15077f 100644
--- a/tests/TestSuite_multiple_pthread.py
+++ b/tests/TestSuite_multiple_pthread.py
@@ -23,6 +23,9 @@ class TestMultiplePthread(TestCase):
"Test suite currently only supports Linux platforms",
)
self.dut_ports = self.dut.get_ports(self.nic)
+ self.eal_param_a = ""
+ for i in self.dut_ports:
+ self.eal_param_a += " -a {}".format(self.dut.ports_info[i]["pci"])
global valports
valports = [_ for _ in self.dut_ports if self.tester.get_local_port(_) != -1]
# Verify that enough ports are available
@@ -110,14 +113,19 @@ class TestMultiplePthread(TestCase):
# Allocate enough streams based on the number of CPUs
if len(cpu_list) > 2:
queue_num = len(cpu_list)
- cmdline = './%s --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % (
+ cmdline = './%s%s --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % (
self.path,
+ self.eal_param_a,
lcores,
queue_num,
queue_num,
)
else:
- cmdline = './%s --lcores="%s" -n 4 -- -i' % (self.path, lcores)
+ cmdline = './%s%s --lcores="%s" -n 4 -- -i' % (
+ self.path,
+ self.eal_param_a,
+ lcores,
+ )
# start application
self.dut.send_expect(cmdline, "testpmd", 60)
@@ -229,26 +237,26 @@ class TestMultiplePthread(TestCase):
Test an random parameter from an defined table which has a couple of invalid lcore parameters.
"""
cmdline_list = [
- "./%s --lcores='(0-,4-7)@(4,5)' -n 4 -- -i",
- "./%s --lcores='(-1,4-7)@(4,5)' -n 4 -- -i",
- "./%s --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i",
- "./%s --lcores='(0,abcd)@(4,5)' -n 4 -- -i",
- "./%s --lcores='(0,4-7)@(1-,5)' -n 4 -- -i",
- "./%s --lcores='(0,4-7)@(-1,5)' -n 4 -- -i",
- "./%s --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i",
- "./%s --lcores='(0,4-7)@(abc,5)' -n 4 -- -i",
- "./%s --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i",
- "./%s --lcores='(0,4-7)=(8,9)' -n 4 -- -i",
- "./%s --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i",
- "./%s --lcores='[0-,4-7]@(4,5)' -n 4 -- -i",
- "./%s --lcores='(0-,4-7)@[4,5]' -n 4 -- -i",
- "./%s --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i",
- "./%s --lcores='2,,3''2--3' -n 4 -- -i",
- "./%s --lcores='2,,,3''2--3' -n 4 -- -i",
+ "./%s%s --lcores='(0-,4-7)@(4,5)' -n 4 -- -i",
+ "./%s%s --lcores='(-1,4-7)@(4,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7-9)@(4,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0,abcd)@(4,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7)@(1-,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7)@(-1,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7)@(abc,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7)@(4,xyz)' -n 4 -- -i",
+ "./%s%s --lcores='(0,4-7)=(8,9)' -n 4 -- -i",
+ "./%s%s --lcores='2,3 at 4,(0-1,,4))' -n 4 -- -i",
+ "./%s%s --lcores='[0-,4-7]@(4,5)' -n 4 -- -i",
+ "./%s%s --lcores='(0-,4-7)@[4,5]' -n 4 -- -i",
+ "./%s%s --lcores='3-4 at 3,2 at 5-6' -n 4 -- -i",
+ "./%s%s --lcores='2,,3''2--3' -n 4 -- -i",
+ "./%s%s --lcores='2,,,3''2--3' -n 4 -- -i",
]
cmdline = random.sample(cmdline_list, 1)
- out = self.dut.send_expect(cmdline[0] % self.path, "#", 60)
+ out = self.dut.send_expect(cmdline[0] % (self.path, self.eal_param_a), "#", 60)
self.verify("invalid parameter" in out, "it's a valid parameter")
def tear_down(self):
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dts][PATCH V1 4/4] tests/multiple_pthread: support eal_param -a to avoid running containers conflict
2023-05-24 3:33 ` [dts][PATCH V1 4/4] tests/multiple_pthread: " Yu Jiang
@ 2023-05-25 2:36 ` lijuan.tu
0 siblings, 0 replies; 6+ messages in thread
From: lijuan.tu @ 2023-05-25 2:36 UTC (permalink / raw)
To: lijuan.tu, dts, Yu Jiang; +Cc: Yu Jiang
On Wed, 24 May 2023 11:33:28 +0800, Yu Jiang <yux.jiang@intel.com> wrote:
> Support eal_param -a to avoid running containers conflict
>
> Signed-off-by: Yu Jiang <yux.jiang@intel.com>
Reviewed-by: Lijuan Tu <lijuan.tu@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-25 2:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 3:33 [dts][PATCH V1 0/4] Support eal_param -a to avoid running containers Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 2/4] tests/ethtool_stats: " Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 3/4] tests/external_mempool_handler: " Yu Jiang
2023-05-24 3:33 ` [dts][PATCH V1 4/4] tests/multiple_pthread: " Yu Jiang
2023-05-25 2:36 ` lijuan.tu
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).