From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0072.outbound.protection.outlook.com [104.47.1.72]) by dpdk.org (Postfix) with ESMTP id E83AF6841 for ; Mon, 7 Aug 2017 05:25:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DrgU4txu6m8A2sIczbd4VYiW3xHr+ITRN11vjtU3ZOM=; b=DT2LymDJtMP+ixZPE3mH3vRbkwAWFTx7/kdOtEXZUC/oITZbQ131X+t6W6DMsbUtIJC6H+BdycOXankjbSYz7WdhdL+1IRKqUt9kDyBvN3NPzDT2yXyswCP0Y9aqr5pcSydYFinHW716cYLtVGs48dNTSTAkQyRyEpglXwlBDyA= Received: from HE1PR08MB2809.eurprd08.prod.outlook.com (10.170.246.148) by HE1PR08MB2809.eurprd08.prod.outlook.com (10.170.246.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Mon, 7 Aug 2017 03:25:34 +0000 Received: from HE1PR08MB2809.eurprd08.prod.outlook.com ([fe80::1074:f9ad:c2c1:26f7]) by HE1PR08MB2809.eurprd08.prod.outlook.com ([fe80::1074:f9ad:c2c1:26f7%13]) with mapi id 15.01.1304.025; Mon, 7 Aug 2017 03:25:34 +0000 From: Herbert Guan To: "Liu, Yong" , "dts@dpdk.org" , "jianbo.liu@linaro.org" Thread-Topic: [dts] [PATCH] framework: wait 10 seconds after testpmd starts to ensure link is up Thread-Index: AQHTDybZ2ZCas9qlm0StHurzvqznl6J4OQ8A Date: Mon, 7 Aug 2017 03:25:34 +0000 Message-ID: References: <1501831192-31150-1-git-send-email-herbert.guan@arm.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E3B6E8@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62E3B6E8@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Herbert.Guan@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR08MB2809; 6:lPIlevSzjMsnc5bTVd57e/JTo6lIQt+rn4eIi3oy5R2SKOWoc2tD39rCuJQbMoFgfjaPhyve3Rg8m5hnVkTKbRs84NhO0qqUbWSo3B7CocJIzcC5XThONyKtEi9RPF+IXXE9PJN6DCTvqdp0l761Q/8uoS2yObpSmGBx6KksQjvgVAZzSXhpxmlt3LWtSt+vQ5y2kXf6cUYIlCgZZw0eX3vOcXAdOrzWdHJpW0M0vMvORIN1ZWlLVktntmrS/BmEApavcbF+PpjofMSzIj/p1zGd2Zis+VtaojIiUQSaHH7ce/Woxd45CiiCVSkWP7IJQ8TVydf4mKwNX/cOpPV7iw==; 5:YPZZYQTIM8H+CLD7TNjBe7wWacb/mXvZFh9rPeLQ+Vlrq3Yj4ihDRH81B5k3JYJk/rqTehjra2sejmlu8syWvyndBUSTkdKZ/zIVYiTJt2eJlfiJeZcgtzKvt6wqqC0cMoNkGvRbIJsLouyNIJoaKg==; 24:PwQY33bazfeE8IWJ51aHf7k3BrSr6fbV0fVeLw4hMksEYuQCC6in5oX/Uyszzkfwn+DQ0b2/jI0ZFaJW7sOAKSOT8bnznVZUq68SNlqGL8w=; 7:FYC0RaCAAH8m/0gJtR+67UsJImY3cmgVkNJPh3zPJUliIqtXuGVjwb3PpHstE8WPQ5wyNYy7eEwmYSUbV1FvcEEODBrJD66pd7yGxxirDP26fH6ixRUoVqlfbI3LUsnisosicXMEhfZHyrZ1uZC0nSIk8Z9DAysLKZ5dXs5nL8lSpnYMlbvIHK07fWPFI7YA23BXrPpFiwgz05x59X8Kxqd8y2M5VjD9fT4OFxi05X4= x-ms-office365-filtering-correlation-id: 3b58dab3-0ad7-4853-8ea2-08d4dd43f74e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR08MB2809; x-ms-traffictypediagnostic: HE1PR08MB2809: x-exchange-antispam-report-test: UriScan:(180628864354917)(228905959029699); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR08MB2809; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR08MB2809; x-forefront-prvs: 0392679D18 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39850400002)(39450400003)(39840400002)(39410400002)(40434004)(377454003)(189002)(199003)(13464003)(38730400002)(33656002)(6436002)(6246003)(105586002)(2201001)(66066001)(76176999)(54356999)(50986999)(106356001)(305945005)(7736002)(74316002)(86362001)(189998001)(3280700002)(3660700001)(2900100001)(2906002)(8936002)(81156014)(81166006)(53936002)(97736004)(5660300001)(9686003)(55016002)(99286003)(7696004)(2950100002)(3846002)(6506006)(102836003)(6116002)(229853002)(68736007)(25786009)(478600001)(53546010)(5250100002)(14454004)(2501003)(5890100001)(101416001)(72206003)(226643001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR08MB2809; H:HE1PR08MB2809.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Aug 2017 03:25:34.5875 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2809 Subject: Re: [dts] [PATCH] framework: wait 10 seconds after testpmd starts to ensure link is up 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, 07 Aug 2017 03:25:37 -0000 Marvin, Thanks for review. V2 patch has been submitted just now. Herbert -----Original Message----- From: Liu, Yong [mailto:yong.liu@intel.com] Sent: Monday, August 7, 2017 10:42 To: Herbert Guan ; dts@dpdk.org; jianbo.liu@linaro.or= g Subject: RE: [dts] [PATCH] framework: wait 10 seconds after testpmd starts = to ensure link is up Hi Herbert, Not every kind of NIC will output link up message, e.g. FVL will not show "= Link Up" when LSC event coming. Waiting for "LSC event" will be more suitable for the expecting prompt. Agreed with change in pmd_ouput module, waiting 10 seconds will ensure the = stability of link status. Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Herbert Guan > Sent: Friday, August 04, 2017 3:20 PM > To: dts@dpdk.org; jianbo.liu@linaro.org > Cc: Herbert Guan > Subject: [dts] [PATCH] framework: wait 10 seconds after testpmd starts > to ensure link is up > > It'll take some time for links up after testpmd is started. > Before that "testpmd>" will be prompted but test shall not start until > links are up. "Link Up" is a better checker for a specific test case. > While since pmd_output.py is usd by many test cases, wait > 10 seconds will be safer, in case of some test cases do not actually > expect for an established link. > > Signed-off-by: Herbert Guan > --- > framework/pmd_output.py | 3 +++ > tests/TestSuite_dynamic_config.py | 2 +- > tests/TestSuite_queue_start_stop.py | 2 +- > 3 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/framework/pmd_output.py b/framework/pmd_output.py index > 260f42c..2d1e3d7 100644 > --- a/framework/pmd_output.py > +++ b/framework/pmd_output.py > @@ -31,6 +31,7 @@ > > import os > import re > +from time import sleep > from settings import TIMEOUT, PROTOCOL_PACKET_SIZE, get_nic_driver > from utils import create_mask > > @@ -119,6 +120,8 @@ class PmdOutput(): > command +=3D " --disable-hw-vlan-filter" > out =3D self.dut.send_expect(command, "testpmd> ", 120) > self.command =3D command > + # wait 10s to ensure links getting up before test start. > + sleep(10) > return out > > def execute_cmd(self, pmd_cmd, expected=3D'testpmd> ', > timeout=3DTIMEOUT, diff --git a/tests/TestSuite_dynamic_config.py > b/tests/TestSuite_dynamic_config.py > index b4ddede..e344aac 100644 > --- a/tests/TestSuite_dynamic_config.py > +++ b/tests/TestSuite_dynamic_config.py > @@ -121,7 +121,7 @@ class TestDynamicConfig(TestCase): > if "cavium" in self.dut.nic_type: > cmd +=3D " --disable-hw-vlan-filter" > > - self.dut.send_expect("%s" % cmd, "testpmd> ", 120) > + self.dut.send_expect("%s" % cmd, "Link Up", 120) > self.dut.send_expect("start", "testpmd> ", 120) > > > diff --git a/tests/TestSuite_queue_start_stop.py > b/tests/TestSuite_queue_start_stop.py > index d1df66b..9e190f6 100644 > --- a/tests/TestSuite_queue_start_stop.py > +++ b/tests/TestSuite_queue_start_stop.py > @@ -130,7 +130,7 @@ class TestQueueStartStop(TestCase): > """ > #dpdk start > try: > - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- = - > i --portmask=3D0x1 --port-topology=3Dloop", "testpmd>", 120) > + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 > + -- - > i --portmask=3D0x1 --port-topology=3Dloop", "Link Up", 120) > self.dut.send_expect("set fwd mac", "testpmd>") > self.dut.send_expect("start", "testpmd>") > self.check_forwarding([0, 0], self.nic) > -- > 1.8.3.1 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.