[V1,2/4] tests/ethtool_stats: support eal_param -a to avoid running containers conflict

Message ID 20230524033328.2146223-3-yux.jiang@intel.com (mailing list archive)
State Accepted
Headers
Series Support eal_param -a to avoid running containers |

Commit Message

Yu Jiang May 24, 2023, 3:33 a.m. UTC
  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(-)
  

Patch

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):