blob: 1de50585518b5d37869a776874fa33fb855e3aa3 [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
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
Pascal Brand8a74e362015-09-10 12:41:52 +020079#ifdef CFG_GP_TESTSUITE_ENABLE
80#include "adbg_case_declare.h"
Pascal Brandc639ac82015-07-02 08:53:34 +020081ADBG_CASE_DECLARE_AUTO_GENERATED_TESTS()
Pascal Brand8a74e362015-09-10 12:41:52 +020082#endif
Pascal Brandc639ac82015-07-02 08:53:34 +020083
84/* TEEC_Result */
85ADBG_ENUM_TABLE_DECLARE(TEEC_Result);
86
87#define ADBG_EXPECT_TEEC_RESULT(c, exp, got) \
88 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_Result)
89
90#define ADBG_EXPECT_TEEC_SUCCESS(c, got) \
91 ADBG_EXPECT_ENUM(c, TEEC_SUCCESS, got, ADBG_EnumTable_TEEC_Result)
92
93/* TEEC_ErrorOrigin */
94ADBG_ENUM_TABLE_DECLARE(TEEC_ErrorOrigin);
95
96#define ADBG_EXPECT_TEEC_ERROR_ORIGIN(c, exp, got) \
97 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_ErrorOrigin)
98
99/* bass_return_code */
100ADBG_ENUM_TABLE_DECLARE(bass_return_code);
101
102#define ADBG_EXPECT_BASS_RETURN_CODE(c, exp, got) \
103 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_bass_return_code)
104
105#define ADBG_EXPECT_BASS_RC_SUCCESS(c, got) \
106 ADBG_EXPECT_ENUM(c, BASS_RC_SUCCESS, got, \
107 ADBG_EnumTable_bass_return_code)
108
109
110extern const char crypt_user_ta[];
111extern const unsigned int crypt_user_ta_size;
112
113extern const char os_test_ta[];
114extern const unsigned int os_test_ta_size;
115
116extern const char create_fail_test_ta[];
117extern const unsigned int create_fail_test_ta_size;
118
119extern const char rpc_test_ta[];
120extern const unsigned int rpc_test_ta_size;
121
122extern const char sims_test_ta[];
123extern const unsigned int sims_test_ta_size;
124
125extern const char gp_tta_testing_client_api_ta[];
126extern const unsigned int gp_tta_testing_client_api_ta_size;
127
128extern const char gp_tta_answer_success_to_open_session_invoke_ta[];
129extern const unsigned int gp_tta_answer_success_to_open_session_invoke_ta_size;
130
131extern const char gp_tta_answer_error_to_invoke_ta[];
132extern const unsigned int gp_tta_answer_error_to_invoke_ta_size;
133
134extern const char gp_tta_answer_error_to_open_session_ta[];
135extern const unsigned int gp_tta_answer_error_to_open_session_ta_size;
136
137extern const char gp_tta_check_open_session_with_4_parameters_ta[];
138extern const unsigned int gp_tta_check_open_session_with_4_parameters_ta_size;
139
140extern const char gp_tta_ds_ta[];
141extern const unsigned int gp_tta_ds_ta_size;
142
143extern const char storage_ta[];
144extern const unsigned int storage_ta_size;
145
146extern const char gp_tta_time_ta[];
147extern const unsigned int gp_tta_time_ta_size;
148
149extern const char gp_tta_tcf_ta[];
150extern const unsigned int gp_tta_tcf_ta_size;
151
152extern const char gp_tta_crypto_ta[];
153extern const unsigned int gp_tta_crypto_ta_size;
154
155extern const char gp_tta_arithm_ta[];
156extern const unsigned int gp_tta_arithm_ta_size;
157
158extern const char gp_tta_ica_ta[];
159extern const unsigned int gp_tta_ica_ta_size;
160
161extern const char gp_tta_ica2_ta[];
162extern const unsigned int gp_tta_ica2_ta_size;
163
164extern const char gp_tta_tcf_singleinstance_ta[];
165extern const unsigned int gp_tta_tcf_singleinstance_ta_size;
166
167extern const char gp_tta_tcf_multipleinstance_ta[];
168extern const unsigned int gp_tta_tcf_multipleinstance_ta_size;
169
170extern const TEEC_UUID crypt_user_ta_uuid;
171extern const TEEC_UUID os_test_ta_uuid;
172extern const TEEC_UUID create_fail_test_ta_uuid;
173extern const TEEC_UUID rpc_test_ta_uuid;
174extern const TEEC_UUID sims_test_ta_uuid;
175extern const TEEC_UUID gp_tta_testing_client_api_uuid;
176extern const TEEC_UUID gp_tta_answer_success_to_open_session_invoke_uuid;
177extern const TEEC_UUID gp_tta_answer_error_to_invoke_uuid;
178extern const TEEC_UUID gp_tta_answer_error_to_open_session_uuid;
179extern const TEEC_UUID gp_tta_check_OpenSession_with_4_parameters_uuid;
180extern const TEEC_UUID gp_tta_ds_uuid;
181extern const TEEC_UUID storage_ta_uuid;
182extern const TEEC_UUID enc_fs_key_manager_test_ta_uuid;
183extern const TEEC_UUID ecc_test_ta_uuid;
184extern const TEEC_UUID gp_tta_time_uuid;
185extern char *_device;
186
187#endif /*XTEST_TEST_H*/