Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202405][REBASE&FF]MdeModulePkg: VariableRuntimeDxe: Add host-based unit tests #967

Merged

Conversation

Javagedes
Copy link
Contributor

@Javagedes Javagedes commented Jun 26, 2024

Description

Adds hostbased unit tests for VariableRuntimeDxe including converting some Self Certification Test (SCT)s into Host Based Unit Tests.

Includes:
c060ede
d1ed38e
863063f
68670a0
090e049

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Creates multiple new tests for VariableRuntimeDxe
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

<Please 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.>

@github-actions github-actions bot added impact:non-functional Does not have a functional impact impact:testing Affects testing labels Jun 26, 2024
@Javagedes Javagedes changed the title MdeModulePkg: VariableRuntimeDxe: Add host-based unit tests [202405][REBASE&FF]MdeModulePkg: VariableRuntimeDxe: Add host-based unit tests Jun 26, 2024
@Javagedes Javagedes force-pushed the variable-sct-to-host-based-test branch from e63bdf4 to 21c1c0a Compare June 26, 2024 16:11
@Javagedes Javagedes requested a review from Flickdm June 26, 2024 16:11
@Javagedes Javagedes force-pushed the variable-sct-to-host-based-test branch 4 times, most recently from cad4a0b to 38ab522 Compare June 26, 2024 16:52
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (release/202405@fb60055). Learn more about missing BASE report.

Files Patch % Lines
...y/VarCheckPolicyLib/VarCheckPolicyLibVariableDxe.c 80.00% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/202405     #967   +/-   ##
=================================================
  Coverage                  ?    0.60%           
=================================================
  Files                     ?      633           
  Lines                     ?   217575           
  Branches                  ?     1337           
=================================================
  Hits                      ?     1317           
  Misses                    ?   216213           
  Partials                  ?       45           
Flag Coverage Δ
MdeModulePkg 0.60% <80.00%> (?)

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

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

@Javagedes Javagedes force-pushed the variable-sct-to-host-based-test branch from 38ab522 to 785b5bd Compare July 2, 2024 15:22
@Javagedes Javagedes force-pushed the variable-sct-to-host-based-test branch 4 times, most recently from 70d3fc6 to 58d3cc3 Compare July 5, 2024 15:56
MdeModulePkg/Test/MdeModulePkgHostTest.dsc Outdated Show resolved Hide resolved
@Javagedes Javagedes force-pushed the variable-sct-to-host-based-test branch 10 times, most recently from d128404 to 41dff02 Compare July 17, 2024 22:15
Bret Barkelew and others added 2 commits July 17, 2024 16:17
This test will enable direct testing of the variable logic
(including the logic common to all drivers) without having
to load a full simulator or emulator.

Configures emulated non-volatile variables in order to
test the entire functionality.

Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
Bret Barkelew added 2 commits July 17, 2024 16:17
Copy SCT tests for VariableRuntimeDxe in preparation for
using them as Host-based unit tests and updates their license
format to follow edk2 standards.

NOTE: Will not build yet. This import is kept separate from the
changes to get things building so that it's easy to track the
build changes.

Co-authored-by: Joey Vagedes<joey.vagedes@gmail.com>
This requires a number of changes to the SCT test cases
as well as some additional scaffolding to adapt the test
cases to the host-based framework.
@Javagedes Javagedes force-pushed the variable-sct-to-host-based-test branch from 41dff02 to 0f3a359 Compare July 17, 2024 23:17
@Javagedes Javagedes merged commit 4fd6116 into microsoft:release/202405 Jul 18, 2024
30 checks passed
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 impact:testing Affects testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants