From bade1db7e64b348d945cb131e13c949196d0bbf0 Mon Sep 17 00:00:00 2001 From: Wilfred Mallawa Date: Mon, 25 Nov 2024 13:08:23 +1000 Subject: [PATCH] transport: storage: add tests Signed-off-by: Wilfred Mallawa --- CMakeLists.txt | 2 + .../CMakeLists.txt | 62 ++++ .../spdm_transport_storage_decode_message.c | 130 ++++++++ .../CMakeLists.txt | 62 ++++ .../spdm_transport_storage_encode_message.c | 313 ++++++++++++++++++ 5 files changed, 569 insertions(+) create mode 100644 unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/CMakeLists.txt create mode 100644 unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/spdm_transport_storage_decode_message.c create mode 100644 unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/CMakeLists.txt create mode 100644 unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/spdm_transport_storage_encode_message.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ff870b27e3..fd8ede07e67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1006,6 +1006,8 @@ else() add_subdirectory(unit_test/fuzzing/test_transport/test_spdm_transport_mctp_decode_message) add_subdirectory(unit_test/fuzzing/test_transport/test_spdm_transport_pci_doe_encode_message) add_subdirectory(unit_test/fuzzing/test_transport/test_spdm_transport_pci_doe_decode_message) + add_subdirectory(unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message) + add_subdirectory(unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message) add_subdirectory(unit_test/fuzzing/test_secured_message/test_spdm_decode_secured_message) add_subdirectory(unit_test/fuzzing/test_secured_message/test_spdm_encode_secured_message) add_subdirectory(unit_test/fuzzing/test_spdm_crypt/test_x509_certificate_check) diff --git a/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/CMakeLists.txt b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/CMakeLists.txt new file mode 100644 index 00000000000..174896ef0f7 --- /dev/null +++ b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/CMakeLists.txt @@ -0,0 +1,62 @@ +cmake_minimum_required(VERSION 3.5) + +add_executable(test_spdm_transport_storage_decode_message) + +target_include_directories(test_spdm_transport_storage_decode_message + PRIVATE + ${LIBSPDM_DIR}/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message + ${LIBSPDM_DIR}/include + ${LIBSPDM_DIR}/include/library + ${LIBSPDM_DIR}/unit_test/include + ${LIBSPDM_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common + ${LIBSPDM_DIR}/os_stub/include +) + +if(TOOLCHAIN STREQUAL "KLEE") + target_include_directories(test_spdm_transport_storage_decode_message + PRIVATE + $ENV{KLEE_SRC_PATH}/include + ) +endif() + +target_sources(test_spdm_transport_storage_decode_message + PRIVATE + spdm_transport_storage_decode_message.c + ${PROJECT_SOURCE_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common/common.c + ${PROJECT_SOURCE_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common/toolchain_harness.c + ${PROJECT_SOURCE_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common/algo.c +) + +if((TOOLCHAIN STREQUAL "KLEE") OR (TOOLCHAIN STREQUAL "CBMC")) + target_link_libraries(test_spdm_transport_storage_decode_message + PRIVATE + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + ) +else() + target_link_libraries(test_spdm_transport_storage_decode_message + PRIVATE + memlib + debuglib + spdm_transport_storage_lib + spdm_common_lib + ${CRYPTO_LIB_PATHS} + rnglib + cryptlib_${CRYPTO} + malloclib + spdm_crypt_lib + spdm_secured_message_lib + spdm_transport_test_lib + spdm_device_secret_lib_null + ) +endif() diff --git a/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/spdm_transport_storage_decode_message.c b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/spdm_transport_storage_decode_message.c new file mode 100644 index 00000000000..da9743062bb --- /dev/null +++ b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_decode_message/spdm_transport_storage_decode_message.c @@ -0,0 +1,130 @@ +/** + * Copyright Notice: + * Copyright 2021-2022 DMTF. All rights reserved. + * License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md + **/ + +#include "internal/libspdm_responder_lib.h" +#include "spdm_transport_storage_lib.h" +#include "industry_standard/spdm_storage_binding.h" +#include "industry_standard/pcidoe.h" +#include "spdm_unit_fuzzing.h" +#include "toolchain_harness.h" + +libspdm_test_context_t m_libspdm_transport_storage_test_context = { + LIBSPDM_TEST_CONTEXT_VERSION, + false, +}; + +size_t libspdm_get_max_buffer_size(void) +{ + return LIBSPDM_MAX_SPDM_MSG_SIZE; +} + +void libspdm_test_transport_storage_decode_message(void **state) +{ + libspdm_test_context_t *spdm_test_context = *state; + void *transport_message, *message, *dec_message; + size_t transport_message_size, message_size, dec_message_size; + uint32_t *session_id; + bool is_app_message, dec_is_app_message, is_request_message; + libspdm_return_t ret; + + if (m_libspdm_transport_storage_test_context.test_buffer_size < sizeof(storage_spdm_transport_header)) { + LIBSPDM_ASSERT(false); + } + + /* Encode an SPDM Storage Message First (Test Setup) */ + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + transport_message = spdm_test_context->test_buffer; + is_app_message = false; + is_request_message = true; + message_size = 12; + message = (uint8_t *)transport_message + sizeof(storage_spdm_transport_header); + + ret = libspdm_transport_storage_encode_message( + state, + NULL, + is_app_message, + is_request_message, + message_size, + message, + &transport_message_size, + &transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + + ret = libspdm_transport_storage_decode_message( + state, + &session_id, + &dec_is_app_message, + is_request_message, + transport_message_size, + transport_message, + &dec_message_size, + &dec_message + ); + /* Trivial Assertions */ + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + LIBSPDM_ASSERT(dec_is_app_message == false); + LIBSPDM_ASSERT(dec_message_size == message_size); +} + +void libspdm_test_transport_storage_decode_management_cmd(void **state) +{ + libspdm_test_context_t *spdm_test_context = *state; + void *transport_message; + size_t transport_message_size; + size_t alloc_len; + uint32_t decoded_alloc_len; + uint8_t cmd_direction; + uint8_t transport_operation, transport_command; + libspdm_return_t ret; + + if (m_libspdm_transport_storage_test_context.test_buffer_size < sizeof(storage_spdm_transport_header)) { + LIBSPDM_ASSERT(false); + } + + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + transport_message = spdm_test_context->test_buffer; + cmd_direction = LIBSPDM_STORAGE_CMD_DIRECTION_IF_RECV; + transport_operation = SPDM_STORAGE_OPERATION_CODE_DISCOVERY; + alloc_len = 0xFF; + + /* Encode a management command first (Test Setup) */ + ret = libspdm_transport_storage_encode_management_cmd( + cmd_direction, + transport_operation, + 0, + &transport_message_size, + &alloc_len, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + + /* Attempt to decode with trivial assertions */ + ret = libspdm_transport_storage_decode_management_cmd( + transport_message_size, + transport_message, + &transport_command, + &decoded_alloc_len + ); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + LIBSPDM_ASSERT(transport_command == SPDM_STORAGE_OPERATION_CODE_DISCOVERY); + LIBSPDM_ASSERT(decoded_alloc_len == sizeof(storage_spdm_transport_header)); +} + +void libspdm_run_test_harness(void *test_buffer, size_t test_buffer_size) +{ + void *state; + + libspdm_setup_test_context(&m_libspdm_transport_storage_test_context); + + m_libspdm_transport_storage_test_context.test_buffer = test_buffer; + m_libspdm_transport_storage_test_context.test_buffer_size = test_buffer_size; + + libspdm_unit_test_group_setup(&state); + + libspdm_test_transport_storage_decode_management_cmd(&state); + libspdm_test_transport_storage_decode_message(&state); + + libspdm_unit_test_group_teardown(&state); +} diff --git a/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/CMakeLists.txt b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/CMakeLists.txt new file mode 100644 index 00000000000..754f11c7144 --- /dev/null +++ b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/CMakeLists.txt @@ -0,0 +1,62 @@ +cmake_minimum_required(VERSION 3.5) + +add_executable(test_spdm_transport_storage_encode_message) + +target_include_directories(test_spdm_transport_storage_encode_message + PRIVATE + ${LIBSPDM_DIR}/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message + ${LIBSPDM_DIR}/include + ${LIBSPDM_DIR}/include/library + ${LIBSPDM_DIR}/unit_test/include + ${LIBSPDM_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common + ${LIBSPDM_DIR}/os_stub/include +) + +if(TOOLCHAIN STREQUAL "KLEE") + target_include_directories(test_spdm_transport_storage_encode_message + PRIVATE + $ENV{KLEE_SRC_PATH}/include + ) +endif() + +target_sources(test_spdm_transport_storage_encode_message + PRIVATE + spdm_transport_storage_encode_message.c + ${PROJECT_SOURCE_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common/common.c + ${PROJECT_SOURCE_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common/toolchain_harness.c + ${PROJECT_SOURCE_DIR}/unit_test/fuzzing/spdm_unit_fuzzing_common/algo.c +) + +if((TOOLCHAIN STREQUAL "KLEE") OR (TOOLCHAIN STREQUAL "CBMC")) + target_link_libraries(test_spdm_transport_storage_encode_message + PRIVATE + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + ) +else() + target_link_libraries(test_spdm_transport_storage_encode_message + PRIVATE + memlib + debuglib + spdm_transport_storage_lib + spdm_common_lib + ${CRYPTO_LIB_PATHS} + rnglib + cryptlib_${CRYPTO} + malloclib + spdm_crypt_lib + spdm_secured_message_lib + spdm_transport_test_lib + spdm_device_secret_lib_null + ) +endif() diff --git a/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/spdm_transport_storage_encode_message.c b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/spdm_transport_storage_encode_message.c new file mode 100644 index 00000000000..9a2fdbbed5f --- /dev/null +++ b/unit_test/fuzzing/test_transport/test_spdm_transport_storage_encode_message/spdm_transport_storage_encode_message.c @@ -0,0 +1,313 @@ +/** + * Copyright Notice: + * Copyright 2021-2022 DMTF. All rights reserved. + * License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/libspdm/blob/main/LICENSE.md + **/ + +#include "internal/libspdm_responder_lib.h" +#include "spdm_transport_storage_lib.h" +#include "industry_standard/spdm_storage_binding.h" +#include "industry_standard/pcidoe.h" +#include "spdm_unit_fuzzing.h" +#include "toolchain_harness.h" + +/* + * This is to workaround `set but not used warning for build configs without + * `LIBSPDM_ASSERT() support. + */ +#define USE_VAR(x) (void)(x) + +libspdm_test_context_t m_libspdm_transport_storage_test_context = { + LIBSPDM_TEST_CONTEXT_VERSION, + false, +}; + +size_t libspdm_get_max_buffer_size(void) +{ + return LIBSPDM_MAX_SPDM_MSG_SIZE; +} + +void libspdm_test_transport_storage_encode_message(void **state) +{ + libspdm_test_context_t *spdm_test_context = *state; + storage_spdm_transport_header *hdr; + void *transport_message, *message; + size_t transport_message_size, message_size; + bool is_app_message, is_request_message; + libspdm_return_t ret; + + if (m_libspdm_transport_storage_test_context.test_buffer_size < sizeof(storage_spdm_transport_header)) { + LIBSPDM_ASSERT(false); + } + + /* Valid Parameters: SPDM Storage Message */ + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + transport_message = spdm_test_context->test_buffer; + is_app_message = false; + is_request_message = true; + message_size = 12; + message = (uint8_t *)transport_message + sizeof(storage_spdm_transport_header); + + ret = libspdm_transport_storage_encode_message(state, + NULL, + is_app_message, + is_request_message, + message_size, + message, + &transport_message_size, + &transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + + /* Trivial assertions for transport virtual header encoding */ + hdr = transport_message; + LIBSPDM_ASSERT(hdr->security_protocol == SPDM_STORAGE_SECURITY_PROTOCOL_DMTF); + LIBSPDM_ASSERT((hdr->security_protocol_specific >> 8) == 0); /* SPSP1 */ + LIBSPDM_ASSERT((hdr->security_protocol_specific & 0xFF) != 0); /* SPSP0 */ + LIBSPDM_ASSERT(hdr->length == (message_size + sizeof(storage_spdm_transport_header))); + + /* Invalid Parameters: Message side exceeds transport buffer size */ + transport_message_size = 0; + ret = libspdm_transport_storage_encode_message(state, + NULL, + is_app_message, + is_request_message, + message_size, + message, + &transport_message_size, + &transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_INVALID_MSG_SIZE); + USE_VAR(ret); + USE_VAR(hdr); +} + +void libspdm_test_transport_storage_encode_management_cmd(void **state) +{ + libspdm_test_context_t *spdm_test_context = *state; + storage_spdm_transport_header *hdr; + size_t transport_message_size; + void *transport_message; + size_t allocation_len = 0; + uint8_t cmd_direction; + uint8_t transport_operation; + libspdm_return_t ret; + + if (m_libspdm_transport_storage_test_context.test_buffer_size < sizeof(storage_spdm_transport_header)) { + LIBSPDM_ASSERT(false); + } + + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + transport_message = spdm_test_context->test_buffer; + cmd_direction = LIBSPDM_STORAGE_CMD_DIRECTION_IF_RECV; + transport_operation = SPDM_STORAGE_OPERATION_CODE_DISCOVERY; + + /* Valid Parameters: Test IF_RECV Discovery */ + ret = libspdm_transport_storage_encode_management_cmd( + cmd_direction, + transport_operation, + 0, + &transport_message_size, + &allocation_len, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + LIBSPDM_ASSERT(allocation_len != 0); + + /* Trivial Compliance Assertions */ + hdr = transport_message; + LIBSPDM_ASSERT(hdr->security_protocol == SPDM_STORAGE_SECURITY_PROTOCOL_DMTF); + LIBSPDM_ASSERT((hdr->security_protocol_specific >> 8) == 0); /* SPSP1 */ + LIBSPDM_ASSERT((hdr->security_protocol_specific & 0xFF) != 0); /* SPSP0 */ + LIBSPDM_ASSERT(hdr->inc_512 == false); + LIBSPDM_ASSERT(hdr->length == sizeof(storage_spdm_transport_header)); + + /* Valid Parameters: Test IF_SEND Pending Info */ + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + cmd_direction = LIBSPDM_STORAGE_CMD_DIRECTION_IF_SEND; + transport_operation = SPDM_STORAGE_OPERATION_CODE_PENDING_INFO; + allocation_len = 0; + + ret = libspdm_transport_storage_encode_management_cmd( + cmd_direction, + transport_operation, + 0, + &transport_message_size, + &allocation_len, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + LIBSPDM_ASSERT(allocation_len == 0); + + /* Trivial Compliance Assertions */ + hdr = transport_message; + LIBSPDM_ASSERT(hdr->security_protocol == SPDM_STORAGE_SECURITY_PROTOCOL_DMTF); + LIBSPDM_ASSERT((hdr->security_protocol_specific >> 8) == 0); /* SPSP1 */ + LIBSPDM_ASSERT((hdr->security_protocol_specific & 0xFF) != 0); /* SPSP0 */ + LIBSPDM_ASSERT(hdr->inc_512 == false); + LIBSPDM_ASSERT(hdr->length == sizeof(storage_spdm_transport_header)); + + /* Bad Transport Message Size */ + transport_message_size = 0; + ret = libspdm_transport_storage_encode_management_cmd( + cmd_direction, + transport_operation, + 0, + &transport_message_size, + &allocation_len, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_INVALID_MSG_SIZE); + + /* Invalid Command Direction */ + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + cmd_direction = 0xFF; + + ret = libspdm_transport_storage_encode_management_cmd( + cmd_direction, + transport_operation, + 0, + &transport_message_size, + &allocation_len, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_INVALID_MSG_FIELD); + + /* Invalid Transport Operation*/ + cmd_direction = LIBSPDM_STORAGE_CMD_DIRECTION_IF_SEND; + transport_operation = 0xDD; + + ret = libspdm_transport_storage_encode_management_cmd( + cmd_direction, + transport_operation, + 0, + &transport_message_size, + &allocation_len, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_INVALID_MSG_FIELD); + USE_VAR(ret); + USE_VAR(hdr); +} + +void libspdm_test_transport_storage_encode_discovery_response(void **state) +{ + libspdm_test_context_t *spdm_test_context = *state; + spdm_storage_discovery_response_t *d_resp; + size_t transport_message_size; + void *transport_message; + libspdm_return_t ret; + + if (m_libspdm_transport_storage_test_context.test_buffer_size < sizeof(spdm_storage_discovery_response_t)) { + LIBSPDM_ASSERT(false); + } + + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + transport_message = spdm_test_context->test_buffer; + + /* Valid Parameters */ + ret = libspdm_transport_storage_encode_discovery_response( + &transport_message_size, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + + d_resp = transport_message; + LIBSPDM_ASSERT(transport_message_size == sizeof(spdm_storage_discovery_response_t)); + LIBSPDM_ASSERT(d_resp->data_length == sizeof(spdm_storage_discovery_response_t)); + LIBSPDM_ASSERT(d_resp->storage_binding_version == SPDM_STORAGE_SECURITY_BINDING_VERSION); + LIBSPDM_ASSERT(d_resp->supported_operations != 0); + + /* Invalid Input Buffer Size */ + transport_message_size = 1; + + ret = libspdm_transport_storage_encode_discovery_response( + &transport_message_size, + transport_message); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_BUFFER_TOO_SMALL); + USE_VAR(ret); + USE_VAR(d_resp); +} + +void libspdm_test_transport_storage_encode_pending_resp(void **state) +{ + libspdm_test_context_t *spdm_test_context = *state; + spdm_storage_pending_info_response_t *p_resp; + size_t transport_message_size; + void *transport_message; + bool resp_pending; + uint32_t pending_response_length; + libspdm_return_t ret; + + if (m_libspdm_transport_storage_test_context.test_buffer_size < sizeof(spdm_storage_pending_info_response_t)) { + LIBSPDM_ASSERT(false); + } + + /* Valid Parameters: Response Pending */ + transport_message_size = LIBSPDM_MAX_SENDER_RECEIVER_BUFFER_SIZE; + transport_message = spdm_test_context->test_buffer; + resp_pending = true; + pending_response_length = 32; + ret = libspdm_transport_storage_encode_pending_info_response( + &transport_message_size, + transport_message, + resp_pending, + pending_response_length + ); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + + p_resp = transport_message; + LIBSPDM_ASSERT(transport_message_size == sizeof(spdm_storage_pending_info_response_t)); + LIBSPDM_ASSERT(p_resp->data_length == sizeof(spdm_storage_pending_info_response_t)); + LIBSPDM_ASSERT(p_resp->storage_binding_version == SPDM_STORAGE_SECURITY_BINDING_VERSION); + LIBSPDM_ASSERT(p_resp->pending_info_flag == 1); + LIBSPDM_ASSERT(p_resp->response_length == pending_response_length); + + /* Valid Parameters: No Response Pending */ + resp_pending = false; + ret = libspdm_transport_storage_encode_pending_info_response( + &transport_message_size, + transport_message, + resp_pending, + pending_response_length + ); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_SUCCESS); + + p_resp = transport_message; + LIBSPDM_ASSERT(transport_message_size == sizeof(spdm_storage_pending_info_response_t)); + LIBSPDM_ASSERT(p_resp->data_length == sizeof(spdm_storage_pending_info_response_t)); + LIBSPDM_ASSERT(p_resp->storage_binding_version == SPDM_STORAGE_SECURITY_BINDING_VERSION); + LIBSPDM_ASSERT(p_resp->pending_info_flag == 0); + LIBSPDM_ASSERT(p_resp->response_length == 0); + + /* Invalid Transport Message Size */ + transport_message_size = 1; + ret = libspdm_transport_storage_encode_pending_info_response( + &transport_message_size, + transport_message, + resp_pending, + pending_response_length + ); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_BUFFER_TOO_SMALL); + + ret = libspdm_transport_storage_encode_pending_info_response( + NULL, + transport_message, + resp_pending, + pending_response_length + ); + LIBSPDM_ASSERT(ret == LIBSPDM_STATUS_INVALID_MSG_SIZE); + USE_VAR(ret); + USE_VAR(p_resp); +} + +void libspdm_run_test_harness(void *test_buffer, size_t test_buffer_size) +{ + void *state; + + libspdm_setup_test_context(&m_libspdm_transport_storage_test_context); + + m_libspdm_transport_storage_test_context.test_buffer = test_buffer; + m_libspdm_transport_storage_test_context.test_buffer_size = test_buffer_size; + + libspdm_unit_test_group_setup(&state); + + libspdm_test_transport_storage_encode_message(&state); + libspdm_test_transport_storage_encode_management_cmd(&state); + libspdm_test_transport_storage_encode_discovery_response(&state); + libspdm_test_transport_storage_encode_pending_resp(&state); + + libspdm_unit_test_group_teardown(&state); +}