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

Update MorLockTestApp to fix errors with new standard return values #488

Conversation

Ken-Pong
Copy link
Contributor

Description

When TcgMorLockSmm.c the SetVariableCheckHandlerMorLock() function was changed to set the MorLock variable Value to 0x01 to indicate Locked Without Key, MorLockTestApp also need to be changed to make sure the test flow can get positive results.

Changes are listed as below

  1. MorLockShouldNotBeSet(): This function should compare with MOR_LOCK_DATA_UNLOCKED.
  2. MorLockv2LockedWithoutKeyShouldReportCorrectly(): Rename from MorLockv2ShouldReportCorrectly() and update usage in MorLockTestApp() as it is compared with MOR_LOCK_DATA_LOCKED_WITHOUT_KEY.
  3. MorLockv2LockedWithKeyShouldReportCorrectly(): This new function compares MorLock with MOR_LOCK_DATA_LOCKED_WITH_KEY for Morlock V2 testing. Also update usage in MorLockTestApp().
  4. MorLockv2ShouldNotClearWithWrongKey(): Should compare with MOR_LOCK_DATA_LOCKED_WITHOUT_KEY when using wrong key to clear MorLock.
  5. MorLockv2ShouldSetClearSet(): Should compare with MOR_LOCK_DATA_LOCKED_WITHOUT_KEY when using different key to clear MorLock.
  6. MorLockTestApp(): Update above function usage in different test cases to make sure the test can be finished.
  • 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?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • 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

Tested in the uefi shell. The tests should get positive results and no errors are reported.

Integration Instructions

N/A

@github-actions github-actions bot added impact:non-functional Does not have a functional impact impact:testing Affects testing labels May 20, 2024
@makubacki makubacki force-pushed the personal/kenpeng/MorLockTestUpdate branch from 6232f75 to afca4de Compare May 29, 2024 13:52
@kenlautner kenlautner merged commit ab1129b into microsoft:release/202311 May 29, 2024
28 checks passed
ProjectMuBot added a commit to microsoft/mu_tiano_platforms that referenced this pull request Jun 6, 2024
Introduces 8 new commits in [Common/MU](https://github.com/microsoft/mu_plus.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_plus/commit/0b2315b5f35930943382bf9aeb3712bc60753fa6">0b2315</a> pip: bump regex from 2024.5.10 to 2024.5.15 (<a href="https://github.com/microsoft/mu_plus/pull/489">#489</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/ab1129bd24b051e2f9068bb2fe7e71bb300c5283">ab1129</a> Update MorLockTestApp to fix errors with new standard return values (<a href="https://github.com/microsoft/mu_plus/pull/488">#488</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/8213f0ef0d88f9129bf82323debae78774f8da47">8213f0</a> Repo File Sync: synced file(s) with microsoft/mu_devops (<a href="https://github.com/microsoft/mu_plus/pull/490">#490</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/3709a53fb5670158f2a40b3f477730d6c0993f2c">3709a5</a> pip: bump edk2-pytool-extensions from 0.27.4 to 0.27.5 (<a href="https://github.com/microsoft/mu_plus/pull/491">#491</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/8da8aa73144066cfaf5fd404161560e63eb8bbd3">8da8aa</a> Fixing bsr64 for MathLib  (<a href="https://github.com/microsoft/mu_plus/pull/492">#492</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/33b0a0580a3b6f9221cf0620b924617c93fe4d7a">33b0a0</a> pip: bump edk2-pytool-library from 0.21.5 to 0.21.6 (<a href="https://github.com/microsoft/mu_plus/pull/493">#493</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/01651e452dcac06182a43df99e66f48402063875">01651e</a> Fix GCC Build of AdvLoggerOsConnectorPRM (<a href="https://github.com/microsoft/mu_plus/pull/494">#494</a>)</li>
<li><a href="https://github.com/microsoft/mu_plus/commit/0a1ce577e8c8f151f33d239ff52a80d4bc652e44">0a1ce5</a> Fixing uninitialized variable used in AdvLoggerOsConnectorPrmConfigLib (<a href="https://github.com/microsoft/mu_plus/pull/495">#495</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <mubot@microsoft.com>
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

3 participants