blob: 6ce060f3fc2d8076b019e415b6240309d560ff23 [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);
Jerome Forissiere3688342015-09-24 10:45:17 -070056#ifdef WITH_GP_TESTS
Pascal Brand30844922015-09-17 12:12:42 +020057ADBG_CASE_DECLARE(XTEST_TEE_6010);
Pascal Brand8a74e362015-09-10 12:41:52 +020058ADBG_CASE_DECLARE(XTEST_TEE_6011);
59#endif
Pascal Brandc639ac82015-07-02 08:53:34 +020060ADBG_CASE_DECLARE(XTEST_TEE_7001);
61ADBG_CASE_DECLARE(XTEST_TEE_7002);
62ADBG_CASE_DECLARE(XTEST_TEE_7003);
63ADBG_CASE_DECLARE(XTEST_TEE_7004);
64ADBG_CASE_DECLARE(XTEST_TEE_7005);
65ADBG_CASE_DECLARE(XTEST_TEE_7006);
66ADBG_CASE_DECLARE(XTEST_TEE_7007);
67ADBG_CASE_DECLARE(XTEST_TEE_7008);
68ADBG_CASE_DECLARE(XTEST_TEE_7009);
69ADBG_CASE_DECLARE(XTEST_TEE_7010);
70ADBG_CASE_DECLARE(XTEST_TEE_7013);
71ADBG_CASE_DECLARE(XTEST_TEE_7016);
72ADBG_CASE_DECLARE(XTEST_TEE_7017);
73ADBG_CASE_DECLARE(XTEST_TEE_7018);
74ADBG_CASE_DECLARE(XTEST_TEE_7019);
75
76ADBG_CASE_DECLARE(XTEST_TEE_10001);
77ADBG_CASE_DECLARE(XTEST_TEE_10002);
Pascal Brandc639ac82015-07-02 08:53:34 +020078
Cedric Chaumont1390f3a2015-08-31 13:55:16 +020079#ifdef CFG_ENC_FS
80ADBG_CASE_DECLARE(XTEST_TEE_20001);
81ADBG_CASE_DECLARE(XTEST_TEE_20002);
82ADBG_CASE_DECLARE(XTEST_TEE_20003);
83ADBG_CASE_DECLARE(XTEST_TEE_20004);
84ADBG_CASE_DECLARE(XTEST_TEE_20021);
85ADBG_CASE_DECLARE(XTEST_TEE_20022);
86ADBG_CASE_DECLARE(XTEST_TEE_20023);
87
88ADBG_CASE_DECLARE(XTEST_TEE_20501);
89ADBG_CASE_DECLARE(XTEST_TEE_20502);
90ADBG_CASE_DECLARE(XTEST_TEE_20503);
91ADBG_CASE_DECLARE(XTEST_TEE_20521);
92ADBG_CASE_DECLARE(XTEST_TEE_20522);
93ADBG_CASE_DECLARE(XTEST_TEE_20523);
94#endif /* CFG_ENC_FS */
95
Jerome Forissiere3688342015-09-24 10:45:17 -070096#ifdef WITH_GP_TESTS
Pascal Brand8a74e362015-09-10 12:41:52 +020097#include "adbg_case_declare.h"
Pascal Brandc639ac82015-07-02 08:53:34 +020098ADBG_CASE_DECLARE_AUTO_GENERATED_TESTS()
Pascal Brand8a74e362015-09-10 12:41:52 +020099#endif
Pascal Brandc639ac82015-07-02 08:53:34 +0200100
101/* TEEC_Result */
102ADBG_ENUM_TABLE_DECLARE(TEEC_Result);
103
104#define ADBG_EXPECT_TEEC_RESULT(c, exp, got) \
105 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_Result)
106
107#define ADBG_EXPECT_TEEC_SUCCESS(c, got) \
108 ADBG_EXPECT_ENUM(c, TEEC_SUCCESS, got, ADBG_EnumTable_TEEC_Result)
109
110/* TEEC_ErrorOrigin */
111ADBG_ENUM_TABLE_DECLARE(TEEC_ErrorOrigin);
112
113#define ADBG_EXPECT_TEEC_ERROR_ORIGIN(c, exp, got) \
114 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_ErrorOrigin)
115
116/* bass_return_code */
117ADBG_ENUM_TABLE_DECLARE(bass_return_code);
118
119#define ADBG_EXPECT_BASS_RETURN_CODE(c, exp, got) \
120 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_bass_return_code)
121
122#define ADBG_EXPECT_BASS_RC_SUCCESS(c, got) \
123 ADBG_EXPECT_ENUM(c, BASS_RC_SUCCESS, got, \
124 ADBG_EnumTable_bass_return_code)
125
126
127extern const char crypt_user_ta[];
128extern const unsigned int crypt_user_ta_size;
129
130extern const char os_test_ta[];
131extern const unsigned int os_test_ta_size;
132
133extern const char create_fail_test_ta[];
134extern const unsigned int create_fail_test_ta_size;
135
136extern const char rpc_test_ta[];
137extern const unsigned int rpc_test_ta_size;
138
139extern const char sims_test_ta[];
140extern const unsigned int sims_test_ta_size;
141
142extern const char gp_tta_testing_client_api_ta[];
143extern const unsigned int gp_tta_testing_client_api_ta_size;
144
145extern const char gp_tta_answer_success_to_open_session_invoke_ta[];
146extern const unsigned int gp_tta_answer_success_to_open_session_invoke_ta_size;
147
148extern const char gp_tta_answer_error_to_invoke_ta[];
149extern const unsigned int gp_tta_answer_error_to_invoke_ta_size;
150
151extern const char gp_tta_answer_error_to_open_session_ta[];
152extern const unsigned int gp_tta_answer_error_to_open_session_ta_size;
153
154extern const char gp_tta_check_open_session_with_4_parameters_ta[];
155extern const unsigned int gp_tta_check_open_session_with_4_parameters_ta_size;
156
157extern const char gp_tta_ds_ta[];
158extern const unsigned int gp_tta_ds_ta_size;
159
160extern const char storage_ta[];
161extern const unsigned int storage_ta_size;
162
163extern const char gp_tta_time_ta[];
164extern const unsigned int gp_tta_time_ta_size;
165
166extern const char gp_tta_tcf_ta[];
167extern const unsigned int gp_tta_tcf_ta_size;
168
169extern const char gp_tta_crypto_ta[];
170extern const unsigned int gp_tta_crypto_ta_size;
171
172extern const char gp_tta_arithm_ta[];
173extern const unsigned int gp_tta_arithm_ta_size;
174
175extern const char gp_tta_ica_ta[];
176extern const unsigned int gp_tta_ica_ta_size;
177
178extern const char gp_tta_ica2_ta[];
179extern const unsigned int gp_tta_ica2_ta_size;
180
181extern const char gp_tta_tcf_singleinstance_ta[];
182extern const unsigned int gp_tta_tcf_singleinstance_ta_size;
183
184extern const char gp_tta_tcf_multipleinstance_ta[];
185extern const unsigned int gp_tta_tcf_multipleinstance_ta_size;
186
187extern const TEEC_UUID crypt_user_ta_uuid;
188extern const TEEC_UUID os_test_ta_uuid;
189extern const TEEC_UUID create_fail_test_ta_uuid;
190extern const TEEC_UUID rpc_test_ta_uuid;
191extern const TEEC_UUID sims_test_ta_uuid;
192extern const TEEC_UUID gp_tta_testing_client_api_uuid;
193extern const TEEC_UUID gp_tta_answer_success_to_open_session_invoke_uuid;
194extern const TEEC_UUID gp_tta_answer_error_to_invoke_uuid;
195extern const TEEC_UUID gp_tta_answer_error_to_open_session_uuid;
196extern const TEEC_UUID gp_tta_check_OpenSession_with_4_parameters_uuid;
197extern const TEEC_UUID gp_tta_ds_uuid;
198extern const TEEC_UUID storage_ta_uuid;
199extern const TEEC_UUID enc_fs_key_manager_test_ta_uuid;
200extern const TEEC_UUID ecc_test_ta_uuid;
201extern const TEEC_UUID gp_tta_time_uuid;
202extern char *_device;
203
204#endif /*XTEST_TEST_H*/