Skip to content

[Cherry-Pick] MdePkg: Add PeCoffLib and RngLib GoogleTest mocks - #1918

Merged
Aaron (apop5) merged 2 commits into
microsoft:release/202608from
MarcChen46:user/marcchen/cherry-pick-pecoff-rng-mocks
Sep 16, 2026
Merged

Aaron (apop5) merged 2 commits into
microsoft:release/202608from
MarcChen46:user/marcchen/cherry-pick-pecoff-rng-mocks

Conversation

@MarcChen46

@MarcChen46 Marc Chen (MarcChen46) commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Cherry-pick tianocore/edk2#12960 onto release/202608.

Add reusable GoogleTest mock implementations covering the public PeCoffLib and RngLib APIs, and register both mock libraries in MdePkgHostTest.dsc.

Source commits from the edk2 default branch (master):

  • 5d5d58949bb88125cd1ffac3419913f4ea156263 — MdePkg: Add GoogleTest mock for PeCoffLib
  • ce16b76336e67b2268f6c3e46835005b60a403aa — MdePkg: Add GoogleTest mock for RngLib

For details on how to complete these options and their meaning refer to CONTRIBUTING.md.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

git diff --check passed. The MdePkg CI command was attempted:

stuart_ci_build -c .pytool\\CISettings.py -p MdePkg -t NO-TARGET

It could not start because the environment is missing required external dependencies, including Mu-Basetools, NASM, ACPI tools, and related packages.

Integration Instructions

N/A

@mu-automation

mu-automation Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

❌ QEMU Validation Failed

Source Dependencies

Repository Commit
mu_basecore f10dbea
mu_tiano_platforms d966ff0

Results

Platform Target Build Boot Overall Boot Time Build Logs Boot Logs
Q35 DEBUG ❌ failure ⏩ skipped N/A Build Logs N/A
ArmVirt DEBUG ❌ failure ⏩ skipped N/A Build Logs N/A

Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/34951793534

This comment was automatically generated by the Mu QEMU PR Validation workflow.

@MarcChen46
Marc Chen (MarcChen46) changed the base branch from release/202511 to release/202608 September 15, 2026 08:57
@MarcChen46
Marc Chen (MarcChen46) force-pushed the user/marcchen/cherry-pick-pecoff-rng-mocks branch from 53b502b to a6cb23f Compare September 15, 2026 08:57
Add a reusable GoogleTest mock implementation covering all public PeCoffLib APIs. Include it in MdePkgHostTest.dsc so CI validates the mock with host-based unit tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Marc Chen <marc.chen@microsoft.com>

(cherry picked from commit 5d5d58949bb88125cd1ffac3419913f4ea156263)
Add a reusable GoogleTest mock implementation covering all public RngLib APIs. Include it in MdePkgHostTest.dsc so CI validates the mock with host-based unit tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Marc Chen <marc.chen@microsoft.com>

(cherry picked from commit ce16b76336e67b2268f6c3e46835005b60a403aa)
@MarcChen46
Marc Chen (MarcChen46) force-pushed the user/marcchen/cherry-pick-pecoff-rng-mocks branch from a6cb23f to f10dbea Compare September 15, 2026 09:10
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202608@8504428). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/202608    #1918   +/-   ##
=================================================
  Coverage                  ?    1.70%           
=================================================
  Files                     ?     1674           
  Lines                     ?   417227           
  Branches                  ?        0           
=================================================
  Hits                      ?     7121           
  Misses                    ?   410106           
  Partials                  ?        0           
Flag Coverage Δ
FmpDevicePkg 8.54% <ø> (?)
MdeModulePkg 0.89% <ø> (?)
MdePkg 4.84% <ø> (?)
NetworkPkg 0.50% <ø> (?)
PolicyServicePkg 28.75% <ø> (?)
SecurityPkg 1.46% <ø> (?)
StandaloneMmPkg 0.47% <ø> (?)
UefiCpuPkg 4.17% <ø> (?)
UnitTestFrameworkPkg 16.29% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@apop5
Aaron (apop5) enabled auto-merge (rebase) September 16, 2026 16:54
@apop5
Aaron (apop5) merged commit a3101e9 into microsoft:release/202608 Sep 16, 2026
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants