diff --git a/unit_test/test_spdm_responder/set_certificate_rsp.c b/unit_test/test_spdm_responder/set_certificate_rsp.c index 6a84d348b02..e638f1bf4a2 100644 --- a/unit_test/test_spdm_responder/set_certificate_rsp.c +++ b/unit_test/test_spdm_responder/set_certificate_rsp.c @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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; @@ -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), }; @@ -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); }