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