OpenDevicePartnership / OpenDevicePartnership/patina

Tracking Issue: Add patina_test tests back when UEFI Service mocking is available

Open
#1,697 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

state:backlog
Dominant language
Rust
Stars
544
Forks
54
Avg merge
1d 8h
Merged PRs (30d)
30

Description

Three tests are ignored in patina/components/patina_test/src/component.rs today:

https://github.com/OpenDevicePartnership/patina/blob/f2a570782c93f284554dc5a7356bed12f51693ee/components/patina_test/src/component.rs#L232-L275

At this time, these are the only unit tests in library code that are ignored and do not run successfully (panic). They were ignored because the storage::new() call sets up its boot_services by calling StandardBootServices::new_uninit():

https://github.com/OpenDevicePartnership/patina/blob/f2a570782c93f284554dc5a7356bed12f51693ee/sdk/patina/src/component/storage.rs#L228-L243

Eventually, actual calls are made to setup Ready to Boot and Exit Boot Services notifications:

https://github.com/OpenDevicePartnership/patina/blob/f2a570782c93f284554dc5a7356bed12f51693ee/components/patina_test/src/service.rs#L193-L213

However, the pointers still point to the uninitialized implementation and are not mocked. This issue tracks adding these tests back when UEFI Services tracked in https://github.com/OpenDevicePartnership/patina/issues/1537 are available to mock the event services.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the three ignored tests in patina/components/patina_test/src/component.rs and trace storage::new() through sdk/patina/src/component/storage.rs. Read the UEFI event-service setup in patina/components/patina_test/src/service.rs and issue #1537 for the required mocks. Done means the event services are mocked and the tests run successfully without being ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.