From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.38.127; helo=nam02-bl2-obe.outbound.protection.outlook.com; envelope-from=christopher.co@microsoft.com; receiver=edk2-devel@lists.01.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0127.outbound.protection.outlook.com [104.47.38.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B01B7211F889A for ; Tue, 26 Jun 2018 20:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sd2AL9uznP3bfA04BucLj3/5ETJkJWMPmaJc/sJUXL0=; b=kbAzfwiF06Qu/WfxQlUTJPokwkHwyzuqlLWVJWhrkj2dH+kWUrWoFa4TXo71urZHcVP/8Vti7/pHq+UWkwkO7Fjk3GlDoN83nou75O6nKujQLxQHXGiHHxNNrmTgshHoJ7IAUmwvVQFZC23MNm7AX3VuEFvabpdmnZb3Gc/myHc= Received: from DM5PR2101MB1128.namprd21.prod.outlook.com (52.132.133.20) by DM5PR2101MB1127.namprd21.prod.outlook.com (52.132.132.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.5; Wed, 27 Jun 2018 03:58:03 +0000 Received: from DM5PR2101MB1128.namprd21.prod.outlook.com ([fe80::28cb:9380:49e8:e0d0]) by DM5PR2101MB1128.namprd21.prod.outlook.com ([fe80::28cb:9380:49e8:e0d0%2]) with mapi id 15.20.0930.005; Wed, 27 Jun 2018 03:58:03 +0000 From: Chris Co To: "edk2-devel@lists.01.org" CC: Leif Lindholm , Yonghong Zhu , Liming Gao Thread-Topic: [PATCH v1 0/1] BaseTools/Trim: Canonicalize filepaths to fix comparison Thread-Index: AQHUDcsM06WcOeB/xUCdX0B3YHhsMA== Date: Wed, 27 Jun 2018 03:58:03 +0000 Message-ID: <20180627035753.49848-1-christopher.co@microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR0201CA0077.namprd02.prod.outlook.com (2603:10b6:301:75::18) To DM5PR2101MB1128.namprd21.prod.outlook.com (2603:10b6:4:a8::20) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2001:4898:80e8:8:ac58:341b:8c69:467b] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1127; 7:mgj2XihwL2+VXGzu+Jhn7B4Kts0WaKDP2PJyIEwoMMNoZlVEhRAVAlTsWvlNhpzz2Z1zK5Nx/IarivWJawfJDdX844hdMd6HTMulx46nMhqk44kdy7SKq28y4xstiobGL5drvpTmTnW4P55+pl6uZ2NT1O5zcKEGy45QWLk74pOuhOZMQGlIKsZCiuWLC69zOMrZ702verhhhbt7kVv8ilprdNcMfTxgEBvRL/9/0/V7xMYSJt+tNH6i4K017M3w x-ms-office365-filtering-correlation-id: afce0f3b-e12e-44a4-21bd-08d5dbe22e78 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(48565401081)(2017052603328)(7193020); SRVR:DM5PR2101MB1127; x-ms-traffictypediagnostic: DM5PR2101MB1127: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(166708455590820)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(2018427008)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DM5PR2101MB1127; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1127; x-forefront-prvs: 0716E70AB6 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(39860400002)(136003)(346002)(376002)(199004)(189003)(25786009)(53936002)(4326008)(5660300001)(6306002)(5640700003)(2900100001)(86362001)(6486002)(2501003)(5250100002)(6512007)(6436002)(68736007)(8936002)(486006)(81166006)(6346003)(97736004)(52116002)(46003)(7736002)(386003)(102836004)(305945005)(186003)(6506007)(8676002)(81156014)(6916009)(316002)(6116002)(2351001)(22452003)(105586002)(86612001)(106356001)(36756003)(2616005)(476003)(10290500003)(1076002)(54906003)(478600001)(72206003)(256004)(966005)(10090500001)(14454004)(2906002)(99286004)(22906009)(460985005); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1127; H:DM5PR2101MB1128.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Christopher.Co@microsoft.com; x-microsoft-antispam-message-info: d2lslqwvA/meqFze3v51uWjypoPGbVJbbizzVgFBmBTNzporwWu6YUz117Eez7v4YQE5Ik6+Q+UMNff7AAXtKhHf9r3DQY+62oeehhisNdbRktKeNCinVQ4fi0DEJ6mfkK5ZYAjiFo37jmAwGNyA0sWC1BGTLJ3azsXwcGxQb34SD4miFFR949Fr+nd875QYW61s7Rih4hp5lTOrysQKEenFWyLrWiPyxxB4yHs7evjpF6r6+OEL2uyI5+tSUqTGflWZE9UQTclLN9rU9Ydz5Qpfcf5U6SIAhEOo2zTyn44pT2NKiiuMqb+3L/OxDGVnu1m/KLosldjDpNAJsLzva4fWag6S6kjMvXWYp+TkWOE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: afce0f3b-e12e-44a4-21bd-08d5dbe22e78 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2018 03:58:03.6363 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1127 Subject: [PATCH v1 0/1] BaseTools/Trim: Canonicalize filepaths to fix comparison X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 03:58:06 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable REF: https://github.com/christopherco/edk2/tree/trim_gcc_v1 When using Linaro GCC5+ arm-eabi toolchain on Windows, the generated DSDT.iii contains a canonicalized ("\.\" removed and lower case) filepath for the preprocessed DSDT.i file in the first line. Due to this, when Trim.exe is called to generate DSDT.iiii, future filepath comparisons against this canonicalized filepath, which should match, actually fail the comparison which results in an empty DSDT.iiii. Issue was first reported to Linaro here: https://bugs.linaro.org/show_bug.cgi?id=3D2909 where the recommendation was to address the issue in Trim.exe. This patch canonicalizes and lower cases all file paths encountered during trim execution on preprocessed files. Since file paths are standarized, the comparison succeeds for files that should match regardless of the presence of upper case or "\.\" characters in the file path. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Christopher Co Cc: Leif Lindholm Cc: Yonghong Zhu Cc: Liming Gao Christopher Co (1): BaseTools/Trim: Canonicalize filepaths to fix comparison BaseTools/Source/Python/Trim/Trim.py | 2 ++ 1 file changed, 2 insertions(+) --=20 2.16.2.gvfs.1.33.gf5370f1