test suite reviews and discussions
 help / color / mirror / Atom feed
From: Yu Jiang <yux.jiang@intel.com>
To: lijuan.tu@intel.com, dts@dpdk.org
Cc: Yu Jiang <yux.jiang@intel.com>
Subject: [dts][PATCH V1 1/4] tests/coremask: support eal_param -a to avoid running containers conflict
Date: Wed, 24 May 2023 11:33:25 +0800	[thread overview]
Message-ID: <20230524033328.2146223-2-yux.jiang@intel.com> (raw)
In-Reply-To: <20230524033328.2146223-1-yux.jiang@intel.com>

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


  reply	other threads:[~2023-05-24  3:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-05-24  3:33 ` [dts][PATCH V1 2/4] tests/ethtool_stats: support eal_param -a to avoid running containers conflict 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

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=20230524033328.2146223-2-yux.jiang@intel.com \
    --to=yux.jiang@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    /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).