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

Add MockDeviceBootManagerLib to 202311 #574

Conversation

YiTa-AMI
Copy link
Contributor

Description

Create Mock for DeviceBootManagerLibNull

For details on how to complete 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

Unit tests component can call these mock functions success

Integration Instructions

N/A

magravel and others added 16 commits July 29, 2024 16:54
- use more rust idiomatic naming convention
- use `let else` syntax for better readability
- Organize import with the same logic in every file.
  1. crate from rust
  2. crate from crate.io
  3. crate from Microsoft
  4. use from the same crate

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Test that the keyboard was still working.

## Integration Instructions

N/A
Bumps [regex](https://github.com/mrabarnett/mrab-regex) from 2024.5.15
to 2024.7.24.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps
[edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library)
from 0.21.8 to 0.21.9.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…river implementation (microsoft#525)

## Description

Add debug level prefix for advanced logger memory message entries -
Driver implementation
This change added the existing metadata - debug level into the final
advanced logger memory entries through AdvancedFileLogger. This is a
followup PR for
microsoft@243bd18.
After this PR checked in, we can easily track the DEBUG_ERRORs through
advanced logger files on UEFI that included this driver.
Added an extra space in the decodeuefilog.py to improve readability of
the log.
For the for loop in the code, ran with perf_trace enabled, and influence
is very low and can be ignored.
Updated the prefix of python script to match the design here. 
Use [ERROR] instead of [DEBUG_ERROR], which could save overall log file
sizes and memory buffer usage.

- [x] 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 with two platforms that uses AdvancedFileLogger and can see debug
level
prefixes in the logs in the EFI Partition and USB UefiLogs folder.
[MM_CORE] [ERROR] Image - MmSupervisorCore.pdb

## Integration Instructions

N/A
…oft#538)

Updates the requirements on [r-efi](https://github.com/r-efi/r-efi) to
permit the latest version.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [antlr4-python3-runtime](http://www.antlr.org) from 4.13.1 to
4.13.2.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Description

There are multiple copies of VariableSupportLib floating across repos,
mostly only supporting Windows.

Functionality has been consolidated into edk2-pytool-library version
0.21.7. Support for Linux has been added.

Switch MfciPolicy.py, DecodeUefiLog.py and UefiVarAudit.py to use
consolidated version from edk2-pytool-library.

Removed local copies of VariableSupportLib.py

- [x] 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

## Integration Instructions

N/A
Bumps
[edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library)
from 0.21.9 to 0.21.10.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Description

Fix an issue where the wrong format specifier was used for an ASCII
string.

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

Observed that ID_NOT_FOUND string was properly formatted.

## Integration Instructions

N/A
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.



---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#10316616855](https://github.com/microsoft/mu_devops/actions/runs/10316616855)

Signed-off-by: Project Mu UEFI Bot <[email protected]>
Bumps
[edk2-pytool-extensions](https://github.com/tianocore/edk2-pytool-extensions)
from 0.27.10 to 0.27.11.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… list box (microsoft#552)

## Description

Fixes microsoft#554 

- Adjusted CellTrashcanBounds.Left to be CellBounds->Right -
TrashcanHitAreaWidth
to ensure the trash can icon is displayed to the right of the list box.
- Updated width parameter in SWM_RECT_INIT2 to use TrashcanHitAreaWidth
instead
  of CheckBoxHitAreaWidth for correct dimensions.

This resolves the issue of the trash can icon overlapping with the
ListBox's deletable item's checkbox thus ensuring its related operations
work correctly: activating/deactivating the Load Option or deleting it.

## How This Was Tested

Verified that a Load Option allowed to be deleted, such as 'Windows Boot
Manager', can now be deleted by pressing the trash icon in its proper
position or activated via its check-box.

## Integration Instructions

N/A

Co-authored-by: Michael Kubacki <[email protected]>
…soft#541)

## Description

Removed reference to PcdAdvHdwLoggerDisable in the ReadMe MarkDown
document.

In commit 3833901,
PcdAdvancedSerialLoggerDisable in AdvLoggerPkg.dec was changed to
PcdAdvancedLoggerHdwPortDisable but in the ReadMe was changed to
PcdAdvancedHdwLoggerDisable.

This PCD was later removed from the .DEC in commit
8770182 but wasn't removed from the
ReadMe due to the naming difference.

- [ ] 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, ...
- [x] 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

Ran CI for X64 Architecture. All Test Passed.

## Integration Instructions

N/A
## Description

The PCD PcdAdvancedLoggerPeiInRam does not work and is being removed.
For Intel systems, the PEI phase uses cache-as-ram and determines that
there is no way to allocate memory. This PCD was supposed to signal to
the logger that it could allocate memory, however, it would error as
memory allocation was not allowed in that phase.

- [ ] 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, ...
- [x] 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, ...
- [x] 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

Ran the CI build for all packages in mu_plus for the X64 architecture.
All tests passing.

## Integration Instructions

Users of PcdAdvancedLoggerPeiInRam will need to remove that PCD from
DSCs. It is not expected there are users as the PCD does not work,
although platforms may have specifically set it to FALSE.
… Test

MemoryOutsideEfiMemoryMapIsInaccessible was attempting to test that memory
outside the EFI_MEMORY_MAP was marked EFI_MEMORY_RP or unmapped, however this
is not a valid test as we expect there to be ranges outside of the EFI_MEMORY_MAP,
such as GCD non-existent memory and non-runtime MMIO ranges. This patch removes
the test.
@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels Sep 10, 2024
@YiTa-AMI YiTa-AMI closed this Sep 10, 2024
@YiTa-AMI YiTa-AMI deleted the MockDeviceBootManagerLib_202311 branch September 10, 2024 06:22
@YiTa-AMI YiTa-AMI restored the MockDeviceBootManagerLib_202311 branch September 10, 2024 06:24
@YiTa-AMI YiTa-AMI deleted the MockDeviceBootManagerLib_202311 branch September 10, 2024 07:33
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.

9 participants