blob: 7e2eed8e4abb8ded90678b1d05d9c45a457ce463 [file] [log] [blame]
Pascal Brandc639ac82015-07-02 08:53:34 +02001/*
2 * Copyright (c) 2014, STMicroelectronics International N.V.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef XTEST_TEST_H
15#define XTEST_TEST_H
16#include <adbg.h>
17#include <tee_client_api.h>
Pascal Brandc639ac82015-07-02 08:53:34 +020018
19/*ADBG Cases declaration.*/
20ADBG_CASE_DECLARE(XTEST_TEE_1001);
21ADBG_CASE_DECLARE(XTEST_TEE_1004);
22ADBG_CASE_DECLARE(XTEST_TEE_1005);
23ADBG_CASE_DECLARE(XTEST_TEE_1006);
24ADBG_CASE_DECLARE(XTEST_TEE_1007);
25ADBG_CASE_DECLARE(XTEST_TEE_1008);
26ADBG_CASE_DECLARE(XTEST_TEE_1009);
27ADBG_CASE_DECLARE(XTEST_TEE_1010);
28ADBG_CASE_DECLARE(XTEST_TEE_1011);
29ADBG_CASE_DECLARE(XTEST_TEE_1012);
30
31ADBG_CASE_DECLARE(XTEST_TEE_2001);
32ADBG_CASE_DECLARE(XTEST_TEE_2002);
33
34ADBG_CASE_DECLARE(XTEST_TEE_4001);
35ADBG_CASE_DECLARE(XTEST_TEE_4002);
36ADBG_CASE_DECLARE(XTEST_TEE_4003_NO_XTS);
37ADBG_CASE_DECLARE(XTEST_TEE_4003_XTS);
38ADBG_CASE_DECLARE(XTEST_TEE_4004);
39ADBG_CASE_DECLARE(XTEST_TEE_4005);
40ADBG_CASE_DECLARE(XTEST_TEE_4006);
41ADBG_CASE_DECLARE(XTEST_TEE_4007);
42ADBG_CASE_DECLARE(XTEST_TEE_4008);
Pascal Brand2b92b642015-07-16 13:29:42 +020043ADBG_CASE_DECLARE(XTEST_TEE_4009);
Pascal Brandc639ac82015-07-02 08:53:34 +020044
45ADBG_CASE_DECLARE(XTEST_TEE_5006);
46
47ADBG_CASE_DECLARE(XTEST_TEE_6001);
48ADBG_CASE_DECLARE(XTEST_TEE_6002);
49ADBG_CASE_DECLARE(XTEST_TEE_6003);
50ADBG_CASE_DECLARE(XTEST_TEE_6004);
51ADBG_CASE_DECLARE(XTEST_TEE_6005);
52ADBG_CASE_DECLARE(XTEST_TEE_6006);
53ADBG_CASE_DECLARE(XTEST_TEE_6007);
54ADBG_CASE_DECLARE(XTEST_TEE_6008);
55ADBG_CASE_DECLARE(XTEST_TEE_6009);
Pascal Brand8a74e362015-09-10 12:41:52 +020056#ifdef CFG_GP_TESTSUITE_ENABLE
57ADBG_CASE_DECLARE(XTEST_TEE_6011);
58#endif
Pascal Brandc639ac82015-07-02 08:53:34 +020059ADBG_CASE_DECLARE(XTEST_TEE_7001);
60ADBG_CASE_DECLARE(XTEST_TEE_7002);
61ADBG_CASE_DECLARE(XTEST_TEE_7003);
62ADBG_CASE_DECLARE(XTEST_TEE_7004);
63ADBG_CASE_DECLARE(XTEST_TEE_7005);
64ADBG_CASE_DECLARE(XTEST_TEE_7006);
65ADBG_CASE_DECLARE(XTEST_TEE_7007);
66ADBG_CASE_DECLARE(XTEST_TEE_7008);
67ADBG_CASE_DECLARE(XTEST_TEE_7009);
68ADBG_CASE_DECLARE(XTEST_TEE_7010);
69ADBG_CASE_DECLARE(XTEST_TEE_7013);
70ADBG_CASE_DECLARE(XTEST_TEE_7016);
71ADBG_CASE_DECLARE(XTEST_TEE_7017);
72ADBG_CASE_DECLARE(XTEST_TEE_7018);
73ADBG_CASE_DECLARE(XTEST_TEE_7019);
74
75ADBG_CASE_DECLARE(XTEST_TEE_10001);
76ADBG_CASE_DECLARE(XTEST_TEE_10002);
Pascal Brandc639ac82015-07-02 08:53:34 +020077
Pascal Brand8a74e362015-09-10 12:41:52 +020078#ifdef CFG_GP_TESTSUITE_ENABLE
79#include "adbg_case_declare.h"
Pascal Brandc639ac82015-07-02 08:53:34 +020080ADBG_CASE_DECLARE_AUTO_GENERATED_TESTS()
Pascal Brand8a74e362015-09-10 12:41:52 +020081#endif
Pascal Brandc639ac82015-07-02 08:53:34 +020082
83/* TEEC_Result */
84ADBG_ENUM_TABLE_DECLARE(TEEC_Result);
85
86#define ADBG_EXPECT_TEEC_RESULT(c, exp, got) \
87 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_Result)
88
89#define ADBG_EXPECT_TEEC_SUCCESS(c, got) \
90 ADBG_EXPECT_ENUM(c, TEEC_SUCCESS, got, ADBG_EnumTable_TEEC_Result)
91
92/* TEEC_ErrorOrigin */
93ADBG_ENUM_TABLE_DECLARE(TEEC_ErrorOrigin);
94
95#define ADBG_EXPECT_TEEC_ERROR_ORIGIN(c, exp, got) \
96 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_ErrorOrigin)
97
98/* bass_return_code */
99ADBG_ENUM_TABLE_DECLARE(bass_return_code);
100
101#define ADBG_EXPECT_BASS_RETURN_CODE(c, exp, got) \
102 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_bass_return_code)
103
104#define ADBG_EXPECT_BASS_RC_SUCCESS(c, got) \
105 ADBG_EXPECT_ENUM(c, BASS_RC_SUCCESS, got, \
106 ADBG_EnumTable_bass_return_code)
107
108
109extern const char crypt_user_ta[];
110extern const unsigned int crypt_user_ta_size;
111
112extern const char os_test_ta[];
113extern const unsigned int os_test_ta_size;
114
115extern const char create_fail_test_ta[];
116extern const unsigned int create_fail_test_ta_size;
117
118extern const char rpc_test_ta[];
119extern const unsigned int rpc_test_ta_size;
120
121extern const char sims_test_ta[];
122extern const unsigned int sims_test_ta_size;
123
124extern const char gp_tta_testing_client_api_ta[];
125extern const unsigned int gp_tta_testing_client_api_ta_size;
126
127extern const char gp_tta_answer_success_to_open_session_invoke_ta[];
128extern const unsigned int gp_tta_answer_success_to_open_session_invoke_ta_size;
129
130extern const char gp_tta_answer_error_to_invoke_ta[];
131extern const unsigned int gp_tta_answer_error_to_invoke_ta_size;
132
133extern const char gp_tta_answer_error_to_open_session_ta[];
134extern const unsigned int gp_tta_answer_error_to_open_session_ta_size;
135
136extern const char gp_tta_check_open_session_with_4_parameters_ta[];
137extern const unsigned int gp_tta_check_open_session_with_4_parameters_ta_size;
138
139extern const char gp_tta_ds_ta[];
140extern const unsigned int gp_tta_ds_ta_size;
141
142extern const char storage_ta[];
143extern const unsigned int storage_ta_size;
144
145extern const char gp_tta_time_ta[];
146extern const unsigned int gp_tta_time_ta_size;
147
148extern const char gp_tta_tcf_ta[];
149extern const unsigned int gp_tta_tcf_ta_size;
150
151extern const char gp_tta_crypto_ta[];
152extern const unsigned int gp_tta_crypto_ta_size;
153
154extern const char gp_tta_arithm_ta[];
155extern const unsigned int gp_tta_arithm_ta_size;
156
157extern const char gp_tta_ica_ta[];
158extern const unsigned int gp_tta_ica_ta_size;
159
160extern const char gp_tta_ica2_ta[];
161extern const unsigned int gp_tta_ica2_ta_size;
162
163extern const char gp_tta_tcf_singleinstance_ta[];
164extern const unsigned int gp_tta_tcf_singleinstance_ta_size;
165
166extern const char gp_tta_tcf_multipleinstance_ta[];
167extern const unsigned int gp_tta_tcf_multipleinstance_ta_size;
168
169extern const TEEC_UUID crypt_user_ta_uuid;
170extern const TEEC_UUID os_test_ta_uuid;
171extern const TEEC_UUID create_fail_test_ta_uuid;
172extern const TEEC_UUID rpc_test_ta_uuid;
173extern const TEEC_UUID sims_test_ta_uuid;
174extern const TEEC_UUID gp_tta_testing_client_api_uuid;
175extern const TEEC_UUID gp_tta_answer_success_to_open_session_invoke_uuid;
176extern const TEEC_UUID gp_tta_answer_error_to_invoke_uuid;
177extern const TEEC_UUID gp_tta_answer_error_to_open_session_uuid;
178extern const TEEC_UUID gp_tta_check_OpenSession_with_4_parameters_uuid;
179extern const TEEC_UUID gp_tta_ds_uuid;
180extern const TEEC_UUID storage_ta_uuid;
181extern const TEEC_UUID enc_fs_key_manager_test_ta_uuid;
182extern const TEEC_UUID ecc_test_ta_uuid;
183extern const TEEC_UUID gp_tta_time_uuid;
184extern char *_device;
185
186#endif /*XTEST_TEST_H*/