Lines Matching refs:cs

83 static void CloseSession_null(struct xtest_session *cs)  in CloseSession_null()  argument
85 Do_ADBG_BeginSubCase(cs->c, "CloseSession_null"); in CloseSession_null()
90 Do_ADBG_EndSubCase(cs->c, "CloseSession_null"); in CloseSession_null()
93 static void Allocate_In(struct xtest_session *cs) in Allocate_In() argument
95 Do_ADBG_BeginSubCase(cs->c, "Allocate_In"); in Allocate_In()
100 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Allocate_In()
101 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Allocate_In()
104 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Allocate_In()
105 AllocateSharedMemory(&cs->context, &shm, size, in Allocate_In()
111 TEEC_FinalizeContext(&cs->context); in Allocate_In()
114 Do_ADBG_EndSubCase(cs->c, "Allocate_In"); in Allocate_In()
117 static void Allocate_out_of_memory(struct xtest_session *cs) in Allocate_out_of_memory() argument
119 Do_ADBG_BeginSubCase(cs->c, "Allocate_out_of_memory"); in Allocate_out_of_memory()
124 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Allocate_out_of_memory()
125 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Allocate_out_of_memory()
128 ADBG_EXPECT_TEEC_RESULT(cs->c, TEEC_ERROR_OUT_OF_MEMORY, in Allocate_out_of_memory()
129 AllocateSharedMemory(&cs->context, &shm, in Allocate_out_of_memory()
132 TEEC_FinalizeContext(&cs->context); in Allocate_out_of_memory()
135 Do_ADBG_EndSubCase(cs->c, "Allocate_out_of_memory"); in Allocate_out_of_memory()
138 static void OpenSession_error_notExistingTA(struct xtest_session *cs) in OpenSession_error_notExistingTA() argument
140 Do_ADBG_BeginSubCase(cs->c, "OpenSession_error_notExistingTA"); in OpenSession_error_notExistingTA()
147 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in OpenSession_error_notExistingTA()
148 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in OpenSession_error_notExistingTA()
151 ADBG_EXPECT_COMPARE_UNSIGNED(cs->c, TEEC_SUCCESS, !=, in OpenSession_error_notExistingTA()
152 TEEC_OpenSession(&cs->context, &cs->session, in OpenSession_error_notExistingTA()
156 ADBG_EXPECT_COMPARE_UNSIGNED(cs->c, TEEC_ORIGIN_TRUSTED_APP, !=, in OpenSession_error_notExistingTA()
158 TEEC_FinalizeContext(&cs->context); in OpenSession_error_notExistingTA()
161 Do_ADBG_EndSubCase(cs->c, "OpenSession_error_notExistingTA"); in OpenSession_error_notExistingTA()
164 static void Allocate_InOut(struct xtest_session *cs) in Allocate_InOut() argument
166 Do_ADBG_BeginSubCase(cs->c, "Allocate_InOut"); in Allocate_InOut()
171 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Allocate_InOut()
172 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Allocate_InOut()
175 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Allocate_InOut()
176 AllocateSharedMemory(&cs->context, &shm, sizeof(val), in Allocate_InOut()
182 TEEC_FinalizeContext(&cs->context); in Allocate_InOut()
185 Do_ADBG_EndSubCase(cs->c, "Allocate_InOut"); in Allocate_InOut()
188 static void Register_In(struct xtest_session *cs) in Register_In() argument
190 Do_ADBG_BeginSubCase(cs->c, "Register_In"); in Register_In()
195 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Register_In()
196 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Register_In()
201 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Register_In()
202 RegisterSharedMemory(&cs->context, &shm, sizeof(val), in Register_In()
208 TEEC_FinalizeContext(&cs->context); in Register_In()
211 Do_ADBG_EndSubCase(cs->c, "Register_In"); in Register_In()
214 static void Register_notZeroLength_Out(struct xtest_session *cs) in Register_notZeroLength_Out() argument
216 Do_ADBG_BeginSubCase(cs->c, "Register_notZeroLength_Out"); in Register_notZeroLength_Out()
221 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Register_notZeroLength_Out()
222 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Register_notZeroLength_Out()
227 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Register_notZeroLength_Out()
228 RegisterSharedMemory(&cs->context, &shm, sizeof(val), in Register_notZeroLength_Out()
234 TEEC_FinalizeContext(&cs->context); in Register_notZeroLength_Out()
237 Do_ADBG_EndSubCase(cs->c, "Register_notZeroLength_Out"); in Register_notZeroLength_Out()
240 static void Register_InOut(struct xtest_session *cs) in Register_InOut() argument
242 Do_ADBG_BeginSubCase(cs->c, "Register_InOut"); in Register_InOut()
247 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Register_InOut()
248 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Register_InOut()
252 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Register_InOut()
253 RegisterSharedMemory(&cs->context, &shm, sizeof(val), in Register_InOut()
259 TEEC_FinalizeContext(&cs->context); in Register_InOut()
262 Do_ADBG_EndSubCase(cs->c, "Register_InOut"); in Register_InOut()
265 static void Register_zeroLength_Out(struct xtest_session *cs) in Register_zeroLength_Out() argument
267 Do_ADBG_BeginSubCase(cs->c, "Register_zeroLength_Out"); in Register_zeroLength_Out()
272 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Register_zeroLength_Out()
273 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Register_zeroLength_Out()
277 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Register_zeroLength_Out()
278 RegisterSharedMemory(&cs->context, &shm, 0, in Register_zeroLength_Out()
284 TEEC_FinalizeContext(&cs->context); in Register_zeroLength_Out()
287 Do_ADBG_EndSubCase(cs->c, "Register_zeroLength_Out"); in Register_zeroLength_Out()
290 static void Allocate_Out(struct xtest_session *cs) in Allocate_Out() argument
292 Do_ADBG_BeginSubCase(cs->c, "Allocate_Out"); in Allocate_Out()
296 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Allocate_Out()
297 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Allocate_Out()
300 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Allocate_Out()
301 AllocateSharedMemory(&cs->context, &shm, 0, in Allocate_Out()
307 TEEC_FinalizeContext(&cs->context); in Allocate_Out()
310 Do_ADBG_EndSubCase(cs->c, "Allocate_Out"); in Allocate_Out()
313 static void FinalizeContext_null(struct xtest_session *cs) in FinalizeContext_null() argument
315 Do_ADBG_BeginSubCase(cs->c, "FinalizeContext_null"); in FinalizeContext_null()
319 Do_ADBG_EndSubCase(cs->c, "FinalizeContext_null"); in FinalizeContext_null()
322 static void InitializeContext_NotExistingTEE(struct xtest_session *cs) in InitializeContext_NotExistingTEE() argument
324 Do_ADBG_BeginSubCase(cs->c, "InitializeContext_NotExistingTEE"); in InitializeContext_NotExistingTEE()
326 if (!ADBG_EXPECT_COMPARE_UNSIGNED(cs->c, TEEC_SUCCESS, !=, in InitializeContext_NotExistingTEE()
328 &cs->context))) in InitializeContext_NotExistingTEE()
329 TEEC_FinalizeContext(&cs->context); in InitializeContext_NotExistingTEE()
331 Do_ADBG_EndSubCase(cs->c, "InitializeContext_NotExistingTEE"); in InitializeContext_NotExistingTEE()
334 static void AllocateThenRegister_SameMemory(struct xtest_session *cs) in AllocateThenRegister_SameMemory() argument
336 Do_ADBG_BeginSubCase(cs->c, "AllocateThenRegister_SameMemory"); in AllocateThenRegister_SameMemory()
341 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in AllocateThenRegister_SameMemory()
342 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in AllocateThenRegister_SameMemory()
345 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in AllocateThenRegister_SameMemory()
346 AllocateSharedMemory(&cs->context, &shm, in AllocateThenRegister_SameMemory()
350 ADBG_EXPECT_TEEC_SUCCESS(cs->c, in AllocateThenRegister_SameMemory()
351 RegisterSharedMemory(&cs->context, &shm, in AllocateThenRegister_SameMemory()
356 TEEC_FinalizeContext(&cs->context); in AllocateThenRegister_SameMemory()
359 Do_ADBG_EndSubCase(cs->c, "AllocateThenRegister_SameMemory"); in AllocateThenRegister_SameMemory()
362 static void AllocateSameMemory_twice(struct xtest_session *cs) in AllocateSameMemory_twice() argument
364 Do_ADBG_BeginSubCase(cs->c, "AllocateSameMemory_twice"); in AllocateSameMemory_twice()
369 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in AllocateSameMemory_twice()
370 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in AllocateSameMemory_twice()
373 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in AllocateSameMemory_twice()
374 AllocateSharedMemory(&cs->context, &shm, in AllocateSameMemory_twice()
378 ADBG_EXPECT_TEEC_SUCCESS(cs->c, in AllocateSameMemory_twice()
379 AllocateSharedMemory(&cs->context, &shm, in AllocateSameMemory_twice()
384 TEEC_FinalizeContext(&cs->context); in AllocateSameMemory_twice()
387 Do_ADBG_EndSubCase(cs->c, "AllocateSameMemory_twice"); in AllocateSameMemory_twice()
390 static void RegisterSameMemory_twice(struct xtest_session *cs) in RegisterSameMemory_twice() argument
392 Do_ADBG_BeginSubCase(cs->c, "RegisterSameMemory_twice"); in RegisterSameMemory_twice()
397 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in RegisterSameMemory_twice()
398 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in RegisterSameMemory_twice()
402 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in RegisterSameMemory_twice()
403 RegisterSharedMemory(&cs->context, &shm, sizeof(val), in RegisterSameMemory_twice()
407 ADBG_EXPECT_TEEC_SUCCESS(cs->c, in RegisterSameMemory_twice()
408 RegisterSharedMemory(&cs->context, &shm, sizeof(val), in RegisterSameMemory_twice()
413 TEEC_FinalizeContext(&cs->context); in RegisterSameMemory_twice()
416 Do_ADBG_EndSubCase(cs->c, "RegisterSameMemory_twice"); in RegisterSameMemory_twice()
423 static void Allocate_sharedMemory_32k(struct xtest_session *cs) in Allocate_sharedMemory_32k() argument
425 Do_ADBG_BeginSubCase(cs->c, "Allocate_sharedMemory_32k"); in Allocate_sharedMemory_32k()
431 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Allocate_sharedMemory_32k()
432 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Allocate_sharedMemory_32k()
435 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Allocate_sharedMemory_32k()
436 AllocateSharedMemory(&cs->context, &shm, size, in Allocate_sharedMemory_32k()
442 TEEC_FinalizeContext(&cs->context); in Allocate_sharedMemory_32k()
445 Do_ADBG_EndSubCase(cs->c, "Allocate_sharedMemory_32k"); in Allocate_sharedMemory_32k()
450 static void Register_sharedMemory_32k(struct xtest_session *cs) in Register_sharedMemory_32k() argument
452 Do_ADBG_BeginSubCase(cs->c, "Register_sharedMemory_32k"); in Register_sharedMemory_32k()
457 if (!ADBG_EXPECT(cs->c, TEEC_SUCCESS, in Register_sharedMemory_32k()
458 TEEC_InitializeContext(xtest_tee_name, &cs->context))) in Register_sharedMemory_32k()
462 if (!ADBG_EXPECT_TEEC_SUCCESS(cs->c, in Register_sharedMemory_32k()
463 RegisterSharedMemory(&cs->context, &shm, SHM_32K_SIZE, in Register_sharedMemory_32k()
469 TEEC_FinalizeContext(&cs->context); in Register_sharedMemory_32k()
472 Do_ADBG_EndSubCase(cs->c, "Register_sharedMemory_32k"); in Register_sharedMemory_32k()