TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
non_secure_suites.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
10 #include "test_framework.h"
11 
12 /* Service specific includes */
13 #ifdef ENABLE_PROTECTED_STORAGE_SERVICE_TESTS
14 #include "ps_ns_tests.h"
15 #endif
16 #ifdef ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS
17 #include "its_ns_tests.h"
18 #endif
19 #ifdef ENABLE_CRYPTO_SERVICE_TESTS
20 #include "crypto_ns_tests.h"
21 #endif
22 #ifdef ENABLE_ATTESTATION_SERVICE_TESTS
23 #include "attest_ns_tests.h"
24 #endif
25 #ifdef ENABLE_QCBOR_TESTS
26 #include "qcbor_ns_tests.h"
27 #endif
28 #ifdef ENABLE_T_COSE_TESTS
29 #include "t_cose_ns_tests.h"
30 #endif
31 #ifdef ENABLE_PLATFORM_SERVICE_TESTS
32 #include "platform_ns_tests.h"
33 #endif
34 #if defined(CORE_TEST_POSITIVE) || defined (CORE_TEST_INTERACTIVE)
35 #include "core_ns_tests.h"
36 #endif
37 #ifdef ENABLE_IPC_TEST
38 #include "ipc_ns_tests.h"
39 #else
40 #ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS
41 #include "audit_ns_tests.h"
42 #endif
43 #endif /* TFM_PSA_API */
44 #ifdef TFM_MULTI_CORE_TOPOLOGY
45 #include "multi_core_ns_test.h"
46 #endif /* TFM_MULTI_CORE_TOPOLOGY */
47 
48 static struct test_suite_t test_suites[] = {
49  /* List test cases which are compliant with level 1 isolation */
50 
51 #ifdef ENABLE_PROTECTED_STORAGE_SERVICE_TESTS
53 #endif
54 
55 #ifdef ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS
56  /* Non-secure ITS test cases */
58 #endif
59 
60 #ifdef ENABLE_CRYPTO_SERVICE_TESTS
61  /* Non-secure Crypto test cases */
63 #endif
64 
65 #ifdef ENABLE_PLATFORM_SERVICE_TESTS
66  /* Non-secure platform service test cases */
68 #endif
69 
70 #ifdef ENABLE_ATTESTATION_SERVICE_TESTS
71  /* Non-secure initial attestation service test cases */
73 #endif
74 
75 #ifdef ENABLE_QCBOR_TESTS
76  /* Non-secure QCBOR library test cases */
77  {&register_testsuite_ns_qcbor, 0, 0, 0},
78 #endif
79 
80 #ifdef ENABLE_T_COSE_TESTS
81  /* Non-secure T_COSE library test cases */
82  {&register_testsuite_ns_t_cose, 0, 0, 0},
83 #endif
84 
85 #ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS
86  /* Non-secure Audit Logging test cases */
88 #endif
89 
90 #ifdef CORE_TEST_POSITIVE
91  /* Non-secure core test cases */
93 #endif
94 
95 #ifdef CORE_TEST_INTERACTIVE
96  /* Non-secure interactive test cases */
98 #endif
99 
100 #ifdef ENABLE_IPC_TEST
101  /* Non-secure IPC test cases */
103 #endif
104 
105 #ifdef TFM_MULTI_CORE_TOPOLOGY
106  /* Multi-core topology test cases */
108 #endif
109 
110  /* End of test suites */
111  {0, 0, 0, 0}
112 };
113 
115 {
116  return integ_test("Non-secure", test_suites);
117 }
118 
119 /* Service stand-in for NS tests. To be called from a non-secure context */
121 {
122  return start_integ_test();
123 }
void register_testsuite_ns_core_positive(struct test_suite_t *p_test_suite)
Register testsuite for the core positive tests.
enum test_suite_err_t integ_test(const char *suite_type, struct test_suite_t test_suites[])
Executes integration test suites provided in the parameters.
void register_testsuite_ns_psa_ps_interface(struct test_suite_t *p_test_suite)
Register testsuite for the PSA protected storage NS interface tests.
void register_testsuite_ns_qcbor(struct test_suite_t *p_test_suite)
Register test suite for the QCBOR library.
void register_testsuite_ns_crypto_interface(struct test_suite_t *p_test_suite)
Register testsuite for Crypto non-secure interface.
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 register_testsuite_ns_audit_interface(struct test_suite_t *p_test_suite)
Register testsuite for audit logging non-secure interface.
void register_testsuite_ns_attestation_interface(struct test_suite_t *p_test_suite)
Register testsuite for the initial attestation service.
void register_testsuite_multi_core_ns_interface(struct test_suite_t *p_test_suite)
Register testsuite for multi-core topology.
void register_testsuite_ns_core_interactive(struct test_suite_t *p_test_suite)
Register testsuite for the core interactive tests.
void register_testsuite_ns_ipc_interface(struct test_suite_t *p_test_suite)
Register testsuite for ipc non-secure interface.
enum test_suite_err_t tfm_non_secure_client_run_tests(void)
Service stand-in shim for non secure tests. To be called from a non-secure client.
enum test_suite_err_t start_integ_test(void)
Executes integration tests. To be called from appropriate secure/non-secure service client...
void register_testsuite_ns_platform_interface(struct test_suite_t *p_test_suite)
Register testsuite for the platform service.
test_suite_err_t
void register_testsuite_ns_t_cose(struct test_suite_t *p_test_suite)
Register test suite for the t_cose library.