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 8E960A04F0; Fri, 27 Dec 2019 09:01:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44D5C1BFEB; Fri, 27 Dec 2019 09:01:46 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CDCEE1BFA8 for ; Fri, 27 Dec 2019 09:01:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2019 00:01:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,362,1571727600"; d="scan'208";a="223719702" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 27 Dec 2019 00:01:38 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 27 Dec 2019 00:01:38 -0800 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 27 Dec 2019 00:01:37 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 27 Dec 2019 00:01:37 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by shsmsx102.ccr.corp.intel.com ([169.254.2.109]) with mapi id 14.03.0439.000; Fri, 27 Dec 2019 16:01:35 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] framework/dts: close session if init pktgen failed Thread-Index: AQHVuuyNwcstBcDrd0mUBRBClj162afNodYg Date: Fri, 27 Dec 2019 08:01:35 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB8EE7C@SHSMSX101.ccr.corp.intel.com> References: <1577228490-25826-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1577228490-25826-1-git-send-email-lihongx.ma@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-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] framework/dts: close session if init pktgen failed 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 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: Wednesday, December 25, 2019 7:02 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] framework/dts: close session if init pktgen fai= led >=20 > Signed-off-by: lihong > --- > framework/dts.py | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/framework/dts.py b/framework/dts.py index f1e57bd..634a569 > 100644 > --- a/framework/dts.py > +++ b/framework/dts.py > @@ -304,7 +304,14 @@ def dts_crbs_init(crbInsts, skip_setup, read_cache, > project, base_dir, serialize > tester.duts =3D duts > show_speedup_options_messages(read_cache, skip_setup) > tester.set_speedup_options(read_cache, skip_setup) > - tester.init_ext_gen() > + try: > + tester.init_ext_gen() > + except Exception as e: > + log_handler.error(str(e)) > + tester.close() > + for dutobj in duts: > + dutobj.close() > + raise e >=20 > nic =3D settings.load_global_setting(settings.HOST_NIC_SETTING) > for dutobj in duts: > -- > 2.7.4