From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 076C91B567 for ; Mon, 11 Feb 2019 02:40:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2019 17:40:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,357,1544515200"; d="scan'208";a="113887302" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga007.jf.intel.com with ESMTP; 10 Feb 2019 17:40:54 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 10 Feb 2019 17:40:54 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 10 Feb 2019 17:40:53 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.194]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.253]) with mapi id 14.03.0415.000; Mon, 11 Feb 2019 09:40:52 +0800 From: "Li, WenjieX A" To: "Tu, Lijuan" , "Zhu, WenhuiX" , "dts@dpdk.org" CC: "Zhu, WenhuiX" Thread-Topic: [dts] [PATCH V4] tests/dual_vlan Change the verify outside the loop Thread-Index: AQHUupf0+j7NklsH0ku8al+LprO3oqXLuLmAgA4itTA= Date: Mon, 11 Feb 2019 01:40:51 +0000 Message-ID: <8688172CD5C0B74590FAE19D9579F94B536468C5@SHSMSX103.ccr.corp.intel.com> References: <1549071693-50577-1-git-send-email-wenhuix.zhu@intel.com> <8CE3E05A3F976642AAB0F4675D0AD20E0BA2014F@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <8CE3E05A3F976642AAB0F4675D0AD20E0BA2014F@SHSMSX101.ccr.corp.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 V4] tests/dual_vlan Change the verify outside the loop 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: , X-List-Received-Date: Mon, 11 Feb 2019 01:40:56 -0000 Hi Lijuan, Will break the loop if the link status is still down after 10 seconds. =20 port_time_up =3D 0 while (port_time_up <=3D 10) and ("Link status: down" in out): time.sleep(1) out =3D self.dut.send_expect("show port info %s" % port_id,= "testpmd> ") port_time_up +=3D 1 self.verify("Link status: down" not in out, "Port %s Link d= own, please check your link" % port_id) BR, Wenjie > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Tu, Lijuan > Sent: Saturday, February 2, 2019 5:31 PM > To: Zhu, WenhuiX ; dts@dpdk.org > Cc: Zhu, WenhuiX > Subject: Re: [dts] [PATCH V4] tests/dual_vlan Change the verify outside t= he loop >=20 > Hi wenhui, >=20 > Do you forget to set a condition to break the loop? I assumed you 'd like= to > break the loop if the Link status is up. >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhuwenhui > > Sent: Saturday, February 2, 2019 9:42 AM > > To: dts@dpdk.org > > Cc: Zhu, WenhuiX > > Subject: [dts] [PATCH V4] tests/dual_vlan Change the verify outside > > the loop > > > > Verification should be outside the loop of the query port > > > > Signed-off-by: zhuwenhui > > --- > > tests/TestSuite_dual_vlan.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tests/TestSuite_dual_vlan.py > > b/tests/TestSuite_dual_vlan.py index d7fba3d..42497ef 100644 > > --- a/tests/TestSuite_dual_vlan.py > > +++ b/tests/TestSuite_dual_vlan.py > > @@ -192,7 +192,7 @@ class TestDualVlan(TestCase): > > time.sleep(1) > > out =3D self.dut.send_expect("show port info %s" % por= t_id, "testpmd> > ") > > port_time_up +=3D 1 > > - self.verify("Link status: down" not in out, "Port %s L= ink down, please > > check your link" % port_id) > > + self.verify("Link status: down" not in out, "Port %s Link > > + down, please check your link" % port_id) > > > > def multimode_test(self, caseIndex): > > """ > > -- > > 2.17.2