blob: 77ec663c30ce8a83e04158228bcded32575fd3c0 [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>
18#include "adbg_case_declare.h"
19
20/*ADBG Cases declaration.*/
21ADBG_CASE_DECLARE(XTEST_TEE_1001);
22ADBG_CASE_DECLARE(XTEST_TEE_1004);
23ADBG_CASE_DECLARE(XTEST_TEE_1005);
24ADBG_CASE_DECLARE(XTEST_TEE_1006);
25ADBG_CASE_DECLARE(XTEST_TEE_1007);
26ADBG_CASE_DECLARE(XTEST_TEE_1008);
27ADBG_CASE_DECLARE(XTEST_TEE_1009);
28ADBG_CASE_DECLARE(XTEST_TEE_1010);
29ADBG_CASE_DECLARE(XTEST_TEE_1011);
30ADBG_CASE_DECLARE(XTEST_TEE_1012);
31
32ADBG_CASE_DECLARE(XTEST_TEE_2001);
33ADBG_CASE_DECLARE(XTEST_TEE_2002);
34
35ADBG_CASE_DECLARE(XTEST_TEE_4001);
36ADBG_CASE_DECLARE(XTEST_TEE_4002);
37ADBG_CASE_DECLARE(XTEST_TEE_4003_NO_XTS);
38ADBG_CASE_DECLARE(XTEST_TEE_4003_XTS);
39ADBG_CASE_DECLARE(XTEST_TEE_4004);
40ADBG_CASE_DECLARE(XTEST_TEE_4005);
41ADBG_CASE_DECLARE(XTEST_TEE_4006);
42ADBG_CASE_DECLARE(XTEST_TEE_4007);
43ADBG_CASE_DECLARE(XTEST_TEE_4008);
Pascal Brand2b92b642015-07-16 13:29:42 +020044ADBG_CASE_DECLARE(XTEST_TEE_4009);
Pascal Brandc639ac82015-07-02 08:53:34 +020045
46ADBG_CASE_DECLARE(XTEST_TEE_5006);
47
48ADBG_CASE_DECLARE(XTEST_TEE_6001);
49ADBG_CASE_DECLARE(XTEST_TEE_6002);
50ADBG_CASE_DECLARE(XTEST_TEE_6003);
51ADBG_CASE_DECLARE(XTEST_TEE_6004);
52ADBG_CASE_DECLARE(XTEST_TEE_6005);
53ADBG_CASE_DECLARE(XTEST_TEE_6006);
54ADBG_CASE_DECLARE(XTEST_TEE_6007);
55ADBG_CASE_DECLARE(XTEST_TEE_6008);
56ADBG_CASE_DECLARE(XTEST_TEE_6009);
57ADBG_CASE_DECLARE(XTEST_TEE_7001);
58ADBG_CASE_DECLARE(XTEST_TEE_7002);
59ADBG_CASE_DECLARE(XTEST_TEE_7003);
60ADBG_CASE_DECLARE(XTEST_TEE_7004);
61ADBG_CASE_DECLARE(XTEST_TEE_7005);
62ADBG_CASE_DECLARE(XTEST_TEE_7006);
63ADBG_CASE_DECLARE(XTEST_TEE_7007);
64ADBG_CASE_DECLARE(XTEST_TEE_7008);
65ADBG_CASE_DECLARE(XTEST_TEE_7009);
66ADBG_CASE_DECLARE(XTEST_TEE_7010);
67ADBG_CASE_DECLARE(XTEST_TEE_7013);
68ADBG_CASE_DECLARE(XTEST_TEE_7016);
69ADBG_CASE_DECLARE(XTEST_TEE_7017);
70ADBG_CASE_DECLARE(XTEST_TEE_7018);
71ADBG_CASE_DECLARE(XTEST_TEE_7019);
72
73ADBG_CASE_DECLARE(XTEST_TEE_10001);
74ADBG_CASE_DECLARE(XTEST_TEE_10002);
75ADBG_CASE_DECLARE(XTEST_TEE_10003);
76
77ADBG_CASE_DECLARE_AUTO_GENERATED_TESTS()
78
79/* TEEC_Result */
80ADBG_ENUM_TABLE_DECLARE(TEEC_Result);
81
82#define ADBG_EXPECT_TEEC_RESULT(c, exp, got) \
83 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_Result)
84
85#define ADBG_EXPECT_TEEC_SUCCESS(c, got) \
86 ADBG_EXPECT_ENUM(c, TEEC_SUCCESS, got, ADBG_EnumTable_TEEC_Result)
87
88/* TEEC_ErrorOrigin */
89ADBG_ENUM_TABLE_DECLARE(TEEC_ErrorOrigin);
90
91#define ADBG_EXPECT_TEEC_ERROR_ORIGIN(c, exp, got) \
92 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_TEEC_ErrorOrigin)
93
94/* bass_return_code */
95ADBG_ENUM_TABLE_DECLARE(bass_return_code);
96
97#define ADBG_EXPECT_BASS_RETURN_CODE(c, exp, got) \
98 ADBG_EXPECT_ENUM(c, exp, got, ADBG_EnumTable_bass_return_code)
99
100#define ADBG_EXPECT_BASS_RC_SUCCESS(c, got) \
101 ADBG_EXPECT_ENUM(c, BASS_RC_SUCCESS, got, \
102 ADBG_EnumTable_bass_return_code)
103
104
105extern const char crypt_user_ta[];
106extern const unsigned int crypt_user_ta_size;
107
108extern const char os_test_ta[];
109extern const unsigned int os_test_ta_size;
110
111extern const char create_fail_test_ta[];
112extern const unsigned int create_fail_test_ta_size;
113
114extern const char rpc_test_ta[];
115extern const unsigned int rpc_test_ta_size;
116
117extern const char sims_test_ta[];
118extern const unsigned int sims_test_ta_size;
119
120extern const char gp_tta_testing_client_api_ta[];
121extern const unsigned int gp_tta_testing_client_api_ta_size;
122
123extern const char gp_tta_answer_success_to_open_session_invoke_ta[];
124extern const unsigned int gp_tta_answer_success_to_open_session_invoke_ta_size;
125
126extern const char gp_tta_answer_error_to_invoke_ta[];
127extern const unsigned int gp_tta_answer_error_to_invoke_ta_size;
128
129extern const char gp_tta_answer_error_to_open_session_ta[];
130extern const unsigned int gp_tta_answer_error_to_open_session_ta_size;
131
132extern const char gp_tta_check_open_session_with_4_parameters_ta[];
133extern const unsigned int gp_tta_check_open_session_with_4_parameters_ta_size;
134
135extern const char gp_tta_ds_ta[];
136extern const unsigned int gp_tta_ds_ta_size;
137
138extern const char storage_ta[];
139extern const unsigned int storage_ta_size;
140
141extern const char gp_tta_time_ta[];
142extern const unsigned int gp_tta_time_ta_size;
143
144extern const char gp_tta_tcf_ta[];
145extern const unsigned int gp_tta_tcf_ta_size;
146
147extern const char gp_tta_crypto_ta[];
148extern const unsigned int gp_tta_crypto_ta_size;
149
150extern const char gp_tta_arithm_ta[];
151extern const unsigned int gp_tta_arithm_ta_size;
152
153extern const char gp_tta_ica_ta[];
154extern const unsigned int gp_tta_ica_ta_size;
155
156extern const char gp_tta_ica2_ta[];
157extern const unsigned int gp_tta_ica2_ta_size;
158
159extern const char gp_tta_tcf_singleinstance_ta[];
160extern const unsigned int gp_tta_tcf_singleinstance_ta_size;
161
162extern const char gp_tta_tcf_multipleinstance_ta[];
163extern const unsigned int gp_tta_tcf_multipleinstance_ta_size;
164
165extern const TEEC_UUID crypt_user_ta_uuid;
166extern const TEEC_UUID os_test_ta_uuid;
167extern const TEEC_UUID create_fail_test_ta_uuid;
168extern const TEEC_UUID rpc_test_ta_uuid;
169extern const TEEC_UUID sims_test_ta_uuid;
170extern const TEEC_UUID gp_tta_testing_client_api_uuid;
171extern const TEEC_UUID gp_tta_answer_success_to_open_session_invoke_uuid;
172extern const TEEC_UUID gp_tta_answer_error_to_invoke_uuid;
173extern const TEEC_UUID gp_tta_answer_error_to_open_session_uuid;
174extern const TEEC_UUID gp_tta_check_OpenSession_with_4_parameters_uuid;
175extern const TEEC_UUID gp_tta_ds_uuid;
176extern const TEEC_UUID storage_ta_uuid;
177extern const TEEC_UUID enc_fs_key_manager_test_ta_uuid;
178extern const TEEC_UUID ecc_test_ta_uuid;
179extern const TEEC_UUID gp_tta_time_uuid;
180extern char *_device;
181
182#endif /*XTEST_TEST_H*/