test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xiao Qimai <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: Xiao Qimai <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1]tests/TestSuite_telemetry: start testpmd with fixed file_prefix
Date: Tue, 22 Oct 2019 02:07:57 -0400	[thread overview]
Message-ID: <1571724477-227823-1-git-send-email-qimaix.xiao@intel.com> (raw)

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


                 reply	other threads:[~2019-10-22  6:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1571724477-227823-1-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@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).