Discussion: SCT debug_assert in `WaitForEvent_Conf`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- rust
- Domain
- embedded-iot, testing
Research direction
Read patina_dxe_core/src/events.rs around wait_for_event and the linked SCT test EventTimerTaskPriorityServicesBBTestWaitForEvent.c at lines 201–213. The issue presents several possible approaches but does not choose one; first determine whether the debug assertion should accommodate this conformance test. Done means there is an agreed behavior for debug builds and the SCT run confirms it.
Written by the indexing model from the issue text.
Description
Patina debug (dev profile) builds with debug_asserts enabled will assert when running the "WaitForEvent_Conf" tests for "Conformance test for boot service WaitForEvent().".
While the UEFI Specification requires WaitForEvent() to be called at TPL_APPLICATION, the test will intentionally call at invalid TPL to verify that EFI_UNSUPPORTED is returned:
//
// Wait for event at invalid TPLs
//
for (Index = 0; CheckTpls[Index] != 0; Index++) {
OldTpl = gtBS->RaiseTPL (CheckTpls[Index]);
Status = gtBS->WaitForEvent (1, &Event, &EventIndex);
gtBS->RestoreTPL (OldTpl);
if (Status == EFI_UNSUPPORTED) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
} else {
AssertionType = EFI_TEST_ASSERTION_FAILED;
}
After commit https://github.com/OpenDevicePartnership/patina/commit/208185bf5dea58532d7ba9d80a9965099ab714ca, unsafe extern "efiapi" fn wait_for_event will debug_assert:
In the normal debug build case, the assert is reasonable given UEFI Specification caller requirements and the release profile does pass SCT as expected. On the other hand, a debug (dev) build generally runs fine against every other SCT test (attempted so far), so this is an outlier for interrupting testing. Another point is that the SCT can be resumed on subsequent boots, so while annoying, cases like this could technically be automated/accommodated. Another possible line of thinking would be to treat SCT builds special in some way, but I'd prefer not to do that for many reasons, especially in the patina repo (build/code complexity, potential to use that "flavor" in non-SCT scenarios, etc.). In patina-dxe-core-qemu, perhaps an SCT profile or something like that would be less pervasive but still undesirable.
In any case, the issue is raised here for discussion and awareness.
Note: I am currently automating SCT execution on both dev and release profile builds. However, like I said earlier, even a decision to stay as-is, can be worked around.
- Dominant language
- Rust
- Stars
- 568
- Forks
- 63
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenDevicePartnership/patina
-
state:needs-owner state:needs-triage type:documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenDevicePartnership/patina#1987 ·
Maintainers usually reply within 1 day
-
state:backlog state:needs-triage type:feature-request urgency:medium
Difficulty 5/5 Over a week Newbie friendliness 28/100
OpenDevicePartnership/patina#2039 ·
Maintainers usually reply within 1 day
-
Potential Major Update: Drop `Deref` from `Protocol<P>`Possibly taken @makubacki claimed this 7 days ago. Open
OpenDevicePartnership/patina#2036 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: Enforce service thread safety through automatic Send and Sync implementationsPossibly taken @Javagedes claimed this 8 days ago. Openstate:needs-triage type:feature-request urgency:medium
OpenDevicePartnership/patina#2027 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
OpenDevicePartnership/patina#2024 ·
Maintainers usually reply within 1 day
All issues in OpenDevicePartnership/patina
Similar issues
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
can1357/oh-my-pi#21349 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
erkamyaman/rea-games#246 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aaif-goose/goose#13970 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#136277 ·
Maintainers usually reply within 1 day