blob: ae87e944267a4215eaa0bc9016485efc97292b72 [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"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000015#include "test/suites/invert/non_secure/invert_ns_tests.h"
16#include "test/suites/core/non_secure/core_ns_tests.h"
17
18static struct test_suite_t test_suites[] = {
Tamas Band90c81b2018-08-15 15:03:42 +010019#if TFM_LVL == 3
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000020#ifdef SERVICES_TEST_NS
Tamas Band90c81b2018-08-15 15:03:42 +010021 /* List test cases which compliant with level 3 isolation */
22
23#ifdef TFM_PARTITION_TEST_CORE
24 /* Non-secure invert test cases */
25 /* Note: since this is sample code, only run if test services are enabled */
26 {&register_testsuite_ns_invert_interface, 0, 0, 0},
27#endif
28#endif /* SERVICES_TEST_NS */
29
30#else /* TFM_LVL == 3 */
31
32#ifdef SERVICES_TEST_NS
33 /* List test cases which compliant with level 1 isolation */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000034 /* Non-secure SST test cases */
35 {&register_testsuite_ns_sst_interface, 0, 0, 0},
Jamie Fox0ee2ca52018-02-13 18:05:50 +000036 {&register_testsuite_ns_sst_policy, 0, 0, 0},
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000037
Mate Toth-Pal349714a2018-02-23 15:30:24 +010038#ifdef TFM_PARTITION_TEST_SST
Jamie Fox06aee082017-12-18 17:00:15 +000039 /* Non-secure SST referenced access testsuite */
40 {&register_testsuite_ns_sst_ref_access, 0, 0, 0},
41#endif
42
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
Mate Toth-Pal349714a2018-02-23 15:30:24 +010046#ifdef TFM_PARTITION_TEST_CORE
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000047 /* Non-secure invert test cases */
48 /* Note: since this is sample code, only run if test services are enabled */
49 {&register_testsuite_ns_invert_interface, 0, 0, 0},
50#endif
Tamas Band90c81b2018-08-15 15:03:42 +010051#endif /* SERVICES_TEST_NS */
52#endif /* TFM_LVL == 3 */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000053
54#ifdef CORE_TEST_POSITIVE
55 /* Non-secure core test cases */
56 {&register_testsuite_ns_core_positive, 0, 0, 0},
57#endif
58
59#ifdef CORE_TEST_INTERACTIVE
60 /* Non-secure interactive test cases */
61 {&register_testsuite_ns_core_interactive, 0, 0, 0},
62#endif
63};
64
65void start_integ_test(void)
66{
67 integ_test("Non-secure", test_suites,
68 sizeof(test_suites)/sizeof(test_suites[0]));
69}
Ben Davis6d7256b2018-04-18 14:16:53 +010070
71/* Service stand-in for NS tests. To be called from a non-secure context */
72void tfm_non_secure_client_run_tests(void)
73{
74 start_integ_test();
75}