blob: 0b0037ce05988e9f30fc6bba4b3b6778e3d83f72 [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 */
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020013#if defined(TFM_PARTITION_PROTECTED_STORAGE) || defined(FORWARD_PROT_MSG)
Raef Coles652bb8a2020-09-24 11:27:38 +010014#include "ps_ns_tests.h"
15#endif
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020016#if defined(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE) || defined(FORWARD_PROT_MSG)
Raef Coles652bb8a2020-09-24 11:27:38 +010017#include "its_ns_tests.h"
18#endif
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020019#if defined(TFM_PARTITION_CRYPTO) || defined(FORWARD_PROT_MSG)
Raef Coles652bb8a2020-09-24 11:27:38 +010020#include "crypto_ns_tests.h"
21#endif
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020022#if defined(TFM_PARTITION_INITIAL_ATTESTATION) || defined(FORWARD_PROT_MSG)
Raef Coles652bb8a2020-09-24 11:27:38 +010023#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
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020029#if defined(TFM_PARTITION_PLATFORM) || defined(FORWARD_PROT_MSG)
Raef Coles652bb8a2020-09-24 11:27:38 +010030#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
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020047#if defined(TFM_PARTITION_PROTECTED_STORAGE) || defined(FORWARD_PROT_MSG)
Kevin Peng62a87112020-07-07 15:07:46 +080048 {&register_testsuite_ns_psa_ps_interface, 0, 0, 0},
49#endif
50
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020051#if defined(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE) || defined(FORWARD_PROT_MSG)
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
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020056#if defined(TFM_PARTITION_CRYPTO) || defined(FORWARD_PROT_MSG)
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
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020061#if defined(TFM_PARTITION_PLATFORM) || defined(FORWARD_PROT_MSG)
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
Gabor Abonyib4acc0f2020-09-28 15:18:20 +020066#if defined(TFM_PARTITION_INITIAL_ATTESTATION) || defined(FORWARD_PROT_MSG)
Raef Coles652bb8a2020-09-24 11:27:38 +010067 /* 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
Raef Colesce57e062020-10-02 10:39:41 +010084/* Non-secure core test cases */
85{&register_testsuite_ns_core_positive, 0, 0, 0},
Kevin Peng62a87112020-07-07 15:07:46 +080086
87#ifdef CORE_TEST_INTERACTIVE
88 /* Non-secure interactive test cases */
89 {&register_testsuite_ns_core_interactive, 0, 0, 0},
90#endif
91
Raef Coles652bb8a2020-09-24 11:27:38 +010092#ifdef TFM_PSA_API
Kevin Peng62a87112020-07-07 15:07:46 +080093 /* Non-secure IPC test cases */
94 {&register_testsuite_ns_ipc_interface, 0, 0, 0},
95#endif
96
Raef Coles652bb8a2020-09-24 11:27:38 +010097#ifdef TFM_MULTI_CORE_TOPOLOGY
Kevin Peng62a87112020-07-07 15:07:46 +080098 /* Multi-core topology test cases */
99 {&register_testsuite_multi_core_ns_interface, 0, 0, 0},
100#endif
101
102 /* End of test suites */
103 {0, 0, 0, 0}
104};
105
106enum test_suite_err_t start_integ_test(void)
107{
108 return integ_test("Non-secure", test_suites);
109}
110
111/* Service stand-in for NS tests. To be called from a non-secure context */
112enum test_suite_err_t tfm_non_secure_client_run_tests(void)
113{
114 return start_integ_test();
115}