TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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_tests.h"
15 #endif
16 #ifdef ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS
17 #include "its_s_tests.h"
18 #endif
19 #ifdef ENABLE_ATTESTATION_SERVICE_TESTS
20 #include "attest_s_tests.h"
21 #endif
22 #ifdef ENABLE_CRYPTO_SERVICE_TESTS
23 #include "crypto_s_tests.h"
24 #endif
25 #ifdef ENABLE_PLATFORM_SERVICE_TESTS
26 #include "platform_s_tests.h"
27 #endif
28 #ifdef ENABLE_IPC_TEST
29 #include "ipc_s_tests.h"
30 #else
31 #ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS
32 #include "audit_s_tests.h"
33 #endif
34 #endif /* TFM_PSA_API */
35 
36 static struct test_suite_t test_suites[] = {
37 
38 #ifdef ENABLE_PROTECTED_STORAGE_SERVICE_TESTS
41 
42 #ifdef PS_TEST_NV_COUNTERS
44 #endif
45 #endif
46 
47 #ifdef ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS
48  /* Secure ITS test cases */
51 #endif
52 
53 #ifdef ENABLE_CRYPTO_SERVICE_TESTS
54  /* Crypto test cases */
56 #endif
57 
58 #ifdef ENABLE_ATTESTATION_SERVICE_TESTS
59  /* Secure initial attestation service test cases */
61 #endif
62 
63 #ifdef ENABLE_PLATFORM_SERVICE_TESTS
64  /* Secure platform service test cases */
66 #endif
67 
68 #ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS
69  /* Secure Audit Logging test cases */
71 #endif
72 
73 #ifdef ENABLE_IPC_TEST
74  /* Secure IPC test cases */
76 #endif
77  /* End of test suites */
78  {0, 0, 0, 0}
79 };
80 
81 static void setup_integ_test(void)
82 {
83  /* Left empty intentionally, currently implemented
84  * test suites require no setup
85  */
86 }
87 
88 static void tear_down_integ_test(void)
89 {
90  /* Left empty intentionally, currently implemented
91  * test suites require no tear down
92  */
93 }
94 
96 {
97  enum test_suite_err_t retval;
98 
99  setup_integ_test();
100  retval = integ_test("Secure", test_suites);
101  tear_down_integ_test();
102  return retval;
103 }
void register_testsuite_s_psa_ps_interface(struct test_suite_t *p_test_suite)
Register testsuite for the PSA protected storage S interface tests.
void register_testsuite_s_crypto_interface(struct test_suite_t *p_test_suite)
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.
enum test_suite_err_t start_integ_test(void)
Executes integration tests. To be called from appropriate secure/non-secure service client...
Definition: secure_suites.c:95
void register_testsuite_s_ipc_interface(struct test_suite_t *p_test_suite)
Register testsuite for ipc secure interface.
void register_testsuite_s_platform_interface(struct test_suite_t *p_test_suite)
Register testsuite for the platform service.
void register_testsuite_s_psa_its_interface(struct test_suite_t *p_test_suite)
Register testsuite for the PSA internal trusted storage S interface tests.
void register_testsuite_s_rollback_protection(struct test_suite_t *p_test_suite)
Register testsuite for the ps rollback protection tests.
void register_testsuite_s_attestation_interface(struct test_suite_t *p_test_suite)
Register testsuite for the initial attestation service.
void register_testsuite_s_audit_interface(struct test_suite_t *p_test_suite)
Register testsuite for audit logging secure interface.
void register_testsuite_s_psa_its_reliability(struct test_suite_t *p_test_suite)
Register testsuite for the ITS reliability tests.
void register_testsuite_s_psa_ps_reliability(struct test_suite_t *p_test_suite)
Register testsuite for the ps reliability tests.
test_suite_err_t