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 41895A04F7; Wed, 25 Dec 2019 10:06:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 19F9F1BE90; Wed, 25 Dec 2019 10:06:24 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 474D51BE85 for ; Wed, 25 Dec 2019 10:06:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Dec 2019 01:06:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,353,1571727600"; d="scan'208";a="212077936" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga008.jf.intel.com with ESMTP; 25 Dec 2019 01:06:21 -0800 Received: from fmsmsx161.amr.corp.intel.com (10.18.125.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Dec 2019 01:06:20 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX161.amr.corp.intel.com (10.18.125.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Dec 2019 01:06:20 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.164]) with mapi id 14.03.0439.000; Wed, 25 Dec 2019 17:06:19 +0800 From: "Ma, LihongX" To: "dts@dpdk.org" Thread-Topic: [dts][PATCH V1] framework/dts: close session if init pktgen failed Thread-Index: AQHVuuyHCA8JOH8kF0mTk5z8t9TWkqfKjzKw Date: Wed, 25 Dec 2019 09:06:18 +0000 Message-ID: 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: 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 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" Tested-by:ma,lihong -----Original Message----- From: Ma, LihongX=20 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 failed Signed-off-by: lihong --- framework/dts.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/dts.py b/framework/dts.py index f1e57bd..634a569 100= 644 --- a/framework/dts.py +++ b/framework/dts.py @@ -304,7 +304,14 @@ def dts_crbs_init(crbInsts, skip_setup, read_cache, pr= oject, 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