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/secure/ps_tests.h" |
| 14 | #include "test/suites/its/secure/its_s_tests.h" |
| 15 | #include "test/suites/audit/secure/audit_s_tests.h" |
Tamas Ban | dffa27d | 2020-08-31 12:23:43 +0100 | [diff] [blame] | 16 | #include "test/suites/attestation/secure/attest_s_tests.h" |
Kevin Peng | 62a8711 | 2020-07-07 15:07:46 +0800 | [diff] [blame] | 17 | #include "test/suites/crypto/secure/crypto_s_tests.h" |
| 18 | #include "test/suites/ipc/secure/ipc_s_tests.h" |
| 19 | #include "test/suites/platform/secure/platform_s_tests.h" |
| 20 | |
| 21 | static struct test_suite_t test_suites[] = { |
| 22 | #ifdef SERVICES_TEST_S |
| 23 | /* List test cases which are compliant with level 1 isolation */ |
| 24 | |
| 25 | #ifdef ENABLE_PROTECTED_STORAGE_SERVICE_TESTS |
| 26 | {®ister_testsuite_s_psa_ps_interface, 0, 0, 0}, |
| 27 | {®ister_testsuite_s_psa_ps_reliability, 0, 0, 0}, |
| 28 | |
| 29 | #ifdef PS_TEST_NV_COUNTERS |
| 30 | {®ister_testsuite_s_rollback_protection, 0, 0, 0}, |
| 31 | #endif |
| 32 | #endif |
| 33 | |
| 34 | #ifdef ENABLE_INTERNAL_TRUSTED_STORAGE_SERVICE_TESTS |
| 35 | /* Secure ITS test cases */ |
| 36 | {®ister_testsuite_s_psa_its_interface, 0, 0, 0}, |
| 37 | {®ister_testsuite_s_psa_its_reliability, 0, 0, 0}, |
| 38 | #endif |
| 39 | |
| 40 | #ifdef ENABLE_CRYPTO_SERVICE_TESTS |
| 41 | /* Crypto test cases */ |
| 42 | {®ister_testsuite_s_crypto_interface, 0, 0, 0}, |
| 43 | #endif |
| 44 | |
| 45 | #ifdef ENABLE_ATTESTATION_SERVICE_TESTS |
| 46 | /* Secure initial attestation service test cases */ |
| 47 | {®ister_testsuite_s_attestation_interface, 0, 0, 0}, |
| 48 | #endif |
| 49 | |
| 50 | #ifdef ENABLE_PLATFORM_SERVICE_TESTS |
| 51 | /* Secure platform service test cases */ |
| 52 | {®ister_testsuite_s_platform_interface, 0, 0, 0}, |
| 53 | #endif |
| 54 | |
| 55 | #ifdef ENABLE_AUDIT_LOGGING_SERVICE_TESTS |
| 56 | /* Secure Audit Logging test cases */ |
| 57 | {®ister_testsuite_s_audit_interface, 0, 0, 0}, |
| 58 | #endif |
| 59 | |
| 60 | #ifdef ENABLE_IPC_TEST |
| 61 | /* Secure IPC test cases */ |
| 62 | {®ister_testsuite_s_ipc_interface, 0, 0, 0}, |
| 63 | #endif |
| 64 | #endif /* SERVICES_TEST_S */ |
| 65 | /* End of test suites */ |
| 66 | {0, 0, 0, 0} |
| 67 | }; |
| 68 | |
| 69 | static void setup_integ_test(void) |
| 70 | { |
| 71 | /* Left empty intentionally, currently implemented |
| 72 | * test suites require no setup |
| 73 | */ |
| 74 | } |
| 75 | |
| 76 | static void tear_down_integ_test(void) |
| 77 | { |
| 78 | /* Left empty intentionally, currently implemented |
| 79 | * test suites require no tear down |
| 80 | */ |
| 81 | } |
| 82 | |
| 83 | enum test_suite_err_t start_integ_test(void) |
| 84 | { |
| 85 | enum test_suite_err_t retval; |
| 86 | |
| 87 | setup_integ_test(); |
| 88 | retval = integ_test("Secure", test_suites); |
| 89 | tear_down_integ_test(); |
| 90 | return retval; |
| 91 | } |