diff --git a/tests/subsys/suit/copy/CMakeLists.txt b/tests/subsys/suit/copy/CMakeLists.txt index db01516cc590..11c0b22fb8df 100644 --- a/tests/subsys/suit/copy/CMakeLists.txt +++ b/tests/subsys/suit/copy/CMakeLists.txt @@ -15,3 +15,5 @@ zephyr_library_link_libraries(suit) zephyr_library_link_libraries(suit_platform_interface) zephyr_library_link_libraries(suit_memptr_storage_interface) zephyr_library_link_libraries(suit_sink_selector_interface) +zephyr_library_link_libraries(suit_storage_interface) +zephyr_library_link_libraries(suit_manifest_variables) diff --git a/tests/subsys/suit/copy/boards/native_sim.overlay b/tests/subsys/suit/copy/boards/native_sim.overlay index 6ce400395592..8cb0eea6d16d 100644 --- a/tests/subsys/suit/copy/boards/native_sim.overlay +++ b/tests/subsys/suit/copy/boards/native_sim.overlay @@ -10,9 +10,14 @@ #address-cells = <1>; #size-cells = <1>; - /* Use the last 8KB of NVM as dfu_partition. */ - dfu_partition: partition@fe000 { - reg = <0xfe000 DT_SIZE_K(8)>; + /* Use 8KB of NVM as dfu_partition. */ + dfu_partition: partition@f0000 { + reg = <0xf0000 DT_SIZE_K(8)>; + }; + + /* Use the last 48KB of NVM as suit storage. */ + suit_storage: partition@f4000 { + reg = <0xf4000 DT_SIZE_K(48)>; }; }; }; diff --git a/tests/subsys/suit/copy/boards/native_sim_64.overlay b/tests/subsys/suit/copy/boards/native_sim_64.overlay index 6ce400395592..8cb0eea6d16d 100644 --- a/tests/subsys/suit/copy/boards/native_sim_64.overlay +++ b/tests/subsys/suit/copy/boards/native_sim_64.overlay @@ -10,9 +10,14 @@ #address-cells = <1>; #size-cells = <1>; - /* Use the last 8KB of NVM as dfu_partition. */ - dfu_partition: partition@fe000 { - reg = <0xfe000 DT_SIZE_K(8)>; + /* Use 8KB of NVM as dfu_partition. */ + dfu_partition: partition@f0000 { + reg = <0xf0000 DT_SIZE_K(8)>; + }; + + /* Use the last 48KB of NVM as suit storage. */ + suit_storage: partition@f4000 { + reg = <0xf4000 DT_SIZE_K(48)>; }; }; }; diff --git a/tests/subsys/suit/copy/boards/nrf52840dk_nrf52840.overlay b/tests/subsys/suit/copy/boards/nrf52840dk_nrf52840.overlay index ba570a2d4ae9..d210e73eed03 100644 --- a/tests/subsys/suit/copy/boards/nrf52840dk_nrf52840.overlay +++ b/tests/subsys/suit/copy/boards/nrf52840dk_nrf52840.overlay @@ -10,9 +10,14 @@ #address-cells = <1>; #size-cells = <1>; - /* Use the last 8KB of NVM as dfu_partition. */ - dfu_partition: partition@fe000 { - reg = <0xfe000 DT_SIZE_K(8)>; + /* Use 8KB of NVM as dfu_partition. */ + dfu_partition: partition@f0000 { + reg = <0xf0000 DT_SIZE_K(8)>; + }; + + /* Use the last 48KB of NVM as suit storage. */ + suit_storage: partition@f4000 { + reg = <0xf4000 DT_SIZE_K(48)>; }; }; }; diff --git a/tests/subsys/suit/copy/prj.conf b/tests/subsys/suit/copy/prj.conf index b70813f2efbb..96c394a2708e 100644 --- a/tests/subsys/suit/copy/prj.conf +++ b/tests/subsys/suit/copy/prj.conf @@ -19,6 +19,13 @@ CONFIG_SUIT_STREAM_SINK_MEMPTR=y CONFIG_SUIT_UTILS=y CONFIG_SUIT_MEMPTR_STORAGE=y +CONFIG_SUIT_MANIFEST_VARIABLES=y +CONFIG_SUIT_AUTHENTICATE=y +CONFIG_SUIT_CRYPTO=y +CONFIG_SUIT_PLAT_CHECK_COMPONENT_COMPATIBILITY=y +CONFIG_SUIT_MCI=y +CONFIG_SUIT_EXECUTION_MODE=y +CONFIG_SUIT_STORAGE=y CONFIG_ZCBOR=y CONFIG_ZCBOR_CANONICAL=y diff --git a/tests/subsys/suit/copy/src/main.c b/tests/subsys/suit/copy/src/main.c index 57bde308da59..c5dda79b6a08 100644 --- a/tests/subsys/suit/copy/src/main.c +++ b/tests/subsys/suit/copy/src/main.c @@ -14,11 +14,47 @@ #include #include #include +#include +#include -#define WRITE_ADDR 0x1A00080000 +#define WRITE_ADDR 0x1A00080000 +#define TEST_MFST_VAR_NVM_ID 1 +#define TEST_MFST_VAR_RAM_PLAT_ID 128 +#define TEST_MFST_VAR_RAM_MFST_ID 256 +#define TEST_MFST_VAR_INIT_VALUE 0x00 +#define TEST_MFST_VAR_NVM_VALUE 0xAB +#define TEST_MFST_VAR_RAM_VALUE 0xABAB static uint8_t test_data[] = {0, 1, 2, 3, 4, 5, 6, 7}; +/* clang-format off */ +static const uint8_t valid_manifest_component[] = { + 0x82, /* array: 2 elements */ + 0x4c, /* byte string: 12 bytes */ + 0x6b, /* string: 11 characters */ + 'I', 'N', 'S', 'T', 'L', 'D', '_', 'M', 'F', 'S', 'T', + 0x50, /* byte string: 16 bytes */ + /* RFC4122 uuid5(nordic_vid, 'test_sample_root') */ + 0x97, 0x05, 0x48, 0x23, 0x4c, 0x3d, 0x59, 0xa1, + 0x89, 0x86, 0xa5, 0x46, 0x60, 0xa1, 0x4b, 0x0a, + +}; +/* clang-format on */ + +static struct zcbor_string valid_manifest_component_id = { + .value = valid_manifest_component, + .len = sizeof(valid_manifest_component), +}; + +static void *test_suite_setup(void) +{ + suit_plat_err_t plat_ret = suit_storage_init(); + + zassert_ok(plat_ret, "Failed to initialize SUIT storage"); + + return NULL; +} + static void test_before(void *data) { /* Reset mocks */ @@ -28,12 +64,7 @@ static void test_before(void *data) FFF_RESET_HISTORY(); } -static struct zcbor_string valid_manifest_component_id = { - .value = (const uint8_t *)0x1234, - .len = 123, -}; - -ZTEST_SUITE(copy_tests, NULL, NULL, test_before, NULL, NULL); +ZTEST_SUITE(copy_tests, NULL, test_suite_setup, test_before, NULL, NULL); ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_OK) { @@ -281,3 +312,344 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_memptr_e ret = suit_plat_release_component_handle(src_handle); zassert_equal(ret, SUIT_SUCCESS, "src_handle release failed - error %i", ret); } + +ZTEST(copy_tests, test_mfst_plat_ram_var_to_nvm_var_OK) +{ + suit_component_t src_handle; + /* [h'MFST_VAR', 128] */ + uint8_t src_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x42, 0x18, 0x80}; + struct zcbor_string src_component_id = { + .value = src_component, + .len = sizeof(src_component), + }; + suit_component_t dst_handle; + /* [h'MFST_VAR', 1] */ + uint8_t dst_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x41, 0x01}; + struct zcbor_string dst_component_id = { + .value = dst_component, + .len = sizeof(dst_component), + }; + uint32_t value = TEST_MFST_VAR_NVM_VALUE; + suit_plat_err_t plat_ret; + int ret; + + /* GIVEN that MFST_VAR/128 value is initialized with value greater than zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_RAM_PLAT_ID, value), SUIT_PLAT_SUCCESS, + "Unable to set MFST_VAR/128 value before the test"); + + /* ... and the component handle for the MFST_VAR/128 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&src_component_id, false, &src_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/128 component"); + + /* ... and MFST_VAR/1 value is initialized with zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_NVM_ID, TEST_MFST_VAR_INIT_VALUE), + SUIT_PLAT_SUCCESS, "Unable to set MFST_VAR/1 value before the test"); + + /* ... and the component handle for the MFST_VAR/1 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&dst_component_id, false, &dst_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/1 component"); + + /* WHEN copy API is called without encryption info */ + ret = suit_plat_copy(dst_handle, src_handle, &valid_manifest_component_id, NULL); + zassert_equal(ret, SUIT_SUCCESS, + "Copying platform volatile to nonvolatile manifest variable failed: %d", ret); + + /* THEN the value is updated ... */ + plat_ret = suit_mfst_var_get(TEST_MFST_VAR_NVM_ID, &value); + zassert_equal(plat_ret, SUIT_PLAT_SUCCESS, + "Unable to get MFST_VAR/1 value after the update"); + zassert_equal(value, TEST_MFST_VAR_NVM_VALUE, "MFST_VAR/1 value not updated (%d != %d)", + value, TEST_MFST_VAR_NVM_VALUE); + + /* ... and the components can be safely released */ + ret = suit_plat_release_component_handle(src_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release source component handle after the test: %d", ret); + ret = suit_plat_release_component_handle(dst_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release destination component handle after the test: %d", ret); +} + +ZTEST(copy_tests, test_mfst_nvm_var_to_plat_ram_NOK_access) +{ + suit_component_t src_handle; + /* [h'MFST_VAR', 1] */ + uint8_t src_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x41, 0x01}; + struct zcbor_string src_component_id = { + .value = src_component, + .len = sizeof(src_component), + }; + suit_component_t dst_handle; + /* [h'MFST_VAR', 128] */ + uint8_t dst_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x42, 0x18, 0x80}; + struct zcbor_string dst_component_id = { + .value = dst_component, + .len = sizeof(dst_component), + }; + uint32_t value = TEST_MFST_VAR_NVM_VALUE; + suit_plat_err_t plat_ret; + int ret; + + /* GIVEN that MFST_VAR/1 value is initialized with value greater than zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_NVM_ID, value), SUIT_PLAT_SUCCESS, + "Unable to set MFST_VAR/1 value before the test"); + + /* ... and the component handle for the MFST_VAR/128 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&src_component_id, false, &src_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/1 component"); + + /* ... and MFST_VAR/128 value is initialized with zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_RAM_PLAT_ID, TEST_MFST_VAR_INIT_VALUE), + SUIT_PLAT_SUCCESS, "Unable to set MFST_VAR/128 value before the test"); + + /* ... and the component handle for the MFST_VAR/1 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&dst_component_id, false, &dst_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/128 component"); + + /* WHEN copy API is called without encryption info */ + ret = suit_plat_copy(dst_handle, src_handle, &valid_manifest_component_id, NULL); + zassert_equal(ret, SUIT_ERR_UNAUTHORIZED_COMPONENT, + "Writing any value to the MFST_VAR component: %d must fail", + TEST_MFST_VAR_RAM_PLAT_ID); + + /* THEN the value is not updated ... */ + plat_ret = suit_mfst_var_get(TEST_MFST_VAR_RAM_PLAT_ID, &value); + zassert_equal(plat_ret, SUIT_PLAT_SUCCESS, + "Unable to get MFST_VAR/128 value after the update"); + zassert_equal(value, TEST_MFST_VAR_INIT_VALUE, "MFST_VAR/128 value updated (%d != %d)", + value, TEST_MFST_VAR_INIT_VALUE); + + /* ... and the components can be safely released */ + ret = suit_plat_release_component_handle(src_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release source component handle after the test: %d", ret); + ret = suit_plat_release_component_handle(dst_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release destination component handle after the test: %d", ret); +} + +ZTEST(copy_tests, test_mfst_nvm_var_to_mfst_ram_var_OK) +{ + suit_component_t src_handle; + /* [h'MFST_VAR', 1] */ + uint8_t src_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x41, 0x01}; + struct zcbor_string src_component_id = { + .value = src_component, + .len = sizeof(src_component), + }; + suit_component_t dst_handle; + /* [h'MFST_VAR', 256] */ + uint8_t dst_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', '_', + 'V', 'A', 'R', 0x43, 0x19, 0x01, 0x00}; + struct zcbor_string dst_component_id = { + .value = dst_component, + .len = sizeof(dst_component), + }; + uint32_t value = TEST_MFST_VAR_NVM_VALUE; + suit_plat_err_t plat_ret; + int ret; + + /* GIVEN that MFST_VAR/128 value is initialized with value greater than zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_NVM_ID, value), SUIT_PLAT_SUCCESS, + "Unable to set MFST_VAR/1 value before the test"); + + /* ... and the component handle for the MFST_VAR/128 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&src_component_id, false, &src_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/1 component"); + + /* ... and MFST_VAR/1 value is initialized with zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_RAM_MFST_ID, TEST_MFST_VAR_INIT_VALUE), + SUIT_PLAT_SUCCESS, "Unable to set MFST_VAR/256 value before the test"); + + /* ... and the component handle for the MFST_VAR/1 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&dst_component_id, false, &dst_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/256 component"); + + /* WHEN copy API is called without encryption info */ + ret = suit_plat_copy(dst_handle, src_handle, &valid_manifest_component_id, NULL); + zassert_equal(ret, SUIT_SUCCESS, + "Copying nonvolatile to manifest volatile variable failed: %d", ret); + + /* THEN the value is updated ... */ + plat_ret = suit_mfst_var_get(TEST_MFST_VAR_RAM_MFST_ID, &value); + zassert_equal(plat_ret, SUIT_PLAT_SUCCESS, + "Unable to get MFST_VAR/256 value after the update"); + zassert_equal(value, TEST_MFST_VAR_NVM_VALUE, "MFST_VAR/245 value not updated (%d != %d)", + value, TEST_MFST_VAR_NVM_VALUE); + + /* ... and the components can be safely released */ + ret = suit_plat_release_component_handle(src_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release source component handle after the test: %d", ret); + ret = suit_plat_release_component_handle(dst_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release destination component handle after the test: %d", ret); +} + +ZTEST(copy_tests, test_mfst_ram_var_to_nvm_var_NOK_too_large) +{ + suit_component_t src_handle; + /* [h'MFST_VAR', 128] */ + uint8_t src_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x42, 0x18, 0x80}; + struct zcbor_string src_component_id = { + .value = src_component, + .len = sizeof(src_component), + }; + suit_component_t dst_handle; + /* [h'MFST_VAR', 1] */ + uint8_t dst_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x41, 0x01}; + struct zcbor_string dst_component_id = { + .value = dst_component, + .len = sizeof(dst_component), + }; + uint32_t value = TEST_MFST_VAR_RAM_VALUE; + suit_plat_err_t plat_ret; + int ret; + + /* GIVEN that MFST_VAR/128 value is initialized with value greater than zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_RAM_PLAT_ID, value), SUIT_PLAT_SUCCESS, + "Unable to set MFST_VAR/128 value before the test"); + + /* ... and the component handle for the MFST_VAR/128 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&src_component_id, false, &src_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/128 component"); + + /* ... and MFST_VAR/1 value is initialized with zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_NVM_ID, TEST_MFST_VAR_INIT_VALUE), + SUIT_PLAT_SUCCESS, "Unable to set MFST_VAR/1 value before the test"); + + /* ... and the component handle for the MFST_VAR/1 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&dst_component_id, false, &dst_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/1 component"); + + /* WHEN copy API is called without encryption info */ + ret = suit_plat_copy(dst_handle, src_handle, &valid_manifest_component_id, NULL); + zassert_equal(ret, SUIT_ERR_UNSUPPORTED_PARAMETER, + "Copying platform volatile with large value to nonvolatile manifest variable " + "did not fail: %d", + ret); + + /* THEN the value is not updated ... */ + plat_ret = suit_mfst_var_get(TEST_MFST_VAR_NVM_ID, &value); + zassert_equal(plat_ret, SUIT_PLAT_SUCCESS, + "Unable to get MFST_VAR/1 value after the update"); + zassert_equal(value, TEST_MFST_VAR_INIT_VALUE, "MFST_VAR/1 value updated (%d != %d)", value, + TEST_MFST_VAR_INIT_VALUE); + + /* ... and the components can be safely released */ + ret = suit_plat_release_component_handle(src_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release source component handle after the test: %d", ret); + ret = suit_plat_release_component_handle(dst_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release destination component handle after the test: %d", ret); +} + +ZTEST(copy_tests, test_mram_to_mfst_nvm_var_NOK) +{ + suit_component_t src_handle; + /* [h'MEM', h'02', h'1A00080000', h'191000'] */ + uint8_t src_component[] = {0x84, 0x44, 0x63, 'M', 'E', 'M', 0x41, 0x02, 0x45, + 0x1A, 0x00, 0x08, 0x00, 0x00, 0x43, 0x19, 0x10, 0x00}; + struct zcbor_string src_component_id = { + .value = src_component, + .len = sizeof(src_component), + }; + suit_component_t dst_handle; + /* [h'MFST_VAR', 1] */ + uint8_t dst_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x41, 0x01}; + struct zcbor_string dst_component_id = { + .value = dst_component, + .len = sizeof(dst_component), + }; + uint32_t value = TEST_MFST_VAR_RAM_VALUE; + suit_plat_err_t plat_ret; + int ret; + + /* GIVEN MFST_VAR/1 value is initialized with zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_NVM_ID, TEST_MFST_VAR_INIT_VALUE), + SUIT_PLAT_SUCCESS, "Unable to set MFST_VAR/1 value before the test"); + + /* ... and the component handle for the MFST_VAR/1 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&dst_component_id, false, &dst_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/1 component"); + + /* ... and the component handle for the MEM is successfully created */ + zassert_equal(suit_plat_create_component_handle(&src_component_id, false, &src_handle), + SUIT_SUCCESS, "Unable to create MEM component"); + + /* WHEN copy API is called without encryption info */ + ret = suit_plat_copy(dst_handle, src_handle, &valid_manifest_component_id, NULL); + zassert_equal(ret, SUIT_ERR_UNSUPPORTED_PARAMETER, + "Copying MEM value to nonvolatile manifest variable did not fail: %d", ret); + + /* THEN the value is not updated ... */ + plat_ret = suit_mfst_var_get(TEST_MFST_VAR_NVM_ID, &value); + zassert_equal(plat_ret, SUIT_PLAT_SUCCESS, + "Unable to get MFST_VAR/1 value after the update"); + zassert_equal(value, TEST_MFST_VAR_INIT_VALUE, "MFST_VAR/1 value updated (%d != %d)", value, + TEST_MFST_VAR_INIT_VALUE); + + /* ... and the components can be safely released */ + ret = suit_plat_release_component_handle(src_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release source component handle after the test: %d", ret); + ret = suit_plat_release_component_handle(dst_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release destination component handle after the test: %d", ret); +} + +ZTEST(copy_tests, test_mfst_nvm_var_to_mram_NOK) +{ + suit_component_t src_handle; + /* [h'MFST_VAR', 1] */ + uint8_t src_component[] = {0x82, 0x49, 0x68, 'M', 'F', 'S', 'T', + '_', 'V', 'A', 'R', 0x41, 0x01}; + struct zcbor_string src_component_id = { + .value = src_component, + .len = sizeof(src_component), + }; + suit_component_t dst_handle; + /* [h'MEM', h'02', h'1A00080000', h'191000'] */ + uint8_t dst_component[] = {0x84, 0x44, 0x63, 'M', 'E', 'M', 0x41, 0x02, 0x45, + 0x1A, 0x00, 0x08, 0x00, 0x00, 0x43, 0x19, 0x10, 0x00}; + struct zcbor_string dst_component_id = { + .value = dst_component, + .len = sizeof(dst_component), + }; + int ret; + + /* GIVEN MFST_VAR/1 value is initialized with zero... */ + zassert_equal(suit_mfst_var_set(TEST_MFST_VAR_NVM_ID, TEST_MFST_VAR_NVM_VALUE), + SUIT_PLAT_SUCCESS, "Unable to set MFST_VAR/1 value before the test"); + + /* ... and the component handle for the MFST_VAR/1 is successfully created */ + zassert_equal(suit_plat_create_component_handle(&src_component_id, false, &src_handle), + SUIT_SUCCESS, "Unable to create MFST_VAR/1 component"); + + /* ... and the component handle for the MEM is successfully created */ + zassert_equal(suit_plat_create_component_handle(&dst_component_id, false, &dst_handle), + SUIT_SUCCESS, "Unable to create MEM component"); + + /* WHEN copy API is called without encryption info */ + ret = suit_plat_copy(dst_handle, src_handle, &valid_manifest_component_id, NULL); + zassert_equal(ret, SUIT_ERR_UNSUPPORTED_COMPONENT_ID, + "Copying nonvolatile manifest variable content to MEM did not fail: %d", ret); + + /* THEN the MEM value is not updated ... */ + /* ... and the components can be safely released */ + ret = suit_plat_release_component_handle(src_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release source component handle after the test: %d", ret); + ret = suit_plat_release_component_handle(dst_handle); + zassert_equal(ret, SUIT_SUCCESS, + "Failed to release destination component handle after the test: %d", ret); +}