Lines Matching refs:ctx
40 TEEC_Context ctx; member
44 void prepare_tee_session(struct test_ctx *ctx) in prepare_tee_session() argument
51 res = TEEC_InitializeContext(NULL, &ctx->ctx); in prepare_tee_session()
56 res = TEEC_OpenSession(&ctx->ctx, &ctx->sess, &uuid, in prepare_tee_session()
63 void terminate_tee_session(struct test_ctx *ctx) in terminate_tee_session() argument
65 TEEC_CloseSession(&ctx->sess); in terminate_tee_session()
66 TEEC_FinalizeContext(&ctx->ctx); in terminate_tee_session()
69 TEEC_Result read_secure_object(struct test_ctx *ctx, char *id, in read_secure_object() argument
88 res = TEEC_InvokeCommand(&ctx->sess, in read_secure_object()
103 TEEC_Result write_secure_object(struct test_ctx *ctx, char *id, in write_secure_object() argument
122 res = TEEC_InvokeCommand(&ctx->sess, in write_secure_object()
138 TEEC_Result delete_secure_object(struct test_ctx *ctx, char *id) in delete_secure_object() argument
152 res = TEEC_InvokeCommand(&ctx->sess, in delete_secure_object()
171 struct test_ctx ctx; in main() local
179 prepare_tee_session(&ctx); in main()
190 res = write_secure_object(&ctx, obj1_id, in main()
197 res = read_secure_object(&ctx, obj1_id, in main()
206 res = delete_secure_object(&ctx, obj1_id); in main()
215 res = read_secure_object(&ctx, obj2_id, in main()
225 res = write_secure_object(&ctx, obj2_id, in main()
233 res = delete_secure_object(&ctx, obj2_id); in main()
239 terminate_tee_session(&ctx); in main()