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 5CCAFAC1B8E for ; Tue, 29 Aug 2023 23:27:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2qou+NQLX2H2vnDHLElWEUZIfE3tEn/LPKCxXVOz3Bg=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:From:To:Cc:Reply-To:References:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1693351634; v=1; b=SHroQrwtujm2haG66qEgsWlZxVtjsCvm1xGngFEbpSAaHfpbMJgxEQahWwlsKVJNTymtiPsw k2Yk7g/QJuQ5z5Vn0qHwiVahX0YvJsQbwwx4i3LuE+ukclPA5xIzHBdcoE3z4GjjJ7ShSbYdEMz djkPz9jG5Y0fHiRy/21eUJes= X-Received: by 127.0.0.2 with SMTP id A1b8YY7687511xU2rTW2tjrL; Tue, 29 Aug 2023 16:27:14 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.2261.1693351633560566505 for ; Tue, 29 Aug 2023 16:27:13 -0700 X-Received: from [192.168.4.22] (unknown [47.201.241.95]) by linux.microsoft.com (Postfix) with ESMTPSA id 4F9042129BF3; Tue, 29 Aug 2023 16:27:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4F9042129BF3 Message-ID: Date: Tue, 29 Aug 2023 19:27:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 0/7] Add DebugMacroCheck From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Abner Chang , Alexei Fedorov , Ard Biesheuvel , Gerd Hoffmann , Igor Kulchytskyy , Jian J Wang , Jiewen Yao , Jordan Justen , Leif Lindholm , Liming Gao , Michael D Kinney , Nickle Wang , Pierre Gondois , Sami Mujawar , Sean Brogan Reply-To: devel@edk2.groups.io,mikuback@linux.microsoft.com References: <177B5B086FA2671E.12117@groups.io> In-Reply-To: <177B5B086FA2671E.12117@groups.io> 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 List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: mT0Mwe7SuWeXxdcHfcPgGqrmx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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=SHroQrwt; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.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 all, Now that the stable tag is out, I would appreciate reviews for this series. Thanks, Michael On 8/14/2023 4:48 PM, Michael Kubacki wrote: > From: Michael Kubacki >=20 > Adds a new script and build plugin called DebugMacroCheck. >=20 > The script verifies that the number of print specifiers match the > number of arguments in DEBUG() calls. >=20 > Overview: >=20 > - Build plugin: BuildPlugin/DebugMacroCheckBuildPlugin.py > - Runs on any build target that is not NO-TARGET > - Standalone script: DebugMacroCheck.py > - Run `DebugMacroCheck.py --help` to see command line options > - Unit tests: > - Tests/test_DebugMacroCheck.py > - Can be run with: > `python -m unittest discover -s ./.pytool/Plugin/DebugMacroCheck/tes= ts -v` > - Also visible in VS Code Test Explorer >=20 > Background: >=20 > The tool has been constantly run against edk2 derived code for about > a year now. During that time, its found over 20 issues in edk2, over > 50 issues in various vendor code, and numerous other issues specific > to Project Mu. >=20 > See the following series for a batch of issues previously fixed in > edk2 discovered by the tool: >=20 > https://edk2.groups.io/g/devel/message/93104 >=20 > I've received interest from vendors to place it in edk2 to > immediately find issues in the upstream and make it easier for edk2 > consumers to directly acquire it. That led to this patch series. >=20 > This would run in edk2 as a build plugin. All issues in the edk2 > codebase have been resolved so this would find new issues before > they are merged into the codebase. >=20 > The script is meant to be portable so it can be run as a build plugin > or dropped as a standalone script into other environments alongside > the unit tests. >=20 > Series Overview: >=20 > - Fixes outstanding issues in RedfishPkg > - Adds the `regex` PIP module to pip-requirements.txt > - Adds exceptions for debug macro usage in ArmVirtPkg, > DynamicTablesPkg, and SecurityPkg > - Disables the plugin in OvmfPkg per maintainer's previous > preferences > - Adds the plugin >=20 > The plugin (this series) is running with passing CI results as shown > in this PR: > https://github.com/tianocore/edk2/pull/4736 >=20 > Cc: Abner Chang > Cc: Alexei Fedorov > Cc: Ard Biesheuvel > Cc: Gerd Hoffmann > Cc: Igor Kulchytskyy > Cc: Jian J Wang > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Leif Lindholm > Cc: Liming Gao > Cc: Michael D Kinney > Cc: Nickle Wang > Cc: Pierre Gondois > Cc: Sami Mujawar > Cc: Sean Brogan >=20 > Michael Kubacki (7): > RedfishPkg/PlatformHostInterfaceBmcUsbNicLib: Fix DEBUG macro args > pip-requirements.txt: Add regex > SecurityPkg.ci.yaml: Add debug macro exception > ArmVirtPkg.ci.yaml: Add debug macro exception > DynamicTablesPkg.ci.yaml: Add debug macro exception > OvmfPkg/PlatformCI: Disable DebugMacroCheck > .pytool/Plugin: Add DebugMacroCheck >=20 > RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterf= aceBmcUsbNicLib.c | 8 +- > .pytool/Plugin/DebugMacroCheck/BuildPlugin/DebugMacroCheckBuildPlugin.p= y | 127 +++ > .pytool/Plugin/DebugMacroCheck/BuildPlugin/DebugMacroCheck_plug_in.yaml= | 11 + > .pytool/Plugin/DebugMacroCheck/DebugMacroCheck.py = | 859 ++++++++++++++++++++ > .pytool/Plugin/DebugMacroCheck/Readme.md = | 253 ++++++ > .pytool/Plugin/DebugMacroCheck/tests/DebugMacroDataSet.py = | 674 +++++++++++++++ > .pytool/Plugin/DebugMacroCheck/tests/MacroTest.py = | 131 +++ > .pytool/Plugin/DebugMacroCheck/tests/__init__.py = | 0 > .pytool/Plugin/DebugMacroCheck/tests/test_DebugMacroCheck.py = | 201 +++++ > ArmVirtPkg/ArmVirtPkg.ci.yaml = | 8 + > DynamicTablesPkg/DynamicTablesPkg.ci.yaml = | 8 + > OvmfPkg/PlatformCI/PlatformBuildLib.py = | 1 + > SecurityPkg/SecurityPkg.ci.yaml = | 9 + > pip-requirements.txt = | 2 +- > 14 files changed, 2287 insertions(+), 5 deletions(-) > create mode 100644 .pytool/Plugin/DebugMacroCheck/BuildPlugin/DebugMacr= oCheckBuildPlugin.py > create mode 100644 .pytool/Plugin/DebugMacroCheck/BuildPlugin/DebugMacr= oCheck_plug_in.yaml > create mode 100644 .pytool/Plugin/DebugMacroCheck/DebugMacroCheck.py > create mode 100644 .pytool/Plugin/DebugMacroCheck/Readme.md > create mode 100644 .pytool/Plugin/DebugMacroCheck/tests/DebugMacroDataS= et.py > create mode 100644 .pytool/Plugin/DebugMacroCheck/tests/MacroTest.py > create mode 100644 .pytool/Plugin/DebugMacroCheck/tests/__init__.py > create mode 100644 .pytool/Plugin/DebugMacroCheck/tests/test_DebugMacro= Check.py >=20 -=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 (#108102): https://edk2.groups.io/g/devel/message/108102 Mute This Topic: https://groups.io/mt/100745693/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-