From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mx.groups.io with SMTP id smtpd.web11.1020.1591111932045709242 for ; Tue, 02 Jun 2020 08:32:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=pEwqwH23; spf=pass (domain: nvidia.com, ip: 216.228.121.64, mailfrom: ipark@nvidia.com) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 02 Jun 2020 08:30:45 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 02 Jun 2020 08:32:11 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 02 Jun 2020 08:32:11 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 2 Jun 2020 15:32:07 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 2 Jun 2020 15:32:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LekVNmBR+4dBelma2AujAyTkiYVwZey5EhWTyDE20ZGOMLWZ46pKxuN8QkKr78iracxMdgQaAAYQcUTRJ44q0KPH4W36ujcvHL4LMNuODCDLP1n3WsdW/v9/ptG6UDkdOry2iIJLnjGGom/GUW7cbfNFGfl/1u+46XRCeFzSwT/2JPRHyLoaZYeD15EiP2asMFTcXThJz5s6mmT4ZptXSI9y9SNwBt6RwetCOMbYDX3Nu8vA0il2lXIymLyv1ZADtJVwmj9GdnCEQb/MFU3t2y4404SVtxwe8WswzpybzhxKvbxUIjdDiZihDP1RaOuviDXqU8+V6RZQi76P9QC6Xg== 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=c8QaNxgnM/flSEdNtUGjaqp7+PjE9U/XyftAGLOpaWk=; b=T4vop37urlHl2Bxz/0Fc3KmKTO+vzk/cWVSK+OW5k1Cpu/2gVcGm6IQohfHr3grCtW2tMpp5jj906czWMdKJNBu9rqtpA6dLdbs0PKhtQnrvOVeaPY9swdTGQrJXL9fof4ICWzGlGb78Azg1iv8F8rNTUj48kQ9sPQKLzCMRg9GSrTmfsFqJGyZV6jYAZd6cHQeZIISMkiASP7emdWwUrjjRNN23jkw4BvYxMbFKl0qoZgwGhWMv0jxaVL4p71bds1TtID6RaF6lPWop4q4E/yqkodyDZqYH67lbDc7FB+1zDk/s31mUA2UEH7oVPw2mDYjLAS1MLLVWnLG6Addgfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from BN8PR12MB3458.namprd12.prod.outlook.com (2603:10b6:408:44::32) by BN8PR12MB2947.namprd12.prod.outlook.com (2603:10b6:408:6c::28) 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 15:32:05 +0000 Received: from BN8PR12MB3458.namprd12.prod.outlook.com ([fe80::3489:4bde:b7b9:3aec]) by BN8PR12MB3458.namprd12.prod.outlook.com ([fe80::3489:4bde:b7b9:3aec%7]) with mapi id 15.20.3045.022; Tue, 2 Jun 2020 15:32:05 +0000 From: "Irene Park" To: "devel@edk2.groups.io" , "bob.c.feng@intel.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: AQHWOFNBEwC4EAEJI0S2wsjzgP5dX6jFDMaAgABoOIA= Date: Tue, 2 Jun 2020 15:32:05 +0000 Message-ID: References: <461959c91617bf66a6a3e23c03dc80e62202302d.1591043186.git.ipark@nvidia.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ipark@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2020-06-02T15:32:01.6675366Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_ActionId=41935e60-397e-4733-a885-0d6cba7f0942; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [12.22.141.131] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4661d5ae-c827-4dee-b681-08d8070a1afc x-ms-traffictypediagnostic: BN8PR12MB2947: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 0422860ED4 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l8gfCYgzFhBBKxmQTnFsHsnPYDZ0iQn7T5n3n+b1wbdX/UY8ukjH5gAAtKuK1VYYmWNCz12FS6pOkhCRLzhLd632LdwwkI5v4qQ+U/ZqJfEjkcl3tjbY6wWnGUNHqQ7snBrbgtWeTBE8hcnkQDEUvza7fTLoMPpFIPDlOc3EJ+QHFfwZcf8v5TFq5I+D+P512EtiIZdfvTlRO4zTSKEt1Rl2tQx4t4I3Ib95USscAGOx0KM5piBwXkyXMXXbHM4j1Eex1jrBU6uCNs+vjcbN4PcCz8O3WWrzJxTYS4Jz7IOWyVo1j/VdTd06j3OSIgx8ZJla191961I780cFT6QLi2FwX1kjyEBNJPHIAvx+y2dOX2gg7XjALXdboBTw4YOB6rdVGB85KvePuLZRsZWG9Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3458.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(39860400002)(396003)(366004)(136003)(376002)(346002)(55016002)(33656002)(7696005)(8936002)(110136005)(9686003)(5660300002)(86362001)(66946007)(52536014)(66556008)(478600001)(2906002)(966005)(186003)(64756008)(66476007)(66446008)(71200400001)(76116006)(53546011)(6506007)(26005)(83380400001)(8676002)(316002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: KH67mlor1DqlOXEmxGKAIof5ciqg7xvxyuOGdxSeRU6L8+3YpP0ScclYavyQYgpeYO9U0OV2fQjXrW/aNflkSAPoFzIV1iR88rwqr/V/kIaCtqhFRNzW4IVnmRB+maLJ/cnB4kC1UhNbZHDe/4mkvRF3tgduUx4rcVKuQ0ibCjvUsFST+UJsc3vxb4700DdOrwcaTXbdMggi0lsvInUUXoXakQS1QHPvb81fwB3hIv4YxuuY+NQcd+WJQLk957LZPNX2ZZlwColm3xB+6ViNT9qXGB03DTVssfQ7ra521xhugOCei7Y8NOENgQErvwZGWA+QWQ4bnjlGBLjCTUVptChCpPcRsAgYsqRrzLZnnvUYvlWzh2g5jYCwi2MtlRqGuNACnhGyAAzHynHl7eKUwa5kzKEWQZgLGz6nKPaOA4oM9BkcRrLO52K3RazLzjISIiX4JhEX4o+mkdPAEdX381ul6iwj+jt/EvrmmY/sgi4= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4661d5ae-c827-4dee-b681-08d8070a1afc X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2020 15:32:05.5962 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2r682BpQaSPoGcwGRdmaPUyTJRIhcGdXpoTi2badgy2AV6Yzv3zP4dp075MJOAI5ecdbUvENjsTYY8FQ9BGiZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB2947 Return-Path: ipark@nvidia.com X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1591111845; bh=c8QaNxgnM/flSEdNtUGjaqp7+PjE9U/XyftAGLOpaWk=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator:msip_labels: authentication-results:x-originating-ip:x-ms-publictraffictype: x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-forefront-prvs:x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: MIME-Version:X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=pEwqwH2329//aitGnDZflhTcpeks+x3asf/GagR/f+ZGgJUvSm99fDb9P/Sd4kClt k2y0O4wOkWQFX1D3K2IMKjevBX37etXVuHsKd0VbvAcOi8HB90kC/IiZ6B54CSGTc0 AzLahmyOHaKfc4oDcUGAfThD4n+EgxZEXjZYT+xL56wWQaOrHrJVcPdBh29yNZXWtI PaHOeKk4VMtxQ8eDqIaJ13lWFe3xNxHT3WpDjVhXBOirdxiI506eJlDZMCqnCV1/DX t8FqIn13M+PFmtlauVo7LpqiLoAbPnuOawLAdur3g06c3Lczn1sH6X0FNOEHDNBx7n n7HHzMuc+aWuw== Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Appreciated your proposal for the better subject. Will do it. Thanks, Irene -----Original Message----- From: devel@edk2.groups.io On Behalf Of Bob Feng Sent: Tuesday, June 2, 2020 5:18 AM To: devel@edk2.groups.io; Irene Park Subject: Re: [edk2-devel] [PATCH v2] BaseTools/Python: sys.exit(1) when er= ror occurred External email: Use caution opening links or attachments 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(): 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