From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C2E2BA0679 for ; Wed, 3 Apr 2019 18:24:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E36A1B4BD; Wed, 3 Apr 2019 18:24:25 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 31D361B4AE for ; Wed, 3 Apr 2019 18:24:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2019 09:24:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,305,1549958400"; d="scan'208";a="139691730" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 03 Apr 2019 09:24:18 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 3 Apr 2019 09:23:40 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 3 Apr 2019 09:23:40 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.139]) with mapi id 14.03.0415.000; Thu, 4 Apr 2019 00:23:38 +0800 From: "Tu, Lijuan" To: "Zhao, MeijuanX" , "dts@dpdk.org" CC: "Zhao, MeijuanX" Thread-Topic: [dts] [PATCH V1] tests/link_flowctrl: fix syntax error Thread-Index: AQHU4uaWJyfNyca2pkq+VfqTFdTlUqYqrHaA Date: Wed, 3 Apr 2019 16:23:37 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA5B4F9@SHSMSX101.ccr.corp.intel.com> References: <20190325154256.7073-1-meijuanx.zhao@intel.com> In-Reply-To: <20190325154256.7073-1-meijuanx.zhao@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.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOGQ4OWQ2ZGQtMjNlOS00MmI1LWI5NmYtMDgxOGY5NjUwN2RkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibWxvRkNUUnhNYUJcL1locWF6M3JJQ1wvMTVoSm9qa0dHSThEQkZIZWowN2k0TWZzcDQ2TmM3ZkdtaDVLV2NvTG1RIn0= 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/link_flowctrl: fix syntax error 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" The function has 3 return value, if you just want the first value, it's mo= re readable: Result, _, _ =3D self.tester.traffic_generator_loss(tgenInput, 100) Only 1 change could solve your problem, it's a more easy way. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhaomeijuan > Sent: Monday, March 25, 2019 8:43 AM > To: dts@dpdk.org > Cc: Zhao, MeijuanX > Subject: [dts] [PATCH V1] tests/link_flowctrl: fix syntax error >=20 > From: "meijuanx.zhao" >=20 > Signed-off-by: meijuanx.zhao > --- > tests/TestSuite_link_flowctrl.py | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) >=20 > diff --git a/tests/TestSuite_link_flowctrl.py b/tests/TestSuite_link_flow= ctrl.py > index 0057b46..83fd724 100644 > --- a/tests/TestSuite_link_flowctrl.py > +++ b/tests/TestSuite_link_flowctrl.py > @@ -339,9 +339,9 @@ class TestLinkFlowctrl(TestCase): > tx_flow_control=3D'on', > pause_frame_fwd=3D'on') >=20 > - print "Packet loss: %.3f%%" % result > + print "Packet loss: %.3f%%" % result[0] >=20 > - self.verify(result <=3D 0.01, > + self.verify(result[0] <=3D 0.01, > "Link flow control fail, the loss percent is more th= an 1%") >=20 > def test_perf_flowctrl_on_pause_fwd_off(self): > @@ -353,9 +353,9 @@ class TestLinkFlowctrl(TestCase): > tx_flow_control=3D'on', > pause_frame_fwd=3D'off') >=20 > - print "Packet loss: %.3f%%" % result > + print "Packet loss: %.3f%%" % result[0] >=20 > - self.verify(result <=3D 0.01, > + self.verify(result[0] <=3D 0.01, > "Link flow control fail, the loss percent is more th= an 1%") >=20 > def test_perf_flowctrl_rx_on(self): > @@ -367,9 +367,9 @@ class TestLinkFlowctrl(TestCase): > tx_flow_control=3D'on', > pause_frame_fwd=3D'off') >=20 > - print "Packet loss: %.3f%%" % result > + print "Packet loss: %.3f%%" % result[0] >=20 > - self.verify(result <=3D 0.01, > + self.verify(result[0] <=3D 0.01, > "Link flow control fail, the loss percent is more th= an 1%") >=20 > def test_perf_flowctrl_off_pause_fwd_on(self): > @@ -381,9 +381,9 @@ class TestLinkFlowctrl(TestCase): > tx_flow_control=3D'off', > pause_frame_fwd=3D'on') >=20 > - print "Packet loss: %.3f%%" % result > + print "Packet loss: %.3f%%" % result[0] >=20 > - self.verify(result >=3D 0.5, > + self.verify(result[0] >=3D 0.5, > "Link flow control fail, the loss percent is less th= an 50%") >=20 > def test_perf_flowctrl_off_pause_fwd_off(self): > @@ -395,9 +395,9 @@ class TestLinkFlowctrl(TestCase): > tx_flow_control=3D'off', > pause_frame_fwd=3D'off') >=20 > - print "Packet loss: %.3f%%" % result > + print "Packet loss: %.3f%%" % result[0] >=20 > - self.verify(result >=3D 0.5, > + self.verify(result[0] >=3D 0.5, > "Link flow control fail, the loss percent is less th= an 50%") >=20 > def test_perf_flowctrl_tx_on(self): > @@ -409,9 +409,9 @@ class TestLinkFlowctrl(TestCase): > tx_flow_control=3D'on', > pause_frame_fwd=3D'off') >=20 > - print "Packet loss: %.3f%%" % result > + print "Packet loss: %.3f%%" % result[0] >=20 > - self.verify(result <=3D 0.01, > + self.verify(result[0] <=3D 0.01, > "Link flow control fail, the loss percent is more th= an 1%") >=20 > def tear_down_all(self): > -- > 2.17.1