public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io
Cc: Abner Chang <abner.chang@amd.com>,
	Alexei Fedorov <Alexei.Fedorov@arm.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Igor Kulchytskyy <igork@ami.com>,
	Jian J Wang <jian.j.wang@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Nickle Wang <nicklew@nvidia.com>,
	Pierre Gondois <pierre.gondois@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>,
	Sean Brogan <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] [PATCH v1 0/7] Add DebugMacroCheck
Date: Tue, 29 Aug 2023 19:27:10 -0400	[thread overview]
Message-ID: <fb4e73b2-ad0f-4571-c919-898dbaabfd06@linux.microsoft.com> (raw)
In-Reply-To: <177B5B086FA2671E.12117@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 <michael.kubacki@microsoft.com>
> 
> Adds a new script and build plugin called DebugMacroCheck.
> 
> The script verifies that the number of print specifiers match the
> number of arguments in DEBUG() calls.
> 
> Overview:
> 
> - 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/tests -v`
>    - Also visible in VS Code Test Explorer
> 
> Background:
> 
> 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.
> 
> See the following series for a batch of issues previously fixed in
> edk2 discovered by the tool:
> 
>    https://edk2.groups.io/g/devel/message/93104
> 
> 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.
> 
> 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.
> 
> 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.
> 
> Series Overview:
> 
> - 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
> 
> The plugin (this series) is running with passing CI results as shown
> in this PR:
>    https://github.com/tianocore/edk2/pull/4736
> 
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Pierre Gondois <pierre.gondois@arm.com>
> Cc: Sami Mujawar <Sami.Mujawar@arm.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> 
> 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
> 
>   RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c |   8 +-
>   .pytool/Plugin/DebugMacroCheck/BuildPlugin/DebugMacroCheckBuildPlugin.py                 | 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/DebugMacroCheckBuildPlugin.py
>   create mode 100644 .pytool/Plugin/DebugMacroCheck/BuildPlugin/DebugMacroCheck_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/DebugMacroDataSet.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_DebugMacroCheck.py
> 


-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



       reply	other threads:[~2023-08-29 23:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <177B5B086FA2671E.12117@groups.io>
2023-08-29 23:27 ` Michael Kubacki [this message]
2023-09-04  3:29   ` 回复: [edk2-devel] [PATCH v1 0/7] Add DebugMacroCheck gaoliming via groups.io
2023-08-14 20:48 Michael Kubacki
2023-08-14 22:51 ` Pedro Falcato
2023-08-15  0:23   ` Andrew Fish via groups.io
2023-08-15  0:26     ` Michael Kubacki
2023-08-15  1:12       ` Andrew Fish via groups.io
2023-08-15  0:57     ` Pedro Falcato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb4e73b2-ad0f-4571-c919-898dbaabfd06@linux.microsoft.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox