blob: 37655bb4b8679948fff5238a4287ec4947964416 [file] [log] [blame]
Kevin Peng62a87112020-07-07 15:07:46 +08001/*
2 * Copyright (c) 2017-2020, 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 */
Raef Coles652bb8a2020-09-24 11:27:38 +010013#ifdef TFM_PARTITION_PROTECTED_STORAGE
14#include "ps_ns_tests.h"
15#endif
16#ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
17#include "its_ns_tests.h"
18#endif
19#ifdef TFM_PARTITION_CRYPTO
20#include "crypto_ns_tests.h"
21#endif
22#ifdef TFM_PARTITION_INITIAL_ATTESTATION
23#include "attest_ns_tests.h"
24#include "qcbor_ns_tests.h"
25#ifndef SYMMETRIC_INITIAL_ATTESTATION
26#include "t_cose_ns_tests.h"
27#endif /* !SYMMETRIC_INITIAL_ATTESTATION */
28#endif
29#ifdef TFM_PARTITION_PLATFORM
30#include "platform_ns_tests.h"
31#endif
32#include "core_ns_tests.h"
33#ifdef TFM_PSA_API
34#include "ipc_ns_tests.h"
35#else
36#ifdef TFM_PARTITION_AUDIT_LOG
37#include "audit_ns_tests.h"
38#endif
39#endif /* TFM_PSA_API */
40#ifdef TFM_MULTI_CORE_TOPOLOGY
41#include "multi_core_ns_test.h"
42#endif /* TFM_MULTI_CORE_TOPOLOGY */
Kevin Peng62a87112020-07-07 15:07:46 +080043
44static struct test_suite_t test_suites[] = {
Kevin Peng62a87112020-07-07 15:07:46 +080045 /* List test cases which are compliant with level 1 isolation */
46
Raef Coles652bb8a2020-09-24 11:27:38 +010047#ifdef TFM_PARTITION_PROTECTED_STORAGE
Kevin Peng62a87112020-07-07 15:07:46 +080048 {&register_testsuite_ns_psa_ps_interface, 0, 0, 0},
49#endif
50
Raef Coles652bb8a2020-09-24 11:27:38 +010051#ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
Kevin Peng62a87112020-07-07 15:07:46 +080052 /* Non-secure ITS test cases */
53 {&register_testsuite_ns_psa_its_interface, 0, 0, 0},
54#endif
55
Raef Coles652bb8a2020-09-24 11:27:38 +010056#ifdef TFM_PARTITION_CRYPTO
Kevin Peng62a87112020-07-07 15:07:46 +080057 /* Non-secure Crypto test cases */
58 {&register_testsuite_ns_crypto_interface, 0, 0, 0},
59#endif
60
Raef Coles652bb8a2020-09-24 11:27:38 +010061#ifdef TFM_PARTITION_PLATFORM
Kevin Peng62a87112020-07-07 15:07:46 +080062 /* Non-secure platform service test cases */
63 {&register_testsuite_ns_platform_interface, 0, 0, 0},
64#endif
65
Raef Coles652bb8a2020-09-24 11:27:38 +010066#ifdef TFM_PARTITION_INITIAL_ATTESTATION
67 /* Non-secure initial attestation service test cases */
68 {&register_testsuite_ns_attestation_interface, 0, 0, 0},
69
Kevin Peng62a87112020-07-07 15:07:46 +080070 /* Non-secure QCBOR library test cases */
71 {&register_testsuite_ns_qcbor, 0, 0, 0},
Kevin Peng62a87112020-07-07 15:07:46 +080072
Raef Coles652bb8a2020-09-24 11:27:38 +010073#ifndef SYMMETRIC_INITIAL_ATTESTATION
Kevin Peng62a87112020-07-07 15:07:46 +080074 /* Non-secure T_COSE library test cases */
75 {&register_testsuite_ns_t_cose, 0, 0, 0},
Raef Coles652bb8a2020-09-24 11:27:38 +010076#endif /* !SYMMETRIC_INITIAL_ATTESTATION */
Kevin Peng62a87112020-07-07 15:07:46 +080077#endif
78
Raef Coles652bb8a2020-09-24 11:27:38 +010079#ifdef TFM_PARTITION_AUDIT_LOG
Kevin Peng62a87112020-07-07 15:07:46 +080080 /* Non-secure Audit Logging test cases */
81 {&register_testsuite_ns_audit_interface, 0, 0, 0},
82#endif
83
Kevin Peng62a87112020-07-07 15:07:46 +080084#ifdef CORE_TEST_POSITIVE
85 /* Non-secure core test cases */
86 {&register_testsuite_ns_core_positive, 0, 0, 0},
87#endif
88
89#ifdef CORE_TEST_INTERACTIVE
90 /* Non-secure interactive test cases */
91 {&register_testsuite_ns_core_interactive, 0, 0, 0},
92#endif
93
Raef Coles652bb8a2020-09-24 11:27:38 +010094#ifdef TFM_PSA_API
Kevin Peng62a87112020-07-07 15:07:46 +080095 /* Non-secure IPC test cases */
96 {&register_testsuite_ns_ipc_interface, 0, 0, 0},
97#endif
98
Raef Coles652bb8a2020-09-24 11:27:38 +010099#ifdef TFM_MULTI_CORE_TOPOLOGY
Kevin Peng62a87112020-07-07 15:07:46 +0800100 /* Multi-core topology test cases */
101 {&register_testsuite_multi_core_ns_interface, 0, 0, 0},
102#endif
103
104 /* End of test suites */
105 {0, 0, 0, 0}
106};
107
108enum test_suite_err_t start_integ_test(void)
109{
110 return integ_test("Non-secure", test_suites);
111}
112
113/* Service stand-in for NS tests. To be called from a non-secure context */
114enum test_suite_err_t tfm_non_secure_client_run_tests(void)
115{
116 return start_integ_test();
117}