blob: b856cc0f2fcff54ada022291ac168df70c980975 [file] [log] [blame]
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +00001/*
Jamie Fox06aee082017-12-18 17:00:15 +00002 * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
Tamas Banc2074a72018-08-14 10:23:12 +01008#include "test_framework_integ_test.h"
9#include "test_framework_integ_test_helper.h"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000010#include "test_framework.h"
11
12/* Service specific includes */
13#include "test/suites/sst/non_secure/sst_ns_tests.h"
Antonio de Angelis2eeac642018-08-21 14:23:22 +010014#include "test/suites/audit/non_secure/audit_ns_tests.h"
Antonio de Angelis88c5b272018-08-31 15:48:21 +010015#include "test/suites/crypto/non_secure/crypto_ns_tests.h"
Tamas Ban229f9db2018-08-17 12:57:13 +010016#include "test/suites/attestation/non_secure/attestation_ns_tests.h"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000017#include "test/suites/invert/non_secure/invert_ns_tests.h"
18#include "test/suites/core/non_secure/core_ns_tests.h"
Edison Aicf5e34c2018-06-19 18:06:54 +080019#include "test/suites/ipc/non_secure/ipc_ns_tests.h"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000020
21static struct test_suite_t test_suites[] = {
Tamas Band90c81b2018-08-15 15:03:42 +010022#if TFM_LVL == 3
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000023#ifdef SERVICES_TEST_NS
Tamas Band90c81b2018-08-15 15:03:42 +010024 /* List test cases which compliant with level 3 isolation */
Tamas Ban229f9db2018-08-17 12:57:13 +010025 /* Non-secure initial attestation service test cases */
26 {&register_testsuite_ns_attestation_interface, 0, 0, 0},
Tamas Band90c81b2018-08-15 15:03:42 +010027
28#ifdef TFM_PARTITION_TEST_CORE
29 /* Non-secure invert test cases */
30 /* Note: since this is sample code, only run if test services are enabled */
31 {&register_testsuite_ns_invert_interface, 0, 0, 0},
32#endif
33#endif /* SERVICES_TEST_NS */
34
35#else /* TFM_LVL == 3 */
36
37#ifdef SERVICES_TEST_NS
38 /* List test cases which compliant with level 1 isolation */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000039 /* Non-secure SST test cases */
40 {&register_testsuite_ns_sst_interface, 0, 0, 0},
Marc Moreno Berenguec2e4db82018-09-14 16:32:24 +010041
42#ifdef TFM_NS_CLIENT_IDENTIFICATION
Jamie Fox0ee2ca52018-02-13 18:05:50 +000043 {&register_testsuite_ns_sst_policy, 0, 0, 0},
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000044
Mate Toth-Pal349714a2018-02-23 15:30:24 +010045#ifdef TFM_PARTITION_TEST_SST
Jamie Fox06aee082017-12-18 17:00:15 +000046 /* Non-secure SST referenced access testsuite */
47 {&register_testsuite_ns_sst_ref_access, 0, 0, 0},
Marc Moreno Berenguec2e4db82018-09-14 16:32:24 +010048#endif /* TFM_PARTITION_TEST_SST */
49
50#endif /* TFM_NS_CLIENT_IDENTIFICATION */
Jamie Fox06aee082017-12-18 17:00:15 +000051
Antonio de Angelis2eeac642018-08-21 14:23:22 +010052 /* Non-secure Audit Logging test cases */
53 {&register_testsuite_ns_audit_interface, 0, 0, 0},
Antonio de Angelis7852dff2018-02-07 11:15:54 +000054
Antonio de Angelis88c5b272018-08-31 15:48:21 +010055 /* Non-secure Crypto test cases */
56 {&register_testsuite_ns_crypto_interface, 0, 0, 0},
57
Tamas Ban229f9db2018-08-17 12:57:13 +010058 /* Non-secure initial attestation service test cases */
59 {&register_testsuite_ns_attestation_interface, 0, 0, 0},
60
Mate Toth-Pal349714a2018-02-23 15:30:24 +010061#ifdef TFM_PARTITION_TEST_CORE
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000062 /* Non-secure invert test cases */
63 /* Note: since this is sample code, only run if test services are enabled */
64 {&register_testsuite_ns_invert_interface, 0, 0, 0},
65#endif
Tamas Band90c81b2018-08-15 15:03:42 +010066#endif /* SERVICES_TEST_NS */
67#endif /* TFM_LVL == 3 */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000068
69#ifdef CORE_TEST_POSITIVE
70 /* Non-secure core test cases */
71 {&register_testsuite_ns_core_positive, 0, 0, 0},
72#endif
73
74#ifdef CORE_TEST_INTERACTIVE
75 /* Non-secure interactive test cases */
76 {&register_testsuite_ns_core_interactive, 0, 0, 0},
77#endif
Edison Aicf5e34c2018-06-19 18:06:54 +080078
79#ifdef CORE_TEST_IPC
80 /* Non-secure IPC test cases */
81 {&register_testsuite_ns_ipc_interface, 0, 0, 0},
82#endif
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000083};
84
85void start_integ_test(void)
86{
87 integ_test("Non-secure", test_suites,
88 sizeof(test_suites)/sizeof(test_suites[0]));
89}
Ben Davis6d7256b2018-04-18 14:16:53 +010090
91/* Service stand-in for NS tests. To be called from a non-secure context */
92void tfm_non_secure_client_run_tests(void)
93{
94 start_integ_test();
95}