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 564BDA04A3; Mon, 4 Nov 2019 04:12:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42B9B5B3A; Mon, 4 Nov 2019 04:12:59 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D37A35B32 for ; Mon, 4 Nov 2019 04:12:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 19:12:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,265,1569308400"; d="scan'208";a="212222695" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 03 Nov 2019 19:12:55 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 19:12:54 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 19:12:54 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.108]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.225]) with mapi id 14.03.0439.000; Mon, 4 Nov 2019 11:12:52 +0800 From: "Mo, YufengX" To: "Xiao, QimaiX" , "dts@dpdk.org" , "Tu, Lijuan" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V2] tests/TestSuite_telemetry: update file_prefix in telemetry client Thread-Index: AQHVjXiKwjEcRP3EfEezXqYbCta/Vad6YCrA Date: Mon, 4 Nov 2019 03:12:52 +0000 Message-ID: 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: 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" Hi,qimai You create a new session. But you haven't close it in suite tear_down_all. BRs Yufen, Mo > -----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.= socket.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.= socket.send_fd.connect(\"\/var\/run\/dpdk\/{0}\/telemetry\")/g' > {1}".format( > + self.file_prefix, os.path.join(self.target_dir, 'dpdk_te= lemetry_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