Etienne Carriere | 9b7b70d | 2020-05-16 10:27:23 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 2 | /* |
Jens Wiklander | 02389a9 | 2016-12-16 11:13:38 +0100 | [diff] [blame] | 3 | * Copyright (c) 2016, Linaro Limited |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 4 | * Copyright (c) 2014, STMicroelectronics International N.V. |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef XTEST_TEST_H |
| 8 | #define XTEST_TEST_H |
| 9 | #include <adbg.h> |
| 10 | #include <tee_client_api.h> |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 11 | |
Etienne Carriere | 109c1d7 | 2019-01-09 11:02:02 +0100 | [diff] [blame] | 12 | #ifdef CFG_PKCS11_TA |
| 13 | #include <pkcs11.h> |
| 14 | #endif |
| 15 | |
Jens Wiklander | 74abfe3 | 2017-01-03 14:17:47 +0100 | [diff] [blame] | 16 | ADBG_SUITE_DECLARE(benchmark); |
Jerome Forissier | 213ca8a | 2017-03-31 11:27:56 +0200 | [diff] [blame] | 17 | #ifdef WITH_GP_TESTS |
| 18 | ADBG_SUITE_DECLARE(gp); |
| 19 | #endif |
Etienne Carriere | 109c1d7 | 2019-01-09 11:02:02 +0100 | [diff] [blame] | 20 | #ifdef CFG_PKCS11_TA |
| 21 | ADBG_SUITE_DECLARE(pkcs11); |
| 22 | #endif |
Jerome Forissier | 213ca8a | 2017-03-31 11:27:56 +0200 | [diff] [blame] | 23 | ADBG_SUITE_DECLARE(regression); |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 24 | |
| 25 | /* TEEC_Result */ |
| 26 | ADBG_ENUM_TABLE_DECLARE(TEEC_Result); |
| 27 | |
| 28 | #define ADBG_EXPECT_TEEC_RESULT(c, exp, got) \ |
| 29 | ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_Result) |
| 30 | |
| 31 | #define ADBG_EXPECT_TEEC_SUCCESS(c, got) \ |
| 32 | ADBG_EXPECT_ENUM(c, TEEC_SUCCESS, got, ADBG_EnumTable_TEEC_Result) |
| 33 | |
| 34 | /* TEEC_ErrorOrigin */ |
| 35 | ADBG_ENUM_TABLE_DECLARE(TEEC_ErrorOrigin); |
| 36 | |
| 37 | #define ADBG_EXPECT_TEEC_ERROR_ORIGIN(c, exp, got) \ |
| 38 | ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_ErrorOrigin) |
| 39 | |
Etienne Carriere | 109c1d7 | 2019-01-09 11:02:02 +0100 | [diff] [blame] | 40 | #ifdef CFG_PKCS11_TA |
| 41 | /* CK_RV */ |
| 42 | ADBG_ENUM_TABLE_DECLARE(CK_RV); |
| 43 | |
| 44 | #define ADBG_EXPECT_CK_RESULT(c, exp, got) \ |
| 45 | ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_CK_RV) |
| 46 | |
| 47 | #define ADBG_EXPECT_CK_OK(c, got) \ |
| 48 | ADBG_EXPECT_ENUM(c, CKR_OK, got, ADBG_EnumTable_CK_RV) |
| 49 | #endif |
| 50 | |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 51 | extern const char crypt_user_ta[]; |
| 52 | extern const unsigned int crypt_user_ta_size; |
| 53 | |
| 54 | extern const char os_test_ta[]; |
| 55 | extern const unsigned int os_test_ta_size; |
| 56 | |
| 57 | extern const char create_fail_test_ta[]; |
| 58 | extern const unsigned int create_fail_test_ta_size; |
| 59 | |
| 60 | extern const char rpc_test_ta[]; |
| 61 | extern const unsigned int rpc_test_ta_size; |
| 62 | |
| 63 | extern const char sims_test_ta[]; |
| 64 | extern const unsigned int sims_test_ta_size; |
| 65 | |
| 66 | extern const char gp_tta_testing_client_api_ta[]; |
| 67 | extern const unsigned int gp_tta_testing_client_api_ta_size; |
| 68 | |
| 69 | extern const char gp_tta_answer_success_to_open_session_invoke_ta[]; |
| 70 | extern const unsigned int gp_tta_answer_success_to_open_session_invoke_ta_size; |
| 71 | |
| 72 | extern const char gp_tta_answer_error_to_invoke_ta[]; |
| 73 | extern const unsigned int gp_tta_answer_error_to_invoke_ta_size; |
| 74 | |
| 75 | extern const char gp_tta_answer_error_to_open_session_ta[]; |
| 76 | extern const unsigned int gp_tta_answer_error_to_open_session_ta_size; |
| 77 | |
| 78 | extern const char gp_tta_check_open_session_with_4_parameters_ta[]; |
| 79 | extern const unsigned int gp_tta_check_open_session_with_4_parameters_ta_size; |
| 80 | |
| 81 | extern const char gp_tta_ds_ta[]; |
| 82 | extern const unsigned int gp_tta_ds_ta_size; |
| 83 | |
| 84 | extern const char storage_ta[]; |
| 85 | extern const unsigned int storage_ta_size; |
| 86 | |
| 87 | extern const char gp_tta_time_ta[]; |
| 88 | extern const unsigned int gp_tta_time_ta_size; |
| 89 | |
| 90 | extern const char gp_tta_tcf_ta[]; |
| 91 | extern const unsigned int gp_tta_tcf_ta_size; |
| 92 | |
| 93 | extern const char gp_tta_crypto_ta[]; |
| 94 | extern const unsigned int gp_tta_crypto_ta_size; |
| 95 | |
| 96 | extern const char gp_tta_arithm_ta[]; |
| 97 | extern const unsigned int gp_tta_arithm_ta_size; |
| 98 | |
| 99 | extern const char gp_tta_ica_ta[]; |
| 100 | extern const unsigned int gp_tta_ica_ta_size; |
| 101 | |
| 102 | extern const char gp_tta_ica2_ta[]; |
| 103 | extern const unsigned int gp_tta_ica2_ta_size; |
| 104 | |
| 105 | extern const char gp_tta_tcf_singleinstance_ta[]; |
| 106 | extern const unsigned int gp_tta_tcf_singleinstance_ta_size; |
| 107 | |
| 108 | extern const char gp_tta_tcf_multipleinstance_ta[]; |
| 109 | extern const unsigned int gp_tta_tcf_multipleinstance_ta_size; |
| 110 | |
| 111 | extern const TEEC_UUID crypt_user_ta_uuid; |
| 112 | extern const TEEC_UUID os_test_ta_uuid; |
| 113 | extern const TEEC_UUID create_fail_test_ta_uuid; |
| 114 | extern const TEEC_UUID rpc_test_ta_uuid; |
| 115 | extern const TEEC_UUID sims_test_ta_uuid; |
Ovidiu Mihalachi | 15cecff | 2019-04-02 16:36:31 +0300 | [diff] [blame] | 116 | extern const TEEC_UUID miss_test_ta_uuid; |
| 117 | extern const TEEC_UUID sims_keepalive_test_ta_uuid; |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 118 | extern const TEEC_UUID gp_tta_testing_client_api_uuid; |
| 119 | extern const TEEC_UUID gp_tta_answer_success_to_open_session_invoke_uuid; |
| 120 | extern const TEEC_UUID gp_tta_answer_error_to_invoke_uuid; |
| 121 | extern const TEEC_UUID gp_tta_answer_error_to_open_session_uuid; |
| 122 | extern const TEEC_UUID gp_tta_check_OpenSession_with_4_parameters_uuid; |
| 123 | extern const TEEC_UUID gp_tta_ds_uuid; |
| 124 | extern const TEEC_UUID storage_ta_uuid; |
Jerome Forissier | e385416 | 2016-08-12 12:40:12 +0200 | [diff] [blame] | 125 | extern const TEEC_UUID storage2_ta_uuid; |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 126 | extern const TEEC_UUID enc_fs_key_manager_test_ta_uuid; |
| 127 | extern const TEEC_UUID ecc_test_ta_uuid; |
Etienne Carriere | 726d8bc | 2017-03-21 15:45:59 +0100 | [diff] [blame] | 128 | extern const TEEC_UUID pta_invoke_tests_ta_uuid; |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 129 | extern const TEEC_UUID gp_tta_time_uuid; |
Jens Wiklander | ac27ec1 | 2015-07-15 15:23:14 +0200 | [diff] [blame] | 130 | extern const TEEC_UUID concurrent_ta_uuid; |
Jens Wiklander | 7067297 | 2016-04-06 00:01:45 +0200 | [diff] [blame] | 131 | extern const TEEC_UUID concurrent_large_ta_uuid; |
James Kung | df1e6cf | 2015-09-14 22:42:24 +0800 | [diff] [blame] | 132 | extern const TEEC_UUID storage_benchmark_ta_uuid; |
Jens Wiklander | 02389a9 | 2016-12-16 11:13:38 +0100 | [diff] [blame] | 133 | extern const TEEC_UUID socket_ta_uuid; |
Etienne Carriere | 50abf9a | 2017-03-24 11:33:50 +0100 | [diff] [blame] | 134 | extern const TEEC_UUID sdp_basic_ta_uuid; |
Javier Almansa Sobrino | cddc000 | 2020-02-10 13:35:37 +0000 | [diff] [blame] | 135 | extern const TEEC_UUID tpm_log_test_ta_uuid; |
Aleksandr Anisimov | 01f6f06 | 2021-01-19 11:02:25 +0300 | [diff] [blame] | 136 | extern const TEEC_UUID supp_plugin_test_ta_uuid; |
Jens Wiklander | 94fb158 | 2021-05-19 10:14:57 +0200 | [diff] [blame] | 137 | extern const TEEC_UUID large_ta_uuid; |
Ruchika Gupta | 7a7bc8d | 2021-12-01 10:44:14 +0530 | [diff] [blame] | 138 | extern const TEEC_UUID bti_test_ta_uuid; |
Etienne Carriere | b11820c | 2020-05-26 11:55:33 +0200 | [diff] [blame] | 139 | extern char *xtest_tee_name; |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 140 | |
| 141 | #endif /*XTEST_TEST_H*/ |