TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
psa_its_ns_interface_testsuite.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #include "its_ns_tests.h"
10 #include "../its_tests_common.h"
11 
12 static struct test_t psa_its_ns_tests[] = {
13  {&tfm_its_test_common_001, "TFM_ITS_TEST_1001",
14  "Set interface"},
15  {&tfm_its_test_common_002, "TFM_ITS_TEST_1002",
16  "Set interface with create flags"},
17  {&tfm_its_test_common_003, "TFM_ITS_TEST_1003",
18  "Set interface with NULL data pointer"},
19  {&tfm_its_test_common_004, "TFM_ITS_TEST_1004",
20  "Set interface with write once UID"},
21  {&tfm_its_test_common_005, "TFM_ITS_TEST_1005",
22  "Get interface with valid data"},
23  {&tfm_its_test_common_006, "TFM_ITS_TEST_1006",
24  "Get interface with zero data length"},
25  {&tfm_its_test_common_007, "TFM_ITS_TEST_1007",
26  "Get interface with invalid UIDs"},
27  {&tfm_its_test_common_008, "TFM_ITS_TEST_1008",
28  "Get interface with invalid data lengths and offsets"},
29  {&tfm_its_test_common_009, "TFM_ITS_TEST_1009",
30  "Get interface with NULL data pointer"},
31  {&tfm_its_test_common_010, "TFM_ITS_TEST_1010",
32  "Get info interface with write once UID"},
33  {&tfm_its_test_common_011, "TFM_ITS_TEST_1011",
34  "Get info interface with valid UID"},
35  {&tfm_its_test_common_012, "TFM_ITS_TEST_1012",
36  "Get info interface with invalid UIDs"},
37  {&tfm_its_test_common_013, "TFM_ITS_TEST_1013",
38  "Remove interface with valid UID"},
39  {&tfm_its_test_common_014, "TFM_ITS_TEST_1014",
40  "Remove interface with write once UID"},
41  {&tfm_its_test_common_015, "TFM_ITS_TEST_1015",
42  "Remove interface with invalid UID"},
43  {&tfm_its_test_common_016, "TFM_ITS_TEST_1016",
44  "Block compaction after remove"},
45  {&tfm_its_test_common_017, "TFM_ITS_TEST_1017",
46  "Multiple partial gets"},
47  {&tfm_its_test_common_018, "TFM_ITS_TEST_1018",
48  "Multiple sets to same UID from same thread"},
49  {&tfm_its_test_common_019, "TFM_ITS_TEST_1019",
50  "Set, get and remove interface with different asset sizes"},
51 };
52 
54 {
55  uint32_t list_size;
56 
57  list_size = (sizeof(psa_its_ns_tests) / sizeof(psa_its_ns_tests[0]));
58 
59  set_testsuite("PSA internal trusted storage NS interface tests "
60  "(TFM_ITS_TEST_1XXX)",
61  psa_its_ns_tests, list_size, p_test_suite);
62 }
void tfm_its_test_common_019(struct test_result_t *ret)
Tests set, get_info, get and remove function with:
void tfm_its_test_common_016(struct test_result_t *ret)
Tests data block compact feature. Set UID 1 to locate it at the beginning of the block. Then set UID 2 to be located after UID 1 and remove UID 1. UID 2 will be compacted to the beginning of the block. This test verifies that the compaction works correctly by reading back UID 2.
void tfm_its_test_common_007(struct test_result_t *ret)
Tests get function with:
void tfm_its_test_common_012(struct test_result_t *ret)
Tests get info function with:
void tfm_its_test_common_010(struct test_result_t *ret)
Tests get info function with:
enum test_suite_err_t set_testsuite(const char *name, struct test_t *test_list, uint32_t size, struct test_suite_t *p_ts)
Sets test suite parameters.
void tfm_its_test_common_002(struct test_result_t *ret)
Tests set function with:
void tfm_its_test_common_017(struct test_result_t *ret)
Tests set and multiple partial gets.
void tfm_its_test_common_011(struct test_result_t *ret)
Tests get info function with:
void tfm_its_test_common_008(struct test_result_t *ret)
Tests get function with:
void tfm_its_test_common_005(struct test_result_t *ret)
Tests get function with:
void tfm_its_test_common_004(struct test_result_t *ret)
Tests set function with:
void tfm_its_test_common_001(struct test_result_t *ret)
Tests set function with:
void register_testsuite_ns_psa_its_interface(struct test_suite_t *p_test_suite)
Register testsuite for the PSA internal trusted storage NS interface tests.
void tfm_its_test_common_015(struct test_result_t *ret)
Tests remove function with:
void tfm_its_test_common_003(struct test_result_t *ret)
Tests set function with:
void tfm_its_test_common_013(struct test_result_t *ret)
Tests remove function with:
void tfm_its_test_common_018(struct test_result_t *ret)
Tests multiple sets to the same UID.
void tfm_its_test_common_009(struct test_result_t *ret)
Tests get function with:
void tfm_its_test_common_014(struct test_result_t *ret)
Tests remove function with:
void tfm_its_test_common_006(struct test_result_t *ret)
Tests get function with: