blob: 6a5a2657ea3f0122b3c15c396cd5e70b465037bd [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"
TudorCretu0506c9f2019-07-04 18:00:35 +010014#include "test/suites/its/secure/its_s_tests.h"
Antonio de Angelis2eeac642018-08-21 14:23:22 +010015#include "test/suites/audit/secure/audit_s_tests.h"
Tamas Ban229f9db2018-08-17 12:57:13 +010016#include "test/suites/attestation/secure/attestation_s_tests.h"
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000017#include "test/suites/invert/secure/invert_s_tests.h"
Antonio de Angelis88c5b272018-08-31 15:48:21 +010018#include "test/suites/crypto/secure/crypto_s_tests.h"
Edison Aicf5e34c2018-06-19 18:06:54 +080019#include "test/suites/ipc/secure/ipc_s_tests.h"
Mate Toth-Palee7cfba2019-11-12 17:08:23 +010020#include "test/suites/platform/secure/platform_s_tests.h"
Antonio de Angelis88c5b272018-08-31 15:48:21 +010021
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000022static struct test_suite_t test_suites[] = {
Tamas Band90c81b2018-08-15 15:03:42 +010023#ifdef SERVICES_TEST_S
Marc Moreno Berengue3587a9f2019-01-14 15:56:46 +000024 /* List test cases which are compliant with level 1 isolation */
Jamie Foxb93da8b2018-12-13 18:27:30 +000025
Jamie Foxece411c2019-01-08 13:29:34 +000026 {&register_testsuite_s_psa_ps_interface, 0, 0, 0},
Marc Moreno Berengue32ee4262019-01-14 11:30:46 +000027 {&register_testsuite_s_psa_ps_reliability, 0, 0, 0},
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000028
Jamie Fox95bacd42019-03-21 18:14:15 +000029#ifdef SST_TEST_NV_COUNTERS
Marc Moreno Berengue42e74b42018-08-15 14:28:45 +010030 {&register_testsuite_s_rollback_protection, 0, 0, 0},
31#endif
Marc Moreno Berenguef8428f02019-01-14 14:50:09 +000032
TudorCretu0506c9f2019-07-04 18:00:35 +010033 /* Secure ITS test cases */
34 {&register_testsuite_s_psa_its_interface, 0, 0, 0},
35 {&register_testsuite_s_psa_its_reliability, 0, 0, 0},
36
Antonio de Angelis4743e672019-04-11 11:38:48 +010037 /* Crypto test cases */
38 {&register_testsuite_s_crypto_interface, 0, 0, 0},
39
Kevin Peng2ed30222019-04-30 09:26:11 +080040 /* Secure initial attestation service test cases */
41 {&register_testsuite_s_attestation_interface, 0, 0, 0},
42
Mate Toth-Palee7cfba2019-11-12 17:08:23 +010043 /* Secure platform service test cases */
44 {&register_testsuite_s_platform_interface, 0, 0, 0},
45
Summer Qinfa085c52019-04-23 16:27:54 +080046#ifndef TFM_PSA_API
47 /*
48 * FixMe: since the following partitions haven't implement the IPC model,
49 * they will block the process. Skip them in IPC model.
50 */
Jamie Foxc78c62c2019-05-23 13:42:17 +010051#ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS
Antonio de Angelis2eeac642018-08-21 14:23:22 +010052 /* Secure Audit Logging test cases */
53 {&register_testsuite_s_audit_interface, 0, 0, 0},
Jamie Foxc78c62c2019-05-23 13:42:17 +010054#endif
Antonio de Angelis7852dff2018-02-07 11:15:54 +000055
Summer Qinfa085c52019-04-23 16:27:54 +080056#endif
Tamas Ban229f9db2018-08-17 12:57:13 +010057
Mate Toth-Pal349714a2018-02-23 15:30:24 +010058#ifdef TFM_PARTITION_TEST_CORE
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000059 /* Secure invert test cases */
60 /* Note: since this is sample code, only run if test services are enabled */
61 {&register_testsuite_s_invert_interface, 0, 0, 0},
Tamas Banc2074a72018-08-14 10:23:12 +010062#endif /* TFM_PARTITION_TEST_CORE*/
Edison Aicf5e34c2018-06-19 18:06:54 +080063
David Huf2cfa122019-08-27 15:32:38 +080064#ifdef ENABLE_IPC_TEST
Edison Aicf5e34c2018-06-19 18:06:54 +080065 /* Secure IPC test cases */
66 {&register_testsuite_s_ipc_interface, 0, 0, 0},
67#endif
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000068#endif /* SERVICES_TEST_S */
TTornblomc640e072019-06-14 14:33:51 +020069 /* End of test suites */
70 {0, 0, 0, 0}
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000071};
72
73static void setup_integ_test(void)
74{
75 /* Left empty intentionally, currently implemented
76 * test suites require no setup
77 */
78}
79
80static void tear_down_integ_test(void)
81{
Jamie Foxb93da8b2018-12-13 18:27:30 +000082 /* Left empty intentionally, currently implemented
83 * test suites require no tear down
84 */
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000085}
86
87void start_integ_test(void)
88{
89 setup_integ_test();
TTornblomc640e072019-06-14 14:33:51 +020090 integ_test("Secure", test_suites);
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000091 tear_down_integ_test();
Marc Moreno Berengueffd3c462017-11-29 16:09:52 +000092}