Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2020, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | #include "test_framework_integ_test.h" |
| 9 | #include "test_framework_integ_test_helper.h" |
| 10 | #include "test_framework.h" |
| 11 | |
| 12 | /* Service specific includes */ |
| 13 | #include "test/suites/ps/non_secure/ps_ns_tests.h" |
| 14 | #include "test/suites/its/non_secure/its_ns_tests.h" |
| 15 | #include "test/suites/audit/non_secure/audit_ns_tests.h" |
| 16 | #include "test/suites/crypto/non_secure/crypto_ns_tests.h" |
Tamas Ban | dffa27d | 2020-08-31 12:23:43 +0100 | [diff] [blame^] | 17 | #include "test/suites/attestation/non_secure/attest_ns_tests.h" |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 18 | #include "test/suites/qcbor/non_secure/qcbor_ns_tests.h" |
| 19 | #include "test/suites/t_cose/non_secure/t_cose_ns_tests.h" |
| 20 | #include "test/suites/core/non_secure/core_ns_tests.h" |
| 21 | #include "test/suites/ipc/non_secure/ipc_ns_tests.h" |
| 22 | #include "test/suites/platform/non_secure/platform_ns_tests.h" |
| 23 | #include "test/suites/multi_core/non_secure/multi_core_ns_test.h" |
| 24 | |
| 25 | static struct test_suite_t test_suites[] = { |
| 26 | #ifdef SERVICES_TEST_NS |
| 27 | /* List test cases which are compliant with level 1 isolation */ |
| 28 | |
| 29 | #ifdef ENABLE_PROTECTED_STORAGE_SERVICE_TESTS |
| 30 | {®ister_testsuite_ns_psa_ps_interface, 0, 0, 0}, |
| 31 | #endif |
| 32 | |
| 33 | #ifdef ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS |
| 34 | /* Non-secure ITS test cases */ |
| 35 | {®ister_testsuite_ns_psa_its_interface, 0, 0, 0}, |
| 36 | #endif |
| 37 | |
| 38 | #ifdef ENABLE_CRYPTO_SERVICE_TESTS |
| 39 | /* Non-secure Crypto test cases */ |
| 40 | {®ister_testsuite_ns_crypto_interface, 0, 0, 0}, |
| 41 | #endif |
| 42 | |
| 43 | #ifdef ENABLE_ATTESTATION_SERVICE_TESTS |
| 44 | /* Non-secure initial attestation service test cases */ |
| 45 | {®ister_testsuite_ns_attestation_interface, 0, 0, 0}, |
| 46 | #endif |
| 47 | |
| 48 | #ifdef ENABLE_PLATFORM_SERVICE_TESTS |
| 49 | /* Non-secure platform service test cases */ |
| 50 | {®ister_testsuite_ns_platform_interface, 0, 0, 0}, |
| 51 | #endif |
| 52 | |
| 53 | #ifdef ENABLE_QCBOR_TESTS |
| 54 | /* Non-secure QCBOR library test cases */ |
| 55 | {®ister_testsuite_ns_qcbor, 0, 0, 0}, |
| 56 | #endif |
| 57 | |
| 58 | #ifdef ENABLE_T_COSE_TESTS |
| 59 | /* Non-secure T_COSE library test cases */ |
| 60 | {®ister_testsuite_ns_t_cose, 0, 0, 0}, |
| 61 | #endif |
| 62 | |
| 63 | #ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS |
| 64 | /* Non-secure Audit Logging test cases */ |
| 65 | {®ister_testsuite_ns_audit_interface, 0, 0, 0}, |
| 66 | #endif |
| 67 | |
| 68 | #endif /* SERVICES_TEST_NS */ |
| 69 | |
| 70 | #ifdef CORE_TEST_POSITIVE |
| 71 | /* Non-secure core test cases */ |
| 72 | {®ister_testsuite_ns_core_positive, 0, 0, 0}, |
| 73 | #endif |
| 74 | |
| 75 | #ifdef CORE_TEST_INTERACTIVE |
| 76 | /* Non-secure interactive test cases */ |
| 77 | {®ister_testsuite_ns_core_interactive, 0, 0, 0}, |
| 78 | #endif |
| 79 | |
| 80 | #ifdef ENABLE_IPC_TEST |
| 81 | /* Non-secure IPC test cases */ |
| 82 | {®ister_testsuite_ns_ipc_interface, 0, 0, 0}, |
| 83 | #endif |
| 84 | |
| 85 | #ifdef TFM_MULTI_CORE_TEST |
| 86 | /* Multi-core topology test cases */ |
| 87 | {®ister_testsuite_multi_core_ns_interface, 0, 0, 0}, |
| 88 | #endif |
| 89 | |
| 90 | /* End of test suites */ |
| 91 | {0, 0, 0, 0} |
| 92 | }; |
| 93 | |
| 94 | enum test_suite_err_t start_integ_test(void) |
| 95 | { |
| 96 | return integ_test("Non-secure", test_suites); |
| 97 | } |
| 98 | |
| 99 | /* Service stand-in for NS tests. To be called from a non-secure context */ |
| 100 | enum test_suite_err_t tfm_non_secure_client_run_tests(void) |
| 101 | { |
| 102 | return start_integ_test(); |
| 103 | } |