Skip to content

[New Test Coverage] SctPkg/RestExBBTest: Update AsyncSendReceive tests - #347

Open
cgjertsen wants to merge 2 commits into
tianocore:masterfrom
cgjertsen:restex-async-send-receive-mantis-1924
Open

cgjertsen wants to merge 2 commits into
tianocore:masterfrom
cgjertsen:restex-async-send-receive-mantis-1924

Conversation

@cgjertsen

Copy link
Copy Markdown
Contributor

Summary

Updates the EFI_REST_EX_PROTOCOL.AsyncSendReceive() black-box tests to cover the revised asynchronous operation semantics introduced by UEFI 2.8 (Mantis 1924).

Changes

Conformance tests (RestExBBTestConformance.c):

  • Checkpoint 3: Validates cancellation via NULL RequestMessage — expects EFI_ABORTED per the revised cancellation semantics
  • Checkpoint 4: Validates zero TimeOutInMilliSeconds — expects EFI_TIMEOUT per the revised timeout handling

Function tests (RestExBBTestFunction.c):

  • Checkpoint 2: Validates non-NULL TimeOutInMilliSeconds exercises the timeout path
  • Checkpoint 3: Validates NULL RequestMessage cancellation returns EFI_ABORTED

Bug fixes:

  • Fixed duplicate EFI_TEST_ASSERTION_WARNING in else branches for SendReceive, AyncSendReceive, and EventService function tests (should be EFI_TEST_ASSERTION_FAILED for unexpected status codes)

New Assertion GUIDs

  • Conformance: 014 (NULL RequestMessage cancellation), 015 (zero timeout)
  • Function: 010 (timeout parameter), 011 (NULL RequestMessage cancellation)

Specification Reference

Test Plan

  • Verify module builds cleanly with EDK II GCC toolchain (RestExBBTest.inf)
  • Verify new conformance checkpoints produce PASSED/WARNING with a compliant REST EX driver
  • Verify new function test checkpoints exercise timeout and cancellation paths
  • Verify fixed assertion branches correctly report FAILED for unexpected status codes

Closes #322

@cgjertsen
cgjertsen force-pushed the restex-async-send-receive-mantis-1924 branch 3 times, most recently from b7d0a85 to c532ed2 Compare April 21, 2026 19:40
Add comprehensive black-box tests for EFI_REST_EX_PROTOCOL per UEFI 2.8
(Mantis 1834) with conformance clarifications from Mantis 1879.

New test coverage for all seven protocol functions:
- GetService(): Function and conformance (NULL parameter)
- Configure(): Function (reset to unconfigured) and conformance
- GetModeData(): Function and conformance (NULL parameter, not-ready)
- SendReceive(): Function (basic GET) and conformance (NULL parameters,
  not-ready before Configure)
- GetServiceTime(): Function and conformance (NULL Time, not-ready)
- AyncSendReceive(): Function and conformance (NULL token, not-ready)
- EventService(): Function and conformance (NULL token, not-ready)

Per Mantis 1879 clarification, all conformance tests verify that
functions except GetService() return EFI_NOT_READY when Configure()
has not been called.

Ref: tianocore#321

Signed-off-by: Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
@cgjertsen
cgjertsen force-pushed the restex-async-send-receive-mantis-1924 branch 2 times, most recently from 02462c6 to 8b3c64d Compare April 21, 2026 20:15
Add test checkpoints for the UEFI 2.8 (Mantis 1924) updates to
EFI_REST_EX_PROTOCOL.AsyncSendReceive():

Conformance tests:
- Checkpoint 3: NULL RequestMessage cancels async request, expects
  EFI_ABORTED per revised cancellation semantics
- Checkpoint 4: Zero TimeOutInMilliSeconds expects EFI_TIMEOUT per
  revised timeout handling

Function tests:
- Checkpoint 2: Non-NULL TimeOutInMilliSeconds validates timeout path
- Checkpoint 3: NULL RequestMessage cancellation returns EFI_ABORTED

Also fix duplicate WARNING branches in SendReceive, AyncSendReceive,
and EventService function tests (should be FAILED for unexpected
status codes).

Ref: tianocore#322

Signed-off-by: Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@cgjertsen
cgjertsen force-pushed the restex-async-send-receive-mantis-1924 branch from 8b3c64d to 5cbdbb0 Compare May 6, 2026 22:42
cgjertsen added a commit to cgjertsen/edk2-test that referenced this pull request May 14, 2026
Add 2025.05 revision history entry covering UEFI 2.8–2.10A test
updates (PRs tianocore#320, tianocore#346–tianocore#352). Register new chapters 33 (REST EX
Protocol) and 34 (Redfish Discover Protocol) in the Sphinx table
of contents.

Cc: PR tianocore#320, PR tianocore#346, PR tianocore#347, PR tianocore#348, PR tianocore#349, PR tianocore#350, PR tianocore#351, PR tianocore#352
Signed-off-by: Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Test Coverage Phase 2] Update REST EX AsyncSendReceive() tests (Mantis 1924)

1 participant