blob: b458224aedbc6ad3d32908829c2dd23b6439352a [file] [log] [blame]
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +00001/*
Jamie Foxb93da8b2018-12-13 18:27:30 +00002 * Copyright (c) 2017-2019, 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"
Tamas Banaaf90392019-01-02 13:24:13 +000017#include "test/suites/qcbor/non_secure/qcbor_ns_tests.h"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000018#include "test/suites/invert/non_secure/invert_ns_tests.h"
19#include "test/suites/core/non_secure/core_ns_tests.h"
20
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 */
25
Tamas Banaaf90392019-01-02 13:24:13 +000026 /* Non-secure QCBOR library test cases */
27 {&register_testsuite_ns_qcbor, 0, 0, 0},
28
Tamas Band90c81b2018-08-15 15:03:42 +010029#ifdef TFM_PARTITION_TEST_CORE
30 /* Non-secure invert test cases */
31 /* Note: since this is sample code, only run if test services are enabled */
32 {&register_testsuite_ns_invert_interface, 0, 0, 0},
33#endif
34#endif /* SERVICES_TEST_NS */
35
36#else /* TFM_LVL == 3 */
37
38#ifdef SERVICES_TEST_NS
Marc Moreno Berengue3587a9f2019-01-14 15:56:46 +000039 /* List test cases which are compliant with level 1 isolation */
Jamie Foxb93da8b2018-12-13 18:27:30 +000040
Jamie Fox77924882018-12-14 17:53:46 +000041 {&register_testsuite_ns_psa_ps_interface, 0, 0, 0},
Jamie Fox06aee082017-12-18 17:00:15 +000042
Antonio de Angelis2eeac642018-08-21 14:23:22 +010043 /* Non-secure Audit Logging test cases */
44 {&register_testsuite_ns_audit_interface, 0, 0, 0},
Antonio de Angelis7852dff2018-02-07 11:15:54 +000045
Antonio de Angelis88c5b272018-08-31 15:48:21 +010046 /* Non-secure Crypto test cases */
47 {&register_testsuite_ns_crypto_interface, 0, 0, 0},
48
Tamas Ban229f9db2018-08-17 12:57:13 +010049 /* Non-secure initial attestation service test cases */
50 {&register_testsuite_ns_attestation_interface, 0, 0, 0},
51
Tamas Banaaf90392019-01-02 13:24:13 +000052 /* Non-secure QCBOR library test cases */
53 {&register_testsuite_ns_qcbor, 0, 0, 0},
54
Mate Toth-Pal349714a2018-02-23 15:30:24 +010055#ifdef TFM_PARTITION_TEST_CORE
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000056 /* Non-secure invert test cases */
57 /* Note: since this is sample code, only run if test services are enabled */
58 {&register_testsuite_ns_invert_interface, 0, 0, 0},
59#endif
Tamas Band90c81b2018-08-15 15:03:42 +010060#endif /* SERVICES_TEST_NS */
61#endif /* TFM_LVL == 3 */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000062
63#ifdef CORE_TEST_POSITIVE
64 /* Non-secure core test cases */
65 {&register_testsuite_ns_core_positive, 0, 0, 0},
66#endif
67
68#ifdef CORE_TEST_INTERACTIVE
69 /* Non-secure interactive test cases */
70 {&register_testsuite_ns_core_interactive, 0, 0, 0},
71#endif
72};
73
74void start_integ_test(void)
75{
76 integ_test("Non-secure", test_suites,
77 sizeof(test_suites)/sizeof(test_suites[0]));
78}
Ben Davis6d7256b2018-04-18 14:16:53 +010079
80/* Service stand-in for NS tests. To be called from a non-secure context */
81void tfm_non_secure_client_run_tests(void)
82{
83 start_integ_test();
84}