1 /*
2 * Copyright (c) 2017-2022, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8 #include "test_framework_integ_test.h"
9 #include "test_framework_integ_test_helper.h"
10 #include "test_framework.h"
11
12 /* Service specific includes */
13 #ifdef TEST_S_PS
14 #include "ps_tests.h"
15 #endif
16 #ifdef TEST_S_ITS
17 #include "its_s_tests.h"
18 #endif
19 #ifdef TEST_S_ATTESTATION
20 #include "attest_s_tests.h"
21 #endif
22 #ifdef TEST_S_CRYPTO
23 #include "crypto_s_tests.h"
24 #endif
25 #ifdef TEST_S_FWU
26 #include "fwu_s_tests.h"
27 #endif
28 #ifdef TEST_S_PLATFORM
29 #include "platform_s_tests.h"
30 #endif
31 #ifdef TEST_S_IPC
32 #include "ipc_s_tests.h"
33 #endif
34 #ifdef TEST_S_SFN_BACKEND
35 #include "sfn_s_tests.h"
36 #endif
37 #if defined (TEST_S_FPU)
38 #include "fpu_s_tests.h"
39 #endif
40 #ifdef EXTRA_S_TEST_SUITE
41 #include "extra_s_tests.h"
42 #endif
43
44 static struct test_suite_t test_suites[] = {
45 #ifdef TEST_S_IPC
46 /* Secure IPC test cases */
47 {®ister_testsuite_s_ipc_interface, 0, 0, 0},
48 #endif
49
50 #ifdef TEST_S_SFN_BACKEND
51 /* Secure SFN backend test cases */
52 {®ister_testsuite_s_sfn_interface, 0, 0, 0},
53 #endif
54
55 #ifdef TEST_S_PS
56 {®ister_testsuite_s_psa_ps_interface, 0, 0, 0},
57 {®ister_testsuite_s_psa_ps_reliability, 0, 0, 0},
58
59 #ifdef PS_TEST_NV_COUNTERS
60 {®ister_testsuite_s_rollback_protection, 0, 0, 0},
61 #endif
62 #endif
63
64 #ifdef TEST_S_ITS
65 /* Secure ITS test cases */
66 {®ister_testsuite_s_psa_its_interface, 0, 0, 0},
67 {®ister_testsuite_s_psa_its_reliability, 0, 0, 0},
68 #endif
69
70 #ifdef TEST_S_CRYPTO
71 /* Crypto test cases */
72 {®ister_testsuite_s_crypto_interface, 0, 0, 0},
73 #endif
74
75 #ifdef TEST_S_ATTESTATION
76 /* Secure initial attestation service test cases */
77 {®ister_testsuite_s_attestation_interface, 0, 0, 0},
78 #endif
79
80 #ifdef TEST_S_PLATFORM
81 /* Secure platform service test cases */
82 {®ister_testsuite_s_platform_interface, 0, 0, 0},
83 #endif
84
85 #ifdef TEST_S_FWU
86 /* Secure Firmware Update test cases */
87 {®ister_testsuite_s_psa_fwu_interface, 0, 0, 0},
88 #endif
89
90 #ifdef TEST_S_FPU
91 /* Secure FPU test cases */
92 {®ister_testsuite_s_fpu_interface, 0, 0, 0},
93 #endif
94
95 #ifdef EXTRA_S_TEST_SUITE
96 /* Secure extra test cases */
97 {®ister_testsuite_extra_s_interface, 0, 0, 0},
98 #endif
99
100 /* End of test suites */
101 {0, 0, 0, 0}
102 };
103
setup_integ_test(void)104 static void setup_integ_test(void)
105 {
106 /* Left empty intentionally, currently implemented
107 * test suites require no setup
108 */
109 }
110
tear_down_integ_test(void)111 static void tear_down_integ_test(void)
112 {
113 /* Left empty intentionally, currently implemented
114 * test suites require no tear down
115 */
116 }
117
start_integ_test(void)118 enum test_suite_err_t start_integ_test(void)
119 {
120 enum test_suite_err_t retval;
121
122 setup_integ_test();
123 retval = integ_test("Secure", test_suites);
124 tear_down_integ_test();
125 return retval;
126 }
127