Skip to content

Add Unit Tests for TlsLib #218

Draft
Flickdm wants to merge 8 commits intomicrosoft:mainfrom
Flickdm:feat/TlsLibUnitTests
Draft

Add Unit Tests for TlsLib #218
Flickdm wants to merge 8 commits intomicrosoft:mainfrom
Flickdm:feat/TlsLibUnitTests

Conversation

@Flickdm
Copy link
Copy Markdown
Member

@Flickdm Flickdm commented Apr 5, 2026

Description

This pull request adds support for host-based unit testing of the TlsLib library and updates the dependency on mu_basecore to a feature branch. The main changes include introducing a new INF file for the host-based TlsLib, updating the DSC configuration to include this library and its tests, and adjusting dependencies to use a development branch with TLS unit test support.

Dependency updates:

  • Updated the MU_BASECORE dependency in both .pytool/CISettings.py and PlatformBuild.py to use the feat/TlsLibUnitTest branch from flickdm/mu_basecore.git instead of the Microsoft mainline branch.

TlsLib host unit test support:

  • Added a new INF file, UnitTestHostTlsLib.inf, which wraps the production TlsLib sources for use in host-based unit tests. This sets MODULE_TYPE to HOST_APPLICATION and specifies the relevant source files and dependencies.
  • Updated OpensslPkgHostUnitTest.dsc to include UnitTestHostTlsLib.inf as the implementation for the TlsLib library class, and added required library classes for host-based testing.
  • Registered a new TLS verification test (TestTlsLibHost.inf) in the DSC file, which enumerates cipher suites and TLS capabilities for host-based testing.
  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

<Describe the test(s) that were run to verify the changes.>

Integration Instructions

<Describe how these changes should be integrated. Use N/A if nothing is required.>

@mu-automation mu-automation bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Apr 5, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@3f3a8e0). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage        ?   43.99%           
=======================================
  Files           ?       59           
  Lines           ?     7108           
  Branches        ?     2011           
=======================================
  Hits            ?     3127           
  Misses          ?     3937           
  Partials        ?       44           

☔ View full report in Codecov by Sentry.
📢 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.

@Flickdm Flickdm changed the title Feat/tls lib unit tests Add Unit Tests for TlsLib Apr 5, 2026
@Flickdm Flickdm force-pushed the feat/TlsLibUnitTests branch 2 times, most recently from 2c8314a to 99568e5 Compare April 5, 2026 21:55
Flickdm added 7 commits April 5, 2026 16:46
Add the SysCallLib instance for OneCryptoLoaderSupvMm when using
MmSupervisorPkg BaseLibSysCall so library resolution succeeds.

Update OneCryptoBinSupvMm to consume gMmRing3HandlerReadyProtocol
and add MmSupervisorPkg.dec so the protocol GUID resolves.

Signed-off-by: Doug Flick
Update OneCryptoPkg DSC library mappings to use
MsCorePkg/Library/FltUsedLib/FltUsedLib.inf after the FltUsedLib
move from MdePkg.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
Update OpensslPkg DSC library mapping to use
MsCorePkg/Library/FltUsedLib/FltUsedLib.inf after the FltUsedLib
move from MdePkg.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
Update MbedTlsPkg DSC library mapping to use
MsCorePkg/Library/FltUsedLib/FltUsedLib.inf after the FltUsedLib
move from MdePkg.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
Pin MU_BASECORE, Features/MM_SUPV, and Common/MU to specific
commits in both PlatformBuild and CI settings to avoid floating
branch drift in local and CI setup flows.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
Add UnitTestHostTlsLib.inf, a HOST_APPLICATION wrapper for the
production TlsLib sources, enabling TlsLib to be linked into
host-based unit test executables.

Update OpensslPkgHostUnitTest.dsc with TlsLib and IntrinsicLib
library mappings and the TlsLibUnitTestHost component reference
for the provider-agnostic TLS unit tests in CryptoPkg.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
Temporary dependency change for development. Points MU_BASECORE
to flickdm/mu_basecore feat/TlsLibUnitTest branch which contains
the TlsLib host-based unit tests.

Drop this commit once the TlsLib tests are merged into
microsoft/mu_basecore release/202511.

Signed-off-by: Doug Flick <dougflick@microsoft.com>
@Flickdm Flickdm force-pushed the feat/TlsLibUnitTests branch from 99568e5 to 29efeb0 Compare April 5, 2026 23:46
@Flickdm Flickdm added this to the OneCrypto-v1.0.1 milestone Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:non-functional Does not have a functional impact language:python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants