@@ -28,6 +28,11 @@ static void test_before(void *data)
2828 FFF_RESET_HISTORY ();
2929}
3030
31+ static struct zcbor_string valid_manifest_component_id = {
32+ .value = (const uint8_t * )0x1234 ,
33+ .len = 123 ,
34+ };
35+
3136ZTEST_SUITE (copy_tests , NULL , NULL , test_before , NULL , NULL );
3237
3338ZTEST (copy_tests , test_integrated_fetch_to_memptr_and_copy_to_msink_OK )
@@ -49,7 +54,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_OK)
4954
5055 zassert_equal (ret , SUIT_SUCCESS , "create_component_handle failed - error %i" , ret );
5156
52- ret = suit_plat_fetch_integrated (src_handle , & source , NULL );
57+ ret = suit_plat_fetch_integrated (src_handle , & source , & valid_manifest_component_id , NULL );
5358 zassert_equal (ret , SUIT_SUCCESS , "suit_plat_fetch failed - error %i" , ret );
5459
5560 ret = suit_plat_component_impl_data_get (src_handle , & handle );
@@ -89,7 +94,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_OK)
8994 ret = suit_plat_ipuc_write (dst_handle , 0 , (uintptr_t )test_data , sizeof (test_data ), true);
9095 zassert_equal (ret , SUIT_PLAT_SUCCESS , "cannot write to in-place updateable component" );
9196
92- ret = suit_plat_copy (dst_handle , src_handle , NULL );
97+ ret = suit_plat_copy (dst_handle , src_handle , & valid_manifest_component_id , NULL );
9398 zassert_equal (ret , SUIT_SUCCESS , "suit_plat_copy failed - error %i" , ret );
9499
95100 ret = suit_plat_ipuc_write (dst_handle , 0 , (uintptr_t )test_data , sizeof (test_data ), true);
@@ -126,7 +131,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_dst_hand
126131
127132 zassert_equal (ret , SUIT_SUCCESS , "create_component_handle failed - error %i" , ret );
128133
129- ret = suit_plat_fetch_integrated (src_handle , & source , NULL );
134+ ret = suit_plat_fetch_integrated (src_handle , & source , & valid_manifest_component_id , NULL );
130135 zassert_equal (ret , SUIT_SUCCESS , "suit_plat_fetch failed - error %i" , ret );
131136
132137 ret = suit_plat_component_impl_data_get (src_handle , & handle );
@@ -160,7 +165,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_dst_hand
160165 ret = suit_plat_release_component_handle (dst_handle );
161166 zassert_equal (ret , SUIT_SUCCESS , "dst_handle release failed - error %i" , ret );
162167
163- ret = suit_plat_copy (dst_handle , src_handle , NULL );
168+ ret = suit_plat_copy (dst_handle , src_handle , & valid_manifest_component_id , NULL );
164169 zassert_not_equal (ret , SUIT_SUCCESS ,
165170 "suit_plat_copy should have failed - dst_handle released" );
166171
@@ -191,7 +196,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_src_hand
191196
192197 zassert_equal (ret , SUIT_SUCCESS , "create_component_handle failed - error %i" , ret );
193198
194- ret = suit_plat_fetch_integrated (src_handle , & source , NULL );
199+ ret = suit_plat_fetch_integrated (src_handle , & source , & valid_manifest_component_id , NULL );
195200 zassert_equal (ret , SUIT_SUCCESS , "suit_plat_fetch failed - error %i" , ret );
196201
197202 ret = suit_plat_component_impl_data_get (src_handle , & handle );
@@ -225,7 +230,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_src_hand
225230 ret = suit_plat_release_component_handle (src_handle );
226231 zassert_equal (ret , SUIT_SUCCESS , "src_handle release failed - error %i" , ret );
227232
228- ret = suit_plat_copy (dst_handle , src_handle , NULL );
233+ ret = suit_plat_copy (dst_handle , src_handle , & valid_manifest_component_id , NULL );
229234 zassert_not_equal (ret , SUIT_SUCCESS ,
230235 "suit_plat_copy should have failed - src_handle released" );
231236
@@ -267,7 +272,7 @@ ZTEST(copy_tests, test_integrated_fetch_to_memptr_and_copy_to_msink_NOK_memptr_e
267272 ret = suit_plat_create_component_handle (& valid_dst_component_id , false, & dst_handle );
268273 zassert_equal (ret , SUIT_SUCCESS , "create_component_handle failed - error %i" , ret );
269274
270- ret = suit_plat_copy (dst_handle , src_handle , NULL );
275+ ret = suit_plat_copy (dst_handle , src_handle , & valid_manifest_component_id , NULL );
271276 zassert_not_equal (ret , SUIT_SUCCESS , "suit_plat_copy should have failed - memptr empty" );
272277
273278 ret = suit_plat_release_component_handle (dst_handle );
0 commit comments