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

Illegal parameters and libspdm_requester_*_test_*_message #2743

Open
steven-bellock opened this issue Jun 30, 2024 · 0 comments
Open

Illegal parameters and libspdm_requester_*_test_*_message #2743

steven-bellock opened this issue Jun 30, 2024 · 0 comments
Labels
test For tests and testing infrastructure

Comments

@steven-bellock
Copy link
Contributor

steven-bellock commented Jun 30, 2024

When testing illegal parameters on public Requester functions libspdm_requester_*_test_send_message and libspdm_requester_*_test_receive_message usually returns LIBSPDM_STATUS_SUCCESS for that case. However this is misleading as libspdm_requester_*_test_*_message should not be called for that case and it should be considered an implementation bug if it is called. For example

/**
* Test 9: Integrator requests signature when Responder does not support signatures.
* Expected Behavior: Returns LIBSPDM_STATUS_INVALID_PARAMETER.
**/
and
case 0x9:
return LIBSPDM_STATUS_SUCCESS;
cmocka's assert_true(false); should be hit before returning from the function.

@steven-bellock steven-bellock added the test For tests and testing infrastructure label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test For tests and testing infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant