From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.6830.1591089484957750705 for ; Tue, 02 Jun 2020 02:18:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=oaUjp1dQ; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: bob.c.feng@intel.com) IronPort-SDR: Wf8WOnU5u3zO2ChpGN6SrV2IqYqYH1O2CiNp3OSwqNMdVY2z6yAwgyKNV8iSAnQSZRV4wdtyz3 5RMmeaBCN0ug== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2020 02:18:04 -0700 IronPort-SDR: 3DPJNAqrJXtQ9/AJW26h6yTY2U/zpAWg3/BSZ9wzezYXaL/5k50uszlkGc1kSRFg4VuI2819Ax NuzcaQKxx+UQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,463,1583222400"; d="scan'208";a="257565575" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga007.jf.intel.com with ESMTP; 02 Jun 2020 02:18:04 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jun 2020 02:18:04 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 2 Jun 2020 02:18:03 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 2 Jun 2020 02:18:03 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jun 2020 02:18:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RSbhPkMh5SRMtRA7kY1SYw0cwigDvmll2Q8NziNphe5CLvTIce8Z+p1kWjKMLOwJNVSRbvjGk2hBLFY/5AUnGO91BqKF31LymdTlc1cCyOr14rG/01tY7hk21I2YHoTjE/4xpBE5uhZlHyJw8DbqECR7tmF+6fwWYa1kayhsjhlO++sdSBTCC+pAeaBb4kZJRaFvwqx59AL7onjEPfcvQiN/TsQi8M9WKRAAIxn6d9hgJbop9s33eI1lfR/fnuzPecMduXuFHNBCdNL9/PWjjdb/EXNVcep1N6F3VTm6chBLMTRusQMTuE+c2h49TeZgSM3Cv4UFq6bi7gnBrCLJZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6ev4fJ01x4x2uwkrtfeOoJAmuB4vcxkfdpj2TwtE12Y=; b=VOLgfejIEn8mFCc8dLKqQ7mslvqmzM3LMDXiyuBKxcqCsKg23Wo4rP0T40+WNL+ADs2gpEqrlg1R8tkRZhDIPfucXEyGv2w7qZF9xOl1XfhYYoaoSJERIa8bcXbY4giGdb7loQ8K/FgRzftYUMs+wZ7Tp0J04DctU58gWPmxKIvLyLgj93CLzaREy96Bq/LPitdWZeCfsAyt0AZJDXUohp2qpTxS5sxZ2a9XpzB7sf+BWC/eW7dNsNJkWsjDerlbCyGd+o7x1mSnTeRf+Snsz7AsQSpeZno8WunRU1sY3pAoCaVw1A8N4iKns+zuf0CxoVWwr0L4qrv3xxbApawLHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6ev4fJ01x4x2uwkrtfeOoJAmuB4vcxkfdpj2TwtE12Y=; b=oaUjp1dQczbyN4596zk8w1JeTXo5tg8BW90YOgYx1gt27q1lBXM1Pmwvlj7GVEQKnrxpyP8HK3UENca6Qh5Psqql9ZfLuMFTuIcYlD2rhLZAOy1jMjfh340G9ERrZLPFqJweJPY9i3AyC4d3RQrk8eX0jMzgHwbT9m/WiVXHiYo= Received: from BN6PR11MB0068.namprd11.prod.outlook.com (2603:10b6:405:69::17) by BN6PR11MB1410.namprd11.prod.outlook.com (2603:10b6:404:4a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Tue, 2 Jun 2020 09:18:01 +0000 Received: from BN6PR11MB0068.namprd11.prod.outlook.com ([fe80::2d53:d47c:1269:d601]) by BN6PR11MB0068.namprd11.prod.outlook.com ([fe80::2d53:d47c:1269:d601%6]) with mapi id 15.20.3045.022; Tue, 2 Jun 2020 09:18:01 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "ipark@nvidia.com" Subject: Re: [edk2-devel] [PATCH v2] BaseTools/Python: sys.exit(1) when error occurred Thread-Topic: [edk2-devel] [PATCH v2] BaseTools/Python: sys.exit(1) when error occurred Thread-Index: AQHWOFNJbN31U7lc5kyPRK1vW/Uc/KjFB46Q Date: Tue, 2 Jun 2020 09:18:01 +0000 Message-ID: References: <461959c91617bf66a6a3e23c03dc80e62202302d.1591043186.git.ipark@nvidia.com> In-Reply-To: <461959c91617bf66a6a3e23c03dc80e62202302d.1591043186.git.ipark@nvidia.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9deea6eb-d48c-4a62-6ebe-08d806d5d90c x-ms-traffictypediagnostic: BN6PR11MB1410: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0422860ED4 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DLLQCH8Vvi8XtisOBtDM7c71b0KfJ1pIp/jYVwc2+OGpwhvCBDs736MHRf1bKwcT2XTGwfeFbLc8R8bPGGpHQ8xnoVgkysLgU0cp9XGaG9zd0aF3ERsrFJ+WD3lt9uUmetGsxmRac+ByIGKlgEXl6/ynrt+RWRi4wY30slSQZJ2YuwLP+8lxUJV7iYhweAiEMI1tje/y901aR4M0ycKZvz6Y+FzAPzqmsmIpBS+2+0sNSrXB/3POK5jtsi8R9ickUCDc1rAMWdSX9UD6vd/GHSANvTkV5+sPcFrN8jf2+otlTSt+DFiSnl2GQ6dkukGSR3tWlmGRZBu7Ue0yPzTw+Q+iH70OonxX8zMJZ3W2QTmAKV9hc1MpJwoOpmdc0EgpK+/qek4318exC7vSjlAgNQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB0068.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(39860400002)(346002)(376002)(396003)(366004)(136003)(7696005)(6506007)(71200400001)(2906002)(53546011)(26005)(186003)(33656002)(5660300002)(83380400001)(8936002)(316002)(8676002)(110136005)(55016002)(76116006)(66446008)(64756008)(66476007)(478600001)(66946007)(66556008)(966005)(52536014)(86362001)(9686003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: qIyU9kG8LeTTCULDrYHMJ9c/l0DblFY75elQdMcN1tzS9VYSTcEqv+ONdsuOT6Kff7x/Surf8z4+fJ8cec2v5Sr5j4pBkN5yqXcJuxOPeVugNXZQKDWLY18cU75sZ6CR0AjpLf826vhVljgcoRmYA/yu58zdifL2hL2Nr3MKy/r9tnHR3AgzDArs4DLNzzaCrgMjKJ68uzu/lMXbZyfVIWZo/zmcgEAv29ngc4TuRsrZCjt4tDiz7rmv4u7E6QSYbS2bwe3E2rDHyqd+bVMG0LcXVv3uv5Xc6J/uf4ABwgzFllVV8rAzN3F1Nui6sYAmnIQVj2ELowKZczGKTnEMy00Z4+kF62ChS1C5XlLnwfR90scFY3KOflfSN7EfIwHmTCbRbFPE5I5qcOO8x95OIaZoJ1Vg11Mz4O2Zu8mTykJ9HGsDs7ljzrgasQIrWG+SBCWlVjOmTgD6ZPtsSb3OLjU6PoJ0UW+AU6ZHcMLQHT4= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 9deea6eb-d48c-4a62-6ebe-08d806d5d90c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2020 09:18:01.0707 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Y3bcXTmVJaMqrN1KxE2vDm6HGVMNU57bgilU94yZOVf5Ncdg2Aw8w0iwZa8p2xI2PjjkWUw5S9rt3YrUqbVc3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1410 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Irene, This patch looks good. For the subject, I think it's that the build will e= xit with 1 when the AutoGen error occurred. Would you update the subject to make it more clear? With the subject update, Reivewed-by: Bob Feng Thanks, Bob -----Original Message----- From: devel@edk2.groups.io On Behalf Of Irene Park Sent: Tuesday, June 2, 2020 4:28 AM To: devel@edk2.groups.io Cc: Irene Park Subject: [edk2-devel] [PATCH v2] BaseTools/Python: sys.exit(1) when error = occurred From: Irene Park AutoGen manager/workers halt the progress when an error occurs but doesn't= propagate the error code to main and makes main sys.exit(0) and gets the b= uild system unable to catch the occurrence of an error. This change informs main with an error when a progress is halted and helps= main sys.exit(1). Signed-off-by: Irene Park --- BaseTools/Source/Python/build/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyt= hon/build/build.py index ed3a3b9..1ab1e60 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -880,7 +880,10 @@ class Build(): =20 self.AutoGenMgr.join() rt =3D self.AutoGenMgr.Status - return rt, 0 + err =3D 0 + if not rt: + err =3D UNKNOWN_ERROR + return rt, err except FatalError as e: return False, e.args[0] except: @@ -2724,4 +2727,3 @@ if __name__ =3D=3D '__main__': ## 0-127 is a safe return range, and 1 is a standard default error if r < 0 or r > 127: r =3D 1 sys.exit(r) - -- 2.7.4