From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A0228AC0936 for ; Mon, 8 Jan 2024 01:16:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8P5G1YfLzRFHZV16MFTZWvfjC2ENwYsyPVv5NL9Gt4k=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1704676562; v=1; b=YVEA0bs2IJPeQ6SudJ/AZXpo+JCcucX1w3roXZVvz0ianiCObBlt5utNkOQfuOSLNuwP54Ax YbCmkBm7HYsRsCGlaKVbYKp3tS+YA+sNmwm83VKszGfL0ywSQSfC1qrNuBj1K053AaeprrstZd4 ZwucgcWvxiS4LyaiYCs/UL18= X-Received: by 127.0.0.2 with SMTP id 4PnNYY7687511xJ7Uut9pOX4; Sun, 07 Jan 2024 17:16:02 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mx.groups.io with SMTP id smtpd.web11.29715.1704676561509704593 for ; Sun, 07 Jan 2024 17:16:01 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10946"; a="19274705" X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="19274705" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jan 2024 17:15:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10946"; a="1028254309" X-IronPort-AV: E=Sophos;i="6.04,340,1695711600"; d="scan'208";a="1028254309" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga006.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 07 Jan 2024 17:15:57 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 7 Jan 2024 17:15:56 -0800 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Sun, 7 Jan 2024 17:15:56 -0800 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 7 Jan 2024 17:15:56 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GY2WKXD0FsDhXsawK+u+TVpubl6BdKwlqEbAyjGTlu1qHhoe91MLP5F5fPDUfZ4UI7lophZSSbMyvvwtPFDZcF8Dsc+tQvPalvyaVMxkk5ijQAGzGhuBDVt58scmLkOfqQODTpq5rmW0pEQG0ZVTYdm1h8qY7WM/LN54S2tryrK7/093Dzxl6UCDCKxm+Le6yHCNtufDWzSEQ3PAc3z4w2XZmtLzkwiOyYUt7FwGZlp5qRouxR7vD7/Cy/DTMTnugCCbhDtwrWKRbfM3D8mzIanEAO3mKX2vBOismf8sBdugcIQgC97PfUKwrgClsySC73JKFfx0enPSMUZV/Ddy+w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VXIy31q7SaDECqHG67gHft6zO9fTf9NGcSX2aCvYkRI=; b=nCe1L9oNuGsAqb4HyR9rYb6DDK8mWLmAgEMolJd61qLqW2Z0Ruxw15C+GR6Rj1ecGtQ+89zX9MFvZKRsGFHDfTa1nvDfueEUJTqjg3PpW5THn9MM9xRKUumfSywUFsd9Lff36lV9k2hkaU7rJABHGS6p+vPvDlH7c+cWi4tvnHgEUpm0+0V0tr2GNa5bqVfYj7jJfdq7NGA3EWtb0B9KPs187x1cehnvpUX5e9ctkXS5T2A5wP0BE8z0g0gOE9xO32RY+SClOngKQqrDplFa3bKoXlg4UPhNvQG2m0iaysRSGPYXdRt/o6SIR4W496jKL4X84drD/I7BAGP8+ub7JA== 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 X-Received: from MW5PR11MB5906.namprd11.prod.outlook.com (2603:10b6:303:1a0::21) by DS7PR11MB6245.namprd11.prod.outlook.com (2603:10b6:8:9a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Mon, 8 Jan 2024 01:15:54 +0000 X-Received: from MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::75a3:d66d:5791:3b7b]) by MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::75a3:d66d:5791:3b7b%5]) with mapi id 15.20.7159.020; Mon, 8 Jan 2024 01:15:54 +0000 From: "Yuwei Chen" To: Joey Vagedes , "devel@edk2.groups.io" CC: Rebecca Cran , "Gao, Liming" , "Feng, Bob C" Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape characters Thread-Topic: [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape characters Thread-Index: AQHaOa3GS2OyZ+RNUEWv0xqf6uDjQbDPLNHA Date: Mon, 8 Jan 2024 01:15:54 +0000 Message-ID: References: <20231228164739.1042-1-joey.vagedes@gmail.com> <20231228164739.1042-2-joey.vagedes@gmail.com> In-Reply-To: <20231228164739.1042-2-joey.vagedes@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW5PR11MB5906:EE_|DS7PR11MB6245:EE_ x-ms-office365-filtering-correlation-id: cfcd8e65-a6f3-4fe5-4c44-08dc0fe75c7c x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: x3wqVt9YxZh4LeqBYkcBC/YGIe+pJ32jeaYEPpWv8mvLTCEhA9VlRNLkZfG6Cb8G1iERPxFWWBlqgfKvApeM/ymh/iHNJdu+hi8TY0SXFO3tRp/wM8Sj7JUI4H9jOxkuoooUScXfPqNGLJDBkb+toIiUcYWMc/QQvUGFZZgu+Ih6o/O0178B9EEoXjCHaXL5M8aabhxspaBPSdxoHh1+NF46WONbBCd+gkPtcxoXn3GTCtpUXUQV2eHXwbZQzD3uqoNbCU6l/gIIhxLLCT6/6Sxeo4+CeAjwqWEfFRZ6R/oisTIshIYbDu9bViLDrAYBZ5UVfabjwKxVx4g50f0MYtRyIhrxMIy5ROv2juAeM/c81KzjR7IXAbZC+T5PoJM1yBR9kbkWR4jwJA50jxw71l7gAb9+a7TrzRgMpAq1qTxVVAOvAG+eW8afT28M0KnUhUM/dUaEb8+8CqVTIgA09pM3NS4Zw+N87osuMvi51k/BtPL2aFrcSaX2Sv30B8DpEkNOqKo3HiEhKihdwQlHggLw0rx4KkqNWdnDleahQbE84FzSxlsG/YiLko2t6ZOAhfGfCBQI8LPDbke11iIM6X8eRypwrRRldR/yWouP+GrBYX0gA+s5QtpOZKnwnklodWEZtcGUBDTbKiwsYaQB0g== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v2j+25kv3L3vz6LwNv/0Y8XT1U9um1xQUiTKxTd7hfxnk9rT7Vs+rvnBK65d?= =?us-ascii?Q?A6xPRG6GxGvy7eXUMwtrVUVFBrvqCqlyeHKxL1Aj6fnUaDPzufixHrisHzbQ?= =?us-ascii?Q?1QZpYlhpW20PYX6123FU1ndmkQ7QlA8o0BpsX4/2gAVUDOM+bAS4TrShwl7C?= =?us-ascii?Q?99+USVd2FrFtXtIX4wfHmIHnzU84JmXW1a9599fCe4oBl9sm+wU28dTJIPcs?= =?us-ascii?Q?y3XjlclcopQap7OGc1Dfe2gHz49ynaw53mewjK3IRZAADfPIppHjJ2DoWHP4?= =?us-ascii?Q?b9pEk4jjFrn7WA8jpFz2O6v1HkkOhIz8fiV9U7YpXZZTY01MOSsWrqL3dGqt?= =?us-ascii?Q?XEswXryUWYoRY2YOgfQ6l8rjDf/o3KNZNR3aT1JVpukZWU2f07smt6Qn5lVS?= =?us-ascii?Q?mmFEcTUCp0xWPUGFk2tMz74oBg7YyB2hdHwENq/XxOdsY4o+75ftrosyKRvu?= =?us-ascii?Q?7D+FAymQIsCuDCeUo6hN5BkUK7iy+XvaFkS56SynMTU/HgFFhFlT1H9hnUob?= =?us-ascii?Q?AIxVZK+cr8JJQyL2yB1hcTRtQwG8LTrNSM4J02ucxswi11uascHUjvzbSv3F?= =?us-ascii?Q?LCgUQ8474SIaKz2+Y3U/+howdS/SK9zFdkzgbHgP3YcQw1vAHvW6HwxbYQYw?= =?us-ascii?Q?7iwMvXqEtArnH6BopJ5op7m9M4kH8lYvik7aOdjGNMmi5V++4eoewX3DBfsQ?= =?us-ascii?Q?MsdyrFkjagG9i1RRj8EaSAH82eRofOjTg2XUVqtEo9LrhIulgLJ+sJpolh3B?= =?us-ascii?Q?HgDRyNZlPIFcOEB3TLEYpQUdWN5rI/iErKRraziRPWV0fyGTcFElnXpX1UJO?= =?us-ascii?Q?xXyl/bot0tiJlka+Y2glCovT2R0HobNZQF2Kgex2PhLVup0aQNWv2J9uke2I?= =?us-ascii?Q?iffrKdX3+vVVvMN6NE96xYi/ul52rrfn0QsS7GU0hG6o3h7lA7HXMTSRNTFD?= =?us-ascii?Q?9B2TZ3//qdaD6XbGQD/uOMHNnaYuep7PV6fUWLG14WS5BMTwxNE5+Vy7vPPS?= =?us-ascii?Q?rp2tCyFj8RD1K4WfrxXUTC3lqYm8fC9qADp+HmOzd6AMDHGKECrlYH5+Z2qY?= =?us-ascii?Q?3c082wP2S+kW1KUEnESSq9hyEMLgpWi9OYoK+Ug6XE4EJm/PE0p6icEh5yca?= =?us-ascii?Q?PmsLG/g0BjuInprxK0Yg6BawEscaFvC5Fv11lC7qHEOcaCUqLlOyzIU3bNTR?= =?us-ascii?Q?AoOxfH5tT/OBGTmIXAEIlcaWsevy+OtcTjDpr+4k+LQooQtUklddW0NqcxqY?= =?us-ascii?Q?dQm9v4jAL81k87noZhBVSOJM1b4jzSY3/hMVO9jS/n5+YZL1rD6BwFQGctYX?= =?us-ascii?Q?m+RfVnRQf5KyF5daC52l3TNDFUilpIEI32EYaC9HGZU9ozMK//Jexsc/kKcr?= =?us-ascii?Q?jK6Lq84/wxEIKUZjj15OSwepWd2aGCl0+CInNOq0WJORoD9Hfo2Jq1vUPwpk?= =?us-ascii?Q?wLriHU9qsXrXrWgt8skhfeEAXIsd9JCd4ipddojB9LgP4V5dxEDYpnIPEToI?= =?us-ascii?Q?q8FKuyALYuU1SpwvCRmJHySUyKfVkB+S7Yf7nmEhsVi+gldiwlaXOfQ6J09g?= =?us-ascii?Q?ODhRyozJRul6VE8SE90nhYzPjhm7bQ5xU3jOQN0n?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5906.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfcd8e65-a6f3-4fe5-4c44-08dc0fe75c7c X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2024 01:15:54.2664 (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: QRZX1lIX0+VQJh/Ef2OEQPdRoH+N1UjyYK0ETSby603NCWk4UP4a64OsSWDmyQ9Br3YEFmxI7pwD9LROATgimA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6245 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yuwei.chen@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: KPF6eGT0f128HwIwMQ1chacMx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=YVEA0bs2; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Joey, Thanks for fixing. Reviewed-by: Yuwei Chen > -----Original Message----- > From: Joey Vagedes > Sent: Friday, December 29, 2023 12:48 AM > To: devel@edk2.groups.io > Cc: Rebecca Cran ; Gao, Liming > ; Feng, Bob C ; Chen, > Christine > Subject: [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escap= e > characters >=20 > Fixes raw regex strings that contain valid (and purposeful) escape charac= ters > as they are being treated as individual characters rather than the single > escaped character they represent (i.e. '\t' is being treated as a '\' and= a 't' > rather than a single tab character). >=20 > Signed-off-by: Joey Vagedes > Cc: Rebecca Cran > Cc: Liming Gao > Cc: Bob Feng > Cc: Yuwei Chen > --- > BaseTools/Source/Python/AutoGen/GenMake.py | 2 +- > BaseTools/Source/Python/Common/Misc.py | 2 +- > BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py > b/BaseTools/Source/Python/AutoGen/GenMake.py > index c416fe172fe5..fbd35d498923 100755 > --- a/BaseTools/Source/Python/AutoGen/GenMake.py > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > @@ -28,7 +28,7 @@ from Common.DataType import TAB_COMPILER_MSFT > gIncludePattern =3D > re.compile(r"^[ \t]*[#%]?[ \t]*include(?:[ \t]*(?:\\(?:\r\n|\r|\n))*[ \t]= *)*(?:\(?[ > \"<]?[ \t]*)([-\w.\\/() \t]+)(?:[ \t]*[\">]?\)?)", re.MULTILINE | re.UNIC= ODE | > re.IGNORECASE) ## Regular expression for matching macro used in header > file inclusion-gMacroPattern =3D re.compile(r"([_A-Z][_A-Z0-9]*)[ \t]*\((= .+)\)", > re.UNICODE)+gMacroPattern =3D re.compile("([_A-Z][_A-Z0-9]*)[ \t]*\\((.+)= \\)", > re.UNICODE) gIsFileMap =3D {} diff --git > a/BaseTools/Source/Python/Common/Misc.py > b/BaseTools/Source/Python/Common/Misc.py > index f87d9dbdba39..34bfc90abd94 100755 > --- a/BaseTools/Source/Python/Common/Misc.py > +++ b/BaseTools/Source/Python/Common/Misc.py > @@ -1926,4 +1926,4 @@ def CopyDict(ori_dict): > # Remove the c/c++ comments: // and /* */ # def > RemoveCComments(ctext):- return re.sub(r'//.*?\n|/\*.*?\*/', '\n', cte= xt, > flags=3Dre.S)+ return re.sub('//.*?\n|/\\*.*?\\*/', '\n', ctext, flags= =3Dre.S)diff --git > a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 817cdbe5f19c..4768099343e5 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2840,7 +2840,7 @@ class DscBuildData(PlatformBuildClassObject): > # start generating makefile MakeApp =3D PcdMakefileHeade= r if > sys.platform =3D=3D "win32":- MakeApp =3D MakeApp + r'APPFILE > =3D %s\%s.exe\n' % (self.OutputPath, PcdValueInitName) + r'APPNAME > =3D %s\n' % (PcdValueInitName) + r'OBJECTS =3D %s\%s.obj %s.obj\n' % > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) + 'INC =3D '+ MakeApp =3D MakeApp + 'APPF= ILE > =3D %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME > =3D %s\n' % (PcdValueInitName) + 'OBJECTS =3D %s\\%s.obj %s.obj\n' % > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) + 'INC =3D ' else: MakeApp =3D M= akeApp + > PcdGccMakefile MakeApp =3D MakeApp + 'APPFILE =3D %s/%s\n' % > (self.OutputPath, PcdValueInitName) + 'APPNAME =3D %s\n' % > (PcdValueInitName) + 'OBJECTS =3D %s/%s.o %s.o\n' % (self.OutputPath, > PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + > \@@ -2950,7 +2950,7 @@ class DscBuildData(PlatformBuildClassObject): > MakeApp +=3D "$(OBJECTS) : %s\n" % include_file if s= ys.platform =3D=3D > "win32": PcdValueCommonPath =3D > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] > , "Source\C\Common\PcdValueCommon.c"))- MakeApp =3D MakeApp + > r'%s\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath)+ > MakeApp =3D MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, > PcdValueCommonPath) MakeApp =3D MakeApp + '\tcopy /y %s $@\n'= % > (PcdValueCommonPath) else: PcdValueCommonPath =3D > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] > , "Source/C/Common/PcdValueCommon.c"))-- > 2.43.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113338): https://edk2.groups.io/g/devel/message/113338 Mute This Topic: https://groups.io/mt/103403582/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-