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 A97BAA04C1; Fri, 22 Nov 2019 06:30:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6A6C22C2B; Fri, 22 Nov 2019 06:30:33 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DE2BE2C28 for ; Fri, 22 Nov 2019 06:30:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 21:30:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,228,1571727600"; d="scan'208";a="407468568" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 21 Nov 2019 21:30:30 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 21:30:30 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 21 Nov 2019 21:30:30 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.149]) with mapi id 14.03.0439.000; Fri, 22 Nov 2019 13:30:28 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]tests/TestSuite_telemetry: use existed session instead of creating a new session Thread-Index: AQHVlHWEf5Ar1jjL1EevcmsDKktuO6eWwvBg Date: Fri, 22 Nov 2019 05:30:27 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB67677@SHSMSX101.ccr.corp.intel.com> References: <1573026037-87704-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1573026037-87704-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzRhNTU3NmQtNjA2Zi00ZDA1LWI2NmEtNGMwNjQ2ZmEwYjRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUWtXK3U3Y3NKbkxnQjlYWG1jb2tBeTYyek9xUVJ2TE1DV0xTcG9FY05zaGkwTWlTdG1mZEVvTU9QdTN5cE0rbSJ9 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 V1]tests/TestSuite_telemetry: use existed session instead of creating a new session 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: Wednesday, November 6, 2019 3:41 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V1]tests/TestSuite_telemetry: use existed session > instead of creating a new session >=20 > optimize scripts, use existed session to send command >=20 > Signed-off-by: Xiao Qimai > --- > tests/TestSuite_telemetry.py | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) >=20 > diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py = index > c6e7e08..13a0729 100644 > --- a/tests/TestSuite_telemetry.py > +++ b/tests/TestSuite_telemetry.py > @@ -451,13 +451,12 @@ class TestTelemetry(TestCase): > 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= ( > + cmd2 =3D "sed -i > + 's/self.socket.send_fd.connect(\"\/var\/run\/dpdk\/.*\/telemetry\")/se > + lf.socket.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.d_a_console(cmd1) > + self.d_a_console(cmd2) > self.change_flag =3D True >=20 > def verify_basic_script(self): > -- > 1.8.3.1