Lines Matching refs:sess
101 static TEEC_Result fs_open(TEEC_Session *sess, void *id, uint32_t id_size, in fs_open() argument
118 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_OPEN, &op, &org); in fs_open()
126 static TEEC_Result fs_create(TEEC_Session *sess, void *id, uint32_t id_size, in fs_create() argument
148 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_CREATE, &op, &org); in fs_create()
156 static TEEC_Result fs_create_overwrite(TEEC_Session *sess, void *id, in fs_create_overwrite() argument
171 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_CREATE_OVERWRITE, &op, &org); in fs_create_overwrite()
176 static TEEC_Result fs_close(TEEC_Session *sess, uint32_t obj) in fs_close() argument
186 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_CLOSE, &op, &org); in fs_close()
189 static TEEC_Result fs_read(TEEC_Session *sess, uint32_t obj, void *data, in fs_read() argument
205 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_READ, &op, &org); in fs_read()
213 static TEEC_Result fs_write(TEEC_Session *sess, uint32_t obj, void *data, in fs_write() argument
228 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_WRITE, &op, &org); in fs_write()
231 static TEEC_Result fs_seek(TEEC_Session *sess, uint32_t obj, int32_t offset, in fs_seek() argument
244 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_SEEK, &op, &org); in fs_seek()
247 static TEEC_Result fs_unlink(TEEC_Session *sess, uint32_t obj) in fs_unlink() argument
257 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_UNLINK, &op, &org); in fs_unlink()
260 static TEEC_Result fs_trunc(TEEC_Session *sess, uint32_t obj, uint32_t len) in fs_trunc() argument
271 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_TRUNC, &op, &org); in fs_trunc()
274 static TEEC_Result fs_rename(TEEC_Session *sess, uint32_t obj, void *id, in fs_rename() argument
288 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_RENAME, &op, &org); in fs_rename()
291 static TEEC_Result fs_alloc_enum(TEEC_Session *sess, uint32_t *e) in fs_alloc_enum() argument
300 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_ALLOC_ENUM, &op, &org); in fs_alloc_enum()
308 static TEEC_Result fs_reset_enum(TEEC_Session *sess, uint32_t e) in fs_reset_enum() argument
318 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_RESET_ENUM, &op, &org); in fs_reset_enum()
323 static TEEC_Result fs_free_enum(TEEC_Session *sess, uint32_t e) in fs_free_enum() argument
333 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_FREE_ENUM, &op, &org); in fs_free_enum()
336 static TEEC_Result fs_start_enum(TEEC_Session *sess, uint32_t e, in fs_start_enum() argument
348 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_START_ENUM, &op, &org); in fs_start_enum()
351 static TEEC_Result fs_next_enum(TEEC_Session *sess, uint32_t e, void *obj_info, in fs_next_enum() argument
368 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_NEXT_ENUM, &op, &org); in fs_next_enum()
371 static TEEC_Result fs_restrict_usage(TEEC_Session *sess, uint32_t obj, in fs_restrict_usage() argument
383 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_RESTRICT_USAGE, in fs_restrict_usage()
387 static TEEC_Result fs_alloc_obj(TEEC_Session *sess, uint32_t obj_type, in fs_alloc_obj() argument
400 res = TEEC_InvokeCommand(sess, TA_STORAGE_CMD_ALLOC_OBJ, &op, &org); in fs_alloc_obj()
405 static TEEC_Result fs_free_obj(TEEC_Session *sess, uint32_t obj) in fs_free_obj() argument
415 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_FREE_OBJ, &op, &org); in fs_free_obj()
418 static TEEC_Result fs_reset_obj(TEEC_Session *sess, uint32_t obj) in fs_reset_obj() argument
428 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_RESET_OBJ, &op, &org); in fs_reset_obj()
431 static TEEC_Result fs_get_obj_info(TEEC_Session *sess, uint32_t obj, in fs_get_obj_info() argument
445 return TEEC_InvokeCommand(sess, TA_STORAGE_CMD_GET_OBJ_INFO, &op, &org); in fs_get_obj_info()
451 TEEC_Session sess = { }; in test_truncate_file_length() local
458 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in test_truncate_file_length()
463 fs_create(&sess, file_01, sizeof(file_01), in test_truncate_file_length()
471 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_trunc(&sess, obj, 10))) in test_truncate_file_length()
476 c, fs_seek(&sess, obj, 5, TEE_DATA_SEEK_SET))) in test_truncate_file_length()
480 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in test_truncate_file_length()
487 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in test_truncate_file_length()
491 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_open(&sess, file_01, sizeof(file_01), in test_truncate_file_length()
499 c, fs_seek(&sess, obj, 5, TEE_DATA_SEEK_SET))) in test_truncate_file_length()
503 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in test_truncate_file_length()
510 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in test_truncate_file_length()
514 TEEC_CloseSession(&sess); in test_truncate_file_length()
520 TEEC_Session sess = { }; in test_extend_file_length() local
528 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in test_extend_file_length()
533 fs_create(&sess, file_01, sizeof(file_01), in test_extend_file_length()
541 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_trunc(&sess, obj, 40))) in test_extend_file_length()
546 c, fs_seek(&sess, obj, 30, TEE_DATA_SEEK_SET))) in test_extend_file_length()
550 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in test_extend_file_length()
559 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in test_extend_file_length()
563 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_open(&sess, file_01, sizeof(file_01), in test_extend_file_length()
571 c, fs_seek(&sess, obj, 30, TEE_DATA_SEEK_SET))) in test_extend_file_length()
575 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in test_extend_file_length()
584 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in test_extend_file_length()
588 TEEC_CloseSession(&sess); in test_extend_file_length()
594 TEEC_Session sess = { }; in test_file_hole() local
602 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in test_file_hole()
607 fs_create(&sess, file_01, sizeof(file_01), in test_file_hole()
616 c, fs_seek(&sess, obj, 80, TEE_DATA_SEEK_SET))) in test_file_hole()
620 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_write(&sess, obj, data_00, in test_file_hole()
626 c, fs_seek(&sess, obj, 74, TEE_DATA_SEEK_SET))) in test_file_hole()
630 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in test_file_hole()
641 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in test_file_hole()
645 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_open(&sess, file_01, sizeof(file_01), in test_file_hole()
653 c, fs_seek(&sess, obj, 74, TEE_DATA_SEEK_SET))) in test_file_hole()
657 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in test_file_hole()
668 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in test_file_hole()
672 TEEC_CloseSession(&sess); in test_file_hole()
678 TEEC_Session sess = { }; in xtest_tee_test_6001_single() local
683 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6001_single()
687 fs_create(&sess, file_00, sizeof(file_00), in xtest_tee_test_6001_single()
694 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6001_single()
698 TEEC_CloseSession(&sess); in xtest_tee_test_6001_single()
707 TEEC_Session sess = { }; in xtest_tee_test_6002_single() local
712 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6002_single()
716 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6002_single()
721 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6002_single()
725 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6002_single()
729 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6002_single()
733 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6002_single()
738 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6002_single()
742 TEEC_CloseSession(&sess); in xtest_tee_test_6002_single()
751 TEEC_Session sess = { }; in xtest_tee_test_6003_single() local
758 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6003_single()
762 fs_create(&sess, file_02, sizeof(file_02), in xtest_tee_test_6003_single()
767 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6003_single()
771 fs_open(&sess, file_02, sizeof(file_02), in xtest_tee_test_6003_single()
776 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in xtest_tee_test_6003_single()
782 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6003_single()
786 TEEC_CloseSession(&sess); in xtest_tee_test_6003_single()
795 TEEC_Session sess = { }; in xtest_tee_test_6004_single() local
802 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6004_single()
807 fs_create(&sess, file_02, sizeof(file_02), in xtest_tee_test_6004_single()
812 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6004_single()
817 fs_open(&sess, file_02, sizeof(file_02), in xtest_tee_test_6004_single()
822 fs_write(&sess, obj, data_00, sizeof(data_00)))) in xtest_tee_test_6004_single()
825 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6004_single()
830 fs_open(&sess, file_02, sizeof(file_02), in xtest_tee_test_6004_single()
835 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in xtest_tee_test_6004_single()
841 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6004_single()
845 TEEC_CloseSession(&sess); in xtest_tee_test_6004_single()
854 TEEC_Session sess = { }; in xtest_tee_test_6005_single() local
861 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6005_single()
866 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6005_single()
875 fs_seek(&sess, obj, 10, TEE_DATA_SEEK_SET))) in xtest_tee_test_6005_single()
879 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in xtest_tee_test_6005_single()
885 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6005_single()
889 TEEC_CloseSession(&sess); in xtest_tee_test_6005_single()
898 TEEC_Session sess = { }; in xtest_tee_test_6006_single() local
903 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6006_single()
908 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6006_single()
914 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6006_single()
919 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6006_single()
924 TEEC_CloseSession(&sess); in xtest_tee_test_6006_single()
950 TEEC_Session sess = { }; in xtest_tee_test_6008_single() local
957 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6008_single()
962 fs_create(&sess, file_02, sizeof(file_02), in xtest_tee_test_6008_single()
967 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6008_single()
971 fs_open(&sess, file_02, sizeof(file_02), in xtest_tee_test_6008_single()
978 fs_write(&sess, obj, data_00, sizeof(data_00)))) in xtest_tee_test_6008_single()
982 fs_rename(&sess, obj, file_03, sizeof(file_03)))) in xtest_tee_test_6008_single()
986 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6008_single()
991 fs_open(&sess, file_03, sizeof(file_03), in xtest_tee_test_6008_single()
996 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in xtest_tee_test_6008_single()
1003 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6008_single()
1007 TEEC_CloseSession(&sess); in xtest_tee_test_6008_single()
1015 TEEC_Session sess = { }; in xtest_tee_test_6009_single() local
1025 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6009_single()
1030 fs_create(&sess, file_00, sizeof(file_00), in xtest_tee_test_6009_single()
1037 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6009_single()
1044 fs_create(&sess, file_02, sizeof(file_02), in xtest_tee_test_6009_single()
1049 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj0))) in xtest_tee_test_6009_single()
1052 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj1))) in xtest_tee_test_6009_single()
1055 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj2))) in xtest_tee_test_6009_single()
1059 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_alloc_enum(&sess, &e))) in xtest_tee_test_6009_single()
1062 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_start_enum(&sess, e, storage_id))) in xtest_tee_test_6009_single()
1067 fs_next_enum(&sess, e, info, sizeof(info), id, sizeof(id)))) in xtest_tee_test_6009_single()
1072 fs_next_enum(&sess, e, NULL, 0, id, sizeof(id)))) in xtest_tee_test_6009_single()
1077 fs_next_enum(&sess, e, info, sizeof(info), id, sizeof(id)))) in xtest_tee_test_6009_single()
1082 fs_next_enum(&sess, e, info, sizeof(info), id, sizeof(id)))) in xtest_tee_test_6009_single()
1085 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_free_enum(&sess, e))) in xtest_tee_test_6009_single()
1090 fs_open(&sess, file_00, sizeof(file_00), in xtest_tee_test_6009_single()
1094 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj0))) in xtest_tee_test_6009_single()
1098 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6009_single()
1102 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj1))) in xtest_tee_test_6009_single()
1106 fs_open(&sess, file_02, sizeof(file_02), in xtest_tee_test_6009_single()
1110 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj2))) in xtest_tee_test_6009_single()
1114 TEEC_CloseSession(&sess); in xtest_tee_test_6009_single()
1122 TEEC_Session sess = { }; in xtest_tee_test_6010_single() local
1136 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6010_single()
1148 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1153 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1156 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o1)); in xtest_tee_test_6010_single()
1158 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o2)); in xtest_tee_test_6010_single()
1166 fs_restrict_usage(&sess, 0xffffbad0, 0xffffffff)); in xtest_tee_test_6010_single()
1169 TEEC_CloseSession(&sess); in xtest_tee_test_6010_single()
1171 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6010_single()
1176 fs_seek(&sess, 0xffffbad0, 5, TEE_DATA_SEEK_SET)); in xtest_tee_test_6010_single()
1179 TEEC_CloseSession(&sess); in xtest_tee_test_6010_single()
1181 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6010_single()
1187 fs_alloc_obj(&sess, TEE_TYPE_AES, 256, &o1)); in xtest_tee_test_6010_single()
1189 fs_seek(&sess, o1, 5, TEE_DATA_SEEK_SET)); in xtest_tee_test_6010_single()
1192 TEEC_CloseSession(&sess); in xtest_tee_test_6010_single()
1194 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6010_single()
1203 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1208 fs_seek(&sess, o1, 2, TEE_DATA_SEEK_SET))) in xtest_tee_test_6010_single()
1212 fs_seek(&sess, o1, 0, TEE_DATA_SEEK_END))) in xtest_tee_test_6010_single()
1216 fs_write(&sess, o1, data, sizeof(data)))) in xtest_tee_test_6010_single()
1220 fs_seek(&sess, o1, sizeof(data), TEE_DATA_SEEK_SET))) in xtest_tee_test_6010_single()
1225 fs_read(&sess, o1, out, sizeof(out), &n))) in xtest_tee_test_6010_single()
1231 fs_seek(&sess, o1, 10, TEE_DATA_SEEK_END))) in xtest_tee_test_6010_single()
1235 fs_read(&sess, o1, out, sizeof(out), &n))) in xtest_tee_test_6010_single()
1240 fs_seek(&sess, o1, -(int32_t)sizeof(data) / 2, in xtest_tee_test_6010_single()
1246 fs_read(&sess, o1, out, sizeof(out) / 2, &n))) in xtest_tee_test_6010_single()
1254 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o1)); in xtest_tee_test_6010_single()
1265 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1268 fs_create(&sess, file_01, sizeof(file_01), f, 0, data, in xtest_tee_test_6010_single()
1272 fs_rename(&sess, o2, file_00, sizeof(file_00))); in xtest_tee_test_6010_single()
1274 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o1)); in xtest_tee_test_6010_single()
1275 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o2)); in xtest_tee_test_6010_single()
1287 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1289 ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, o1)); in xtest_tee_test_6010_single()
1292 fs_create(&sess, file_01, sizeof(file_01), f, 0, data, in xtest_tee_test_6010_single()
1295 fs_rename(&sess, o2, file_00, sizeof(file_00))); in xtest_tee_test_6010_single()
1298 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1301 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o1)); in xtest_tee_test_6010_single()
1302 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o2)); in xtest_tee_test_6010_single()
1309 ADBG_EXPECT_TEEC_SUCCESS(c, fs_alloc_enum(&sess, &e)); in xtest_tee_test_6010_single()
1310 ADBG_EXPECT_TEEC_SUCCESS(c, fs_reset_enum(&sess, e)); in xtest_tee_test_6010_single()
1316 ADBG_EXPECT_TEEC_SUCCESS(c, fs_alloc_enum(&sess, &e)); in xtest_tee_test_6010_single()
1318 fs_next_enum(&sess, e, NULL, 0, out, sizeof(out))); in xtest_tee_test_6010_single()
1320 fs_start_enum(&sess, e, storage_id)); in xtest_tee_test_6010_single()
1321 ADBG_EXPECT_TEEC_SUCCESS(c, fs_free_enum(&sess, e)); in xtest_tee_test_6010_single()
1330 fs_create(&sess, file_00, sizeof(file_00), f, 0, data, in xtest_tee_test_6010_single()
1333 fs_rename(&sess, o1, file_01, sizeof(file_01))); in xtest_tee_test_6010_single()
1334 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, o1)); in xtest_tee_test_6010_single()
1338 ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, TEE_HANDLE_NULL)); in xtest_tee_test_6010_single()
1339 ADBG_EXPECT_TEEC_SUCCESS(c, fs_free_obj(&sess, TEE_HANDLE_NULL)); in xtest_tee_test_6010_single()
1340 ADBG_EXPECT_TEEC_SUCCESS(c, fs_reset_obj(&sess, TEE_HANDLE_NULL)); in xtest_tee_test_6010_single()
1343 TEEC_CloseSession(&sess); in xtest_tee_test_6010_single()
1350 TEEC_Session sess = { }; in xtest_tee_test_6012_single() local
1358 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6012_single()
1362 fs_create_overwrite(&sess, file_04, sizeof(file_04), storage_id))) in xtest_tee_test_6012_single()
1365 TEEC_CloseSession(&sess); in xtest_tee_test_6012_single()
1371 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6012_single()
1375 fs_create_overwrite(&sess, file_04, sizeof(file_04), in xtest_tee_test_6012_single()
1381 fs_create(&sess, file_04, sizeof(file_04), in xtest_tee_test_6012_single()
1388 TEEC_CloseSession(&sess); in xtest_tee_test_6012_single()
1395 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6012_single()
1399 fs_create(&sess, file_04, sizeof(file_04), in xtest_tee_test_6012_single()
1406 fs_open(&sess, file_04, sizeof(file_04), in xtest_tee_test_6012_single()
1414 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj)); in xtest_tee_test_6012_single()
1416 TEEC_CloseSession(&sess); in xtest_tee_test_6012_single()
1424 TEEC_Session sess = { }; in xtest_tee_test_6013_single() local
1429 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6013_single()
1437 TEEC_InvokeCommand(&sess, TA_STORAGE_CMD_KEY_IN_PERSISTENT, in xtest_tee_test_6013_single()
1440 TEEC_CloseSession(&sess); in xtest_tee_test_6013_single()
1448 TEEC_Session sess = { }; in xtest_tee_test_6014_single() local
1453 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6014_single()
1461 TEEC_InvokeCommand(&sess, TA_STORAGE_CMD_LOOP, &op, &orig)); in xtest_tee_test_6014_single()
1463 TEEC_CloseSession(&sess); in xtest_tee_test_6014_single()
1471 TEEC_Session sess = { }; in xtest_tee_test_6015_single() local
1478 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6015_single()
1488 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6015_single()
1502 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj)); in xtest_tee_test_6015_single()
1506 TEEC_CloseSession(&sess); in xtest_tee_test_6015_single()
1521 TEEC_Session sess = a->session; in test_6016_thread() local
1528 fs_create(&sess, a->file_name, sizeof(a->file_name), in test_6016_thread()
1533 if (!ADBG_EXPECT_TEEC_SUCCESS(a->case_t, fs_close(&sess, obj))) in test_6016_thread()
1538 fs_open(&sess, a->file_name, sizeof(a->file_name), in test_6016_thread()
1543 fs_write(&sess, obj, data_00, sizeof(data_00)))) in test_6016_thread()
1546 if (!ADBG_EXPECT_TEEC_SUCCESS(a->case_t, fs_close(&sess, obj))) in test_6016_thread()
1551 fs_open(&sess, a->file_name, sizeof(a->file_name), in test_6016_thread()
1557 fs_read(&sess, obj, out, 10, &count))) in test_6016_thread()
1563 if (!ADBG_EXPECT_TEEC_SUCCESS(a->case_t, fs_unlink(&sess, obj))) in test_6016_thread()
1619 TEEC_Session sess = { }; in xtest_tee_test_6017_single() local
1626 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6017_single()
1630 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6017_single()
1636 fs_write(&sess, obj, data_00, sizeof(data_00)))) in xtest_tee_test_6017_single()
1640 fs_get_obj_info(&sess, obj, &obj_info1, in xtest_tee_test_6017_single()
1644 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6017_single()
1648 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6017_single()
1653 fs_get_obj_info(&sess, obj, &obj_info2, in xtest_tee_test_6017_single()
1662 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6017_single()
1666 TEEC_CloseSession(&sess); in xtest_tee_test_6017_single()
1674 TEEC_Session sess = { }; in xtest_tee_test_6018_single() local
1694 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6018_single()
1698 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6018_single()
1708 fs_write(&sess, obj, block, block_size))) in xtest_tee_test_6018_single()
1713 fs_get_obj_info(&sess, obj, &obj_info1, in xtest_tee_test_6018_single()
1721 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6018_single()
1725 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6018_single()
1731 fs_get_obj_info(&sess, obj, &obj_info2, in xtest_tee_test_6018_single()
1748 fs_read(&sess, obj, br, sizeof(br), &count))) in xtest_tee_test_6018_single()
1755 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj))) in xtest_tee_test_6018_single()
1759 TEEC_CloseSession(&sess); in xtest_tee_test_6018_single()
1766 TEEC_Session sess = { }; in xtest_tee_test_6019_single() local
1775 xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig))) in xtest_tee_test_6019_single()
1785 fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6019_single()
1792 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6019_single()
1809 fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6019_single()
1814 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_read(&sess, obj, out, 10, &count))) in xtest_tee_test_6019_single()
1836 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj)); in xtest_tee_test_6019_single()
1840 TEEC_CloseSession(&sess); in xtest_tee_test_6019_single()
1854 static TEEC_Result fs_access_with_bad_object_id_ref(TEEC_Session *sess, in fs_access_with_bad_object_id_ref() argument
1917 res = TEEC_InvokeCommand(sess, command, &op, &org); in fs_access_with_bad_object_id_ref()
1935 TEEC_Session sess = { }; in xtest_tee_test_6020_single() local
1942 res = xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig); in xtest_tee_test_6020_single()
1946 res = fs_create(&sess, file_01, sizeof(file_01), in xtest_tee_test_6020_single()
1957 if (!ADBG_EXPECT_TEEC_SUCCESS(c, fs_close(&sess, obj))) in xtest_tee_test_6020_single()
1960 res = fs_access_with_bad_object_id_ref(&sess, in xtest_tee_test_6020_single()
1975 TEEC_CloseSession(&sess); in xtest_tee_test_6020_single()
1976 res = xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig); in xtest_tee_test_6020_single()
1980 res = fs_access_with_bad_object_id_ref(&sess, in xtest_tee_test_6020_single()
1994 TEEC_CloseSession(&sess); in xtest_tee_test_6020_single()
1995 res = xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig); in xtest_tee_test_6020_single()
1999 res = fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6020_single()
2008 res = fs_access_with_bad_object_id_ref(&sess, in xtest_tee_test_6020_single()
2022 TEEC_CloseSession(&sess); in xtest_tee_test_6020_single()
2023 res = xtest_teec_open_session(&sess, &storage_ta_uuid, NULL, &orig); in xtest_tee_test_6020_single()
2027 res = fs_open(&sess, file_01, sizeof(file_01), in xtest_tee_test_6020_single()
2036 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj)); in xtest_tee_test_6020_single()
2038 res = fs_access_with_bad_object_id_ref(&sess, in xtest_tee_test_6020_single()
2050 TEEC_CloseSession(&sess); in xtest_tee_test_6020_single()
2053 ADBG_EXPECT_TEEC_SUCCESS(c, fs_unlink(&sess, obj)); in xtest_tee_test_6020_single()
2054 TEEC_CloseSession(&sess); in xtest_tee_test_6020_single()