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 72D95A0613 for ; Wed, 28 Aug 2019 12:06:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5CE641C06A; Wed, 28 Aug 2019 12:06:28 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 058A61BF9B for ; Wed, 28 Aug 2019 12:06:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2019 03:06:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,440,1559545200"; d="scan'208";a="380348430" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 28 Aug 2019 03:06:26 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 28 Aug 2019 03:06:25 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 28 Aug 2019 03:06:25 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.163]) with mapi id 14.03.0439.000; Wed, 28 Aug 2019 18:06:24 +0800 From: "Tu, Lijuan" To: "pvukkisala@marvell.com" , "dts@dpdk.org" CC: "avijay@marvell.com" , "fmasood@marvell.com" Thread-Topic: [dts] [PATCH] pktgen_ixia: Exit on failure of clear/take port ownership Thread-Index: AQHVUqm7dAt4vIXg2kmAPgqcmTJIYKcQax8Q Date: Wed, 28 Aug 2019 10:06:23 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB06A75@SHSMSX101.ccr.corp.intel.com> References: <1565791658-32718-1-git-send-email-pvukkisala@marvell.com> In-Reply-To: <1565791658-32718-1-git-send-email-pvukkisala@marvell.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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODBlY2E5YzctM2MzZS00NWI0LWEwZDEtN2MyZWJlZDc1NzY0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVzFQYm5GT1RPYXhLRmZNTjA1a2VrUFpWMmpBQ2VsVFFDTjV3SFQyeVNLWlJOdlZXbUhzWlBLNDhRZEZ2ZEFzbSJ9 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] pktgen_ixia: Exit on failure of clear/take port ownership 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 > pvukkisala@marvell.com > Sent: Wednesday, August 14, 2019 10:08 PM > To: dts@dpdk.org > Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala > > Subject: [dts] [PATCH] pktgen_ixia: Exit on failure of clear/take port > ownership >=20 > From: Phanendra Vukkisala >=20 > Signed-off-by: Phanendra Vukkisala > --- > framework/pktgen_ixia.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py index > 2895c6b..1e0675d 100644 > --- a/framework/pktgen_ixia.py > +++ b/framework/pktgen_ixia.py > @@ -601,14 +601,18 @@ class Ixia(SSHConnection): > "set chasId [ixGetChassisID %s]" % self.tclServerIP,= "% ") > self.chasId =3D int(out.strip()) >=20 > - self.send_expect("ixClearOwnership [list %s]" % string.join( > + out =3D self.send_expect("ixClearOwnership [list %s]" % > + string.join( > ['[list %d %d %d]' % (self.chasId, item['card'], item['port'= ]) > for item in self.ports], ' '), > "% ", 10) > - self.send_expect("ixTakeOwnership [list %s] force" % string.join= ( > + if out.strip()[-1] !=3D '0': > + return False > + out =3D self.send_expect("ixTakeOwnership [list %s] force" % > + string.join( > ['[list %d %d %d]' % (self.chasId, item['card'], item['port'= ]) > for item in self.ports], ' '), > "% ", 10) > + if out.strip()[-1] !=3D '0': > + return False >=20 > return True >=20 > -- > 1.7.9.5