From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF4FBA328D for ; Tue, 22 Oct 2019 08:10:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A8D7E37B7; Tue, 22 Oct 2019 08:10:12 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 62A272D13 for ; Tue, 22 Oct 2019 08:10:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 23:10:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="209570999" Received: from unknown (HELO dpdk-xiaoqimai-tester.sh.intel.com) ([10.240.179.35]) by orsmga002.jf.intel.com with ESMTP; 21 Oct 2019 23:10:08 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Tue, 22 Oct 2019 02:07:57 -0400 Message-Id: <1571724477-227823-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V1]tests/TestSuite_telemetry: start testpmd with fixed file_prefix X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" start testpmd with fixed file_prefix and update dpdk_run_path in dpdk-telemetry-client.py Signed-off-by: Xiao Qimai --- 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