blob: 80f7ee8e3838b0fa5c9ba26dc5b1f716714482ca [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/secure/sst_tests.h"
Antonio de Angelis2eeac642018-08-21 14:23:22 +010014#include "test/suites/audit/secure/audit_s_tests.h"
Tamas Ban229f9db2018-08-17 12:57:13 +010015#include "test/suites/attestation/secure/attestation_s_tests.h"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000016#include "test/suites/invert/secure/invert_s_tests.h"
Antonio de Angelis88c5b272018-08-31 15:48:21 +010017#include "test/suites/crypto/secure/crypto_s_tests.h"
Edison Aicf5e34c2018-06-19 18:06:54 +080018#include "test/suites/ipc/secure/ipc_s_tests.h"
Antonio de Angelis88c5b272018-08-31 15:48:21 +010019
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000020static struct test_suite_t test_suites[] = {
Tamas Band90c81b2018-08-15 15:03:42 +010021#if TFM_LVL == 3
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000022#ifdef SERVICES_TEST_S
Tamas Band90c81b2018-08-15 15:03:42 +010023 /* List test cases which compliant with level 3 isolation */
24#endif /* SERVICES_TEST_S */
25
26#else /* TFM_LVL == 3 */
27
28#ifdef SERVICES_TEST_S
Marc Moreno Berengue3587a9f2019-01-14 15:56:46 +000029 /* List test cases which are compliant with level 1 isolation */
Jamie Foxb93da8b2018-12-13 18:27:30 +000030
Jamie Foxece411c2019-01-08 13:29:34 +000031 {&register_testsuite_s_psa_ps_interface, 0, 0, 0},
Marc Moreno Berengue32ee4262019-01-14 11:30:46 +000032 {&register_testsuite_s_psa_ps_reliability, 0, 0, 0},
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000033
Jamie Fox95bacd42019-03-21 18:14:15 +000034#ifdef SST_TEST_NV_COUNTERS
Marc Moreno Berengue42e74b42018-08-15 14:28:45 +010035 {&register_testsuite_s_rollback_protection, 0, 0, 0},
36#endif
Marc Moreno Berenguef8428f02019-01-14 14:50:09 +000037
Antonio de Angelis4743e672019-04-11 11:38:48 +010038 /* Crypto test cases */
39 {&register_testsuite_s_crypto_interface, 0, 0, 0},
40
Summer Qinfa085c52019-04-23 16:27:54 +080041#ifndef TFM_PSA_API
42 /*
43 * FixMe: since the following partitions haven't implement the IPC model,
44 * they will block the process. Skip them in IPC model.
45 */
Antonio de Angelis2eeac642018-08-21 14:23:22 +010046 /* Secure Audit Logging test cases */
47 {&register_testsuite_s_audit_interface, 0, 0, 0},
Antonio de Angelis7852dff2018-02-07 11:15:54 +000048
Tamas Ban229f9db2018-08-17 12:57:13 +010049 /* Secure initial attestation service test cases */
50 {&register_testsuite_s_attestation_interface, 0, 0, 0},
Summer Qinfa085c52019-04-23 16:27:54 +080051#endif
Tamas Ban229f9db2018-08-17 12:57:13 +010052
Mate Toth-Pal349714a2018-02-23 15:30:24 +010053#ifdef TFM_PARTITION_TEST_CORE
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000054 /* Secure invert test cases */
55 /* Note: since this is sample code, only run if test services are enabled */
56 {&register_testsuite_s_invert_interface, 0, 0, 0},
Tamas Banc2074a72018-08-14 10:23:12 +010057#endif /* TFM_PARTITION_TEST_CORE*/
Edison Aicf5e34c2018-06-19 18:06:54 +080058
59#ifdef CORE_TEST_IPC
60 /* Secure IPC test cases */
61 {&register_testsuite_s_ipc_interface, 0, 0, 0},
62#endif
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000063#endif /* SERVICES_TEST_S */
Tamas Band90c81b2018-08-15 15:03:42 +010064#endif /* TFM_LVL == 3 */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000065};
66
67static void setup_integ_test(void)
68{
69 /* Left empty intentionally, currently implemented
70 * test suites require no setup
71 */
72}
73
74static void tear_down_integ_test(void)
75{
Jamie Foxb93da8b2018-12-13 18:27:30 +000076 /* Left empty intentionally, currently implemented
77 * test suites require no tear down
78 */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000079}
80
81void start_integ_test(void)
82{
83 setup_integ_test();
84 integ_test("Secure",
85 test_suites,
86 sizeof(test_suites)/sizeof(test_suites[0]));
87 tear_down_integ_test();
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000088}