diff --git a/ChangeLog.d/PSA-test-suites-NOT-using-UID-0.txt b/ChangeLog.d/PSA-test-suites-NOT-using-UID-0.txt new file mode 100644 index 000000000..9acbb0ad3 --- /dev/null +++ b/ChangeLog.d/PSA-test-suites-NOT-using-UID-0.txt @@ -0,0 +1,3 @@ +Bugfix + * Fix unit tests that used 0 as the file UID. This failed on some + implementations of PSA ITS. Fixes #3838. diff --git a/tests/suites/test_suite_psa_its.function b/tests/suites/test_suite_psa_its.function index fb9ce0703..e16c05010 100644 --- a/tests/suites/test_suite_psa_its.function +++ b/tests/suites/test_suite_psa_its.function @@ -285,3 +285,16 @@ exit: cleanup( ); } /* END_CASE */ + +/* BEGIN_CASE */ +void set_fail( int uid_arg, data_t *data, + int expected_status ) +{ + psa_storage_uid_t uid = uid_arg; + TEST_ASSERT( psa_its_set_wrap( uid, data->len, data->x, 0 ) == + (psa_status_t) expected_status ); + + exit: + cleanup( ); +} +/* END_CASE */