test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]tests/TestSuite_telemetry: start testpmd with fixed file_prefix
@ 2019-10-22  6:07 Xiao Qimai
  0 siblings, 0 replies; only message in thread
From: Xiao Qimai @ 2019-10-22  6:07 UTC (permalink / raw)
  To: dts; +Cc: Xiao Qimai

start testpmd with fixed file_prefix and update dpdk_run_path in dpdk-telemetry-client.py

Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_telemetry.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py
index bb2c9e6..4ba6ae0 100644
--- a/tests/TestSuite_telemetry.py
+++ b/tests/TestSuite_telemetry.py
@@ -139,8 +139,8 @@ class TestTelemetry(TestCase):
         cmds = [
             'rm -f {0}/{1}',
             'cp -f {0}/usertools/dpdk-telemetry-client.py {0}/{1}',
-            "sed -i -e 's/class Client:/class Client(object):/g' {0}/{1}"]
-        cmd = ';'.join(cmds).format(self.target_dir, new_name, old_name)
+            "sed -i -e 's/class Client:/class Client(object):/g' -e 's/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/rte\/telemetry\")/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/{3}\/telemetry\")/g' {0}/{1}"]
+        cmd = ';'.join(cmds).format(self.target_dir, new_name, old_name, self.file_prefix)
         self.d_a_console(cmd)
         self.create_query_script()
 
@@ -244,10 +244,10 @@ class TestTelemetry(TestCase):
         # use dut first port's socket
         socket = self.dut.get_numa_id(0)
         config = "Default"
-        eal_option = '--telemetry ' + whitelist if whitelist else '--telemetry'
+        eal_option = '--file-prefix=%s --telemetry ' % self.file_prefix + whitelist if whitelist else '--file-prefix=%s --telemetry' % self.file_prefix
         output = self.testpmd.start_testpmd(config,
                                             eal_param=eal_option,
-                                            socket=socket)
+                                            socket=socket, fixed_prefix=True)
         self.testpmd_status = 'running'
         self.testpmd.execute_cmd('start')
         return output
@@ -344,6 +344,7 @@ class TestTelemetry(TestCase):
         self.dut_s_session = self.dut.new_session()
         dpdk_tool = os.path.join(
             self.target_dir, 'usertools/dpdk-telemetry-client.py')
+        self.dut_s_session.send_expect("sed -i 's/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/rte\/telemetry\")/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/{0}\/telemetry\")/g' {1}".format(self.file_prefix, dpdk_tool), "# ",3)
         output = self.dut_s_session.send_expect(dpdk_tool, ':', 5)
         return output
 
@@ -550,6 +551,7 @@ class TestTelemetry(TestCase):
         # get ports information
         self.dut_ports = self.dut.get_ports()
         self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
+        self.file_prefix = 'dpdk_telemetry'
         self.init_test_binary_files()
         self.nic_grp = self.get_ports_by_nic_type()
         self.used_ports = []
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-22  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22  6:07 [dts] [PATCH V1]tests/TestSuite_telemetry: start testpmd with fixed file_prefix Xiao Qimai

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