Skip to content

Commit

Permalink
Fix typo in SET_CERTIFICATE unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Bellock <sbellock@nvidia.com>
  • Loading branch information
steven-bellock committed Nov 5, 2024
1 parent 803849f commit 2f43815
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions unit_test/test_spdm_responder/set_certificate_rsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern bool g_in_trusted_environment;
* Test 1: receives a valid SET_CERTIFICATE request message from Requester to set cert in slot_id:0 with device_cert model
* Expected Behavior: produces a valid SET_CERTIFICATE_RSP response message
**/
void libspdm_test_responder_set_cetificate_rsp_case1(void **state)
void libspdm_test_responder_set_certificate_rsp_case1(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -156,7 +156,7 @@ void libspdm_test_responder_set_cetificate_rsp_case1(void **state)
* Test 2: Wrong SET_CERTIFICATE message size (larger than expected)
* Expected Behavior: generate an ERROR_RESPONSE with code SPDM_ERROR_CODE_INVALID_REQUEST
**/
void libspdm_test_responder_set_cetificate_rsp_case2(void **state)
void libspdm_test_responder_set_certificate_rsp_case2(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -230,7 +230,7 @@ void libspdm_test_responder_set_cetificate_rsp_case2(void **state)
* Test 3: Force response_state = LIBSPDM_RESPONSE_STATE_BUSY when asked SET_CERTIFICATE
* Expected Behavior: generate an ERROR_RESPONSE with code SPDM_ERROR_CODE_BUSY
**/
void libspdm_test_responder_set_cetificate_rsp_case3(void **state)
void libspdm_test_responder_set_certificate_rsp_case3(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -307,7 +307,7 @@ void libspdm_test_responder_set_cetificate_rsp_case3(void **state)
* Test 4: Force response_state = LIBSPDM_RESPONSE_STATE_NEED_RESYNC when asked SET_CERTIFICATE
* Expected Behavior: generate an ERROR_RESPONSE with code SPDM_ERROR_CODE_REQUEST_RESYNCH
**/
void libspdm_test_responder_set_cetificate_rsp_case4(void **state)
void libspdm_test_responder_set_certificate_rsp_case4(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -383,7 +383,7 @@ void libspdm_test_responder_set_cetificate_rsp_case4(void **state)
* Test 5: receives a valid SET_CERTIFICATE request message from Requester to set cert in slot_id:1 with session
* Expected Behavior: produces a valid SET_CERTIFICATE_RSP response message
**/
void libspdm_test_responder_set_cetificate_rsp_case5(void **state)
void libspdm_test_responder_set_certificate_rsp_case5(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -469,7 +469,7 @@ void libspdm_test_responder_set_cetificate_rsp_case5(void **state)
* Test 6: receives a valid SET_CERTIFICATE request message from Requester with need_reset
* Expected Behavior: The Responder return need reset
**/
void libspdm_test_responder_set_cetificate_rsp_case6(void **state)
void libspdm_test_responder_set_certificate_rsp_case6(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -544,7 +544,7 @@ void libspdm_test_responder_set_cetificate_rsp_case6(void **state)
* Test 7: receives a valid SET_CERTIFICATE request message from Requester to set cert in slot_id:0 with alias_cert model
* Expected Behavior: produces a valid SET_CERTIFICATE_RSP response message
**/
void libspdm_test_responder_set_cetificate_rsp_case7(void **state)
void libspdm_test_responder_set_certificate_rsp_case7(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -620,7 +620,7 @@ void libspdm_test_responder_set_cetificate_rsp_case7(void **state)
* Test 8: receives a SET_CERTIFICATE request message to set cert in slot_id:1 without session and with trusted environment
* Expected Behavior: produces a valid SET_CERTIFICATE_RSP response message
**/
void libspdm_test_responder_set_cetificate_rsp_case8(void **state)
void libspdm_test_responder_set_certificate_rsp_case8(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -695,7 +695,7 @@ void libspdm_test_responder_set_cetificate_rsp_case8(void **state)
* Test 9: receives a SET_CERTIFICATE request message to set cert in slot_id:1 without session and without trusted environment
* Expected Behavior: produces a valid ERROR response message
**/
void libspdm_test_responder_set_cetificate_rsp_case9(void **state)
void libspdm_test_responder_set_certificate_rsp_case9(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -773,7 +773,7 @@ void libspdm_test_responder_set_cetificate_rsp_case9(void **state)
* Test 10: receives a valid SET_CERTIFICATE request message from Requester to erase cert in slot_id:1 with session
* Expected Behavior: produces a valid SET_CERTIFICATE_RSP response message
**/
void libspdm_test_responder_set_cetificate_rsp_case10(void **state)
void libspdm_test_responder_set_certificate_rsp_case10(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -892,7 +892,7 @@ void libspdm_test_responder_set_cetificate_rsp_case10(void **state)
* Test 11: receives a valid SET_CERTIFICATE request message from Requester to set cert in slot_id:1 with key_pair_id
* Expected Behavior: produces a valid SET_CERTIFICATE_RSP response message
**/
void libspdm_test_responder_set_cetificate_rsp_case11(void **state)
void libspdm_test_responder_set_certificate_rsp_case11(void **state)
{
libspdm_return_t status;
libspdm_test_context_t *spdm_test_context;
Expand Down Expand Up @@ -1041,29 +1041,29 @@ void libspdm_test_responder_set_certificate_rsp_case12(void **state)

int libspdm_responder_set_certificate_rsp_test_main(void)
{
const struct CMUnitTest spdm_responder_set_cetificate_tests[] = {
const struct CMUnitTest spdm_responder_set_certificate_tests[] = {
/* Success Case for set_certificate to slot_id:0 with device_cert mode*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case1),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case1),
/* Bad request size*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case2),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case2),
/* response_state: LIBSPDM_RESPONSE_STATE_BUSY*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case3),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case3),
/* response_state: LIBSPDM_RESPONSE_STATE_NEED_RESYNC*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case4),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case4),
/* Success Case for set_certificate to slot_id:1 with session*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case5),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case5),
/* Responder requires a reset to complete the SET_CERTIFICATE request */
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case6),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case6),
/* Success Case for set_certificate to slot_id:0 with alias_cert mode*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case7),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case7),
/* Success Case for set_certificate to slot_id:1 without session and with trusted environment */
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case8),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case8),
/* Error Case for set_certificate to slot_id:1 without session and without trusted environment */
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case9),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case9),
/* Success Case for erase certificate to slot_id:1 with session*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case10),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case10),
/* Success Case for set_certificate to slot_id:1 with key_pair_id*/
cmocka_unit_test(libspdm_test_responder_set_cetificate_rsp_case11),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case11),
cmocka_unit_test(libspdm_test_responder_set_certificate_rsp_case12),
};

Expand All @@ -1074,7 +1074,7 @@ int libspdm_responder_set_certificate_rsp_test_main(void)

libspdm_setup_test_context(&test_context);

return cmocka_run_group_tests(spdm_responder_set_cetificate_tests,
return cmocka_run_group_tests(spdm_responder_set_certificate_tests,
libspdm_unit_test_group_setup,
libspdm_unit_test_group_teardown);
}
Expand Down

0 comments on commit 2f43815

Please sign in to comment.