From 978d57d61e5f6350f6f5e455557747c0a6cfb532 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Wed, 26 Aug 2020 15:42:34 +0200 Subject: [PATCH] tests: psa: Fix storage purge in se_driver_hal tests (1) Remove systematic deletion of key file associated to key identifier 0 as this file is not created under the hood anymore by the library. Signed-off-by: Ronald Cron --- tests/suites/test_suite_psa_crypto_se_driver_hal.function | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto_se_driver_hal.function b/tests/suites/test_suite_psa_crypto_se_driver_hal.function index 6f7cfa946d..fc2eb48065 100644 --- a/tests/suites/test_suite_psa_crypto_se_driver_hal.function +++ b/tests/suites/test_suite_psa_crypto_se_driver_hal.function @@ -765,10 +765,10 @@ static void psa_purge_storage( void ) psa_key_location_t location; /* The tests may have potentially created key ids from 1 to - * MAX_KEY_ID_FOR_TEST. In addition, run the destroy function on key id - * 0, which file-based storage uses as a temporary file. */ - for( id = 0; id <= MAX_KEY_ID_FOR_TEST; id++ ) + * MAX_KEY_ID_FOR_TEST. */ + for( id = 1; id <= MAX_KEY_ID_FOR_TEST; id++ ) psa_destroy_persistent_key( mbedtls_svc_key_id_make( 1, id ) ); + /* Purge the transaction file. */ psa_crypto_stop_transaction( ); /* Purge driver persistent data. */