Marc Moreno Berengue | ffd3c46 | 2017-11-29 16:09:52 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2017, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "s_test_helpers.h" |
| 9 | |
| 10 | #include <stdio.h> |
| 11 | #include <string.h> |
| 12 | |
| 13 | #include "test/framework/test_framework.h" |
| 14 | #include "secure_fw/services/secure_storage/sst_core_interface.h" |
| 15 | |
| 16 | uint32_t prepare_test_ctx(struct test_result_t *ret) |
| 17 | { |
| 18 | /* Wipes secure storage area */ |
| 19 | sst_object_wipe_all(); |
| 20 | |
| 21 | /* Prepares secure storage area before write */ |
| 22 | if (sst_object_prepare() != TFM_SST_ERR_SUCCESS) { |
| 23 | TEST_FAIL("Wiped system should be preparable"); |
| 24 | return 1; |
| 25 | } |
| 26 | |
| 27 | return 0; |
| 28 | } |