Lines Matching refs:aux

92 static TEE_Result test_read_init(void *aux, struct tee_fs_rpc_operation *op,  in test_read_init()  argument
97 struct test_aux *a = aux; in test_read_init()
104 op->params[0].u.value.a = (vaddr_t)aux; in test_read_init()
136 static TEE_Result test_write_init(void *aux, struct tee_fs_rpc_operation *op, in test_write_init() argument
140 return test_read_init(aux, op, type, idx, vers, data); in test_write_init()
254 static TEE_Result htree_test_rewrite(struct test_aux *aux, size_t num_blocks, in htree_test_rewrite() argument
266 aux->data_len = 0; in htree_test_rewrite()
267 memset(aux->data, 0xce, aux->data_alloced); in htree_test_rewrite()
269 res = tee_fs_htree_open(true, hash, 0, uuid, &test_htree_ops, aux, &ht); in htree_test_rewrite()
318 res = tee_fs_htree_open(false, hash, 0, uuid, &test_htree_ops, aux, in htree_test_rewrite()
367 res = tee_fs_htree_open(false, hash, 0, uuid, &test_htree_ops, aux, in htree_test_rewrite()
380 res = tee_fs_htree_open(false, NULL, 0, uuid, &test_htree_ops, aux, in htree_test_rewrite()
398 static void aux_free(struct test_aux *aux) in aux_free() argument
400 if (aux) { in aux_free()
401 free(aux->data); in aux_free()
402 free(aux->block); in aux_free()
403 free(aux); in aux_free()
409 struct test_aux *aux = NULL; in aux_alloc() local
416 aux = calloc(1, sizeof(*aux)); in aux_alloc()
417 if (!aux) in aux_alloc()
420 aux->data_alloced = o + sz; in aux_alloc()
421 aux->data = malloc(aux->data_alloced); in aux_alloc()
422 if (!aux->data) in aux_alloc()
425 aux->block = malloc(TEST_BLOCK_SIZE); in aux_alloc()
426 if (!aux->block) in aux_alloc()
429 return aux; in aux_alloc()
431 aux_free(aux); in aux_alloc()
438 struct test_aux *aux = aux_alloc(num_blocks); in test_write_read() local
444 if (!aux) in test_write_read()
457 res = htree_test_rewrite(aux, n, m, o); in test_write_read()
465 aux_free(aux); in test_write_read()
470 size_t num_blocks, struct test_aux *aux, in test_corrupt_type() argument
474 struct test_aux aux2 = *aux; in test_corrupt_type()
484 aux2.data = malloc(aux->data_alloced); in test_corrupt_type()
490 memcpy(aux2.data, aux->data, aux->data_len); in test_corrupt_type()
565 struct test_aux *aux = NULL; in test_corrupt() local
568 aux = aux_alloc(num_blocks); in test_corrupt()
569 if (!aux) { in test_corrupt()
574 aux->data_len = 0; in test_corrupt()
575 memset(aux->data, 0xce, aux->data_alloced); in test_corrupt()
578 res = tee_fs_htree_open(true, hash, 0, uuid, &test_htree_ops, aux, &ht); in test_corrupt()
587 res = tee_fs_htree_open(false, hash, 0, uuid, &test_htree_ops, aux, in test_corrupt()
594 res = test_corrupt_type(uuid, hash, num_blocks, aux, in test_corrupt()
598 res = test_corrupt_type(uuid, hash, num_blocks, aux, in test_corrupt()
603 res = test_corrupt_type(uuid, hash, num_blocks, aux, in test_corrupt()
610 aux_free(aux); in test_corrupt()