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 D4E34A04A3; Mon, 4 Nov 2019 03:42:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C6E1B397D; Mon, 4 Nov 2019 03:42:03 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 6119C37B4 for ; Mon, 4 Nov 2019 03:42:02 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 18:42:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,265,1569308400"; d="scan'208";a="226615097" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 03 Nov 2019 18:42:01 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 18:42:01 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 3 Nov 2019 18:41:58 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 3 Nov 2019 18:41:58 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.200]) with mapi id 14.03.0439.000; Mon, 4 Nov 2019 10:41:56 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V2] tests/TestSuite_telemetry: update file_prefix in telemetry client Thread-Index: AQHVjXiKoYZhdu8POEOScU92KgxJj6d6V95w Date: Mon, 4 Nov 2019 02:41:55 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB5D289@SHSMSX101.ccr.corp.intel.com> References: <1572300871-27885-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1572300871-27885-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjk0YmRjYmQtZjVhMi00ZGE3LTgyMmItY2UwZDIwNDE3OWJmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK2kwVHU1Y09UdFltaENIVmYwbkRXa0k1OGNwYlp0OXQySnpjbStPcWczTDRHUVVwaGhMQmtPTWg1dDRraklWSCJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2] tests/TestSuite_telemetry: update file_prefix in telemetry client 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai > Sent: Tuesday, October 29, 2019 6:15 AM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V2] tests/TestSuite_telemetry: update file_prefix i= n > telemetry client >=20 > update file_prefix in telemetry client after testpmd launched >=20 > Signed-off-by: Xiao Qimai > --- > tests/TestSuite_telemetry.py | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) >=20 > diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py = index > bb2c9e6..c6e7e08 100644 > --- a/tests/TestSuite_telemetry.py > +++ b/tests/TestSuite_telemetry.py > @@ -250,6 +250,8 @@ class TestTelemetry(TestCase): > socket=3Dsocket) > self.testpmd_status =3D 'running' > self.testpmd.execute_cmd('start') > + if not self.change_flag: > + self.change_run_fileprefix(output) > return output >=20 > def close_telemetry_server(self): > @@ -441,6 +443,22 @@ class TestTelemetry(TestCase): > # > # test content > # > + def get_file_prefix(self, out): > + m =3D re.search('socket /var/run/dpdk/(.+?)/', out) > + if m: > + self.file_prefix =3D m.group(1) if m.group(1) !=3D "rte" els= e > + None > + > + def change_run_fileprefix(self, out): > + self.get_file_prefix(out) > + if self.file_prefix: > + self.dut_session2 =3D self.dut.new_session() > + cmd1 =3D "sed -i > 's/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/.*\/telemetry\")/self.= so > cket.send_fd.connect(\"\/var\/run\/dpdk\/{0}\/telemetry\")/g' {1}".format= ( > + self.file_prefix, os.path.join(self.target_dir, 'usertoo= ls/dpdk- > telemetry-client.py')) > + cmd =3D "sed -i > 's/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/.*\/telemetry\")/self.= so > cket.send_fd.connect(\"\/var\/run\/dpdk\/{0}\/telemetry\")/g' {1}".format= ( > + self.file_prefix, os.path.join(self.target_dir, > 'dpdk_telemetry_client.py')) > + self.dut_session2.send_expect(cmd1, "# ", 3) > + self.dut_session2.send_expect(cmd, "# ", 3) > + self.change_flag =3D True >=20 > def verify_basic_script(self): > ''' > @@ -553,6 +571,7 @@ class TestTelemetry(TestCase): > self.init_test_binary_files() > self.nic_grp =3D self.get_ports_by_nic_type() > self.used_ports =3D [] > + self.change_flag =3D False >=20 > def set_up(self): > """ > -- > 1.8.3.1