Open XMPengYinjie opened 4 weeks ago
Hi, why xtest 6016 case don't use TEE_DATA_FLAG_OVERWRITE flag for fs_open after fs_create?
`static void *test_6016_thread(void *arg) { struct test_6016_thread_arg *a = arg; TEEC_Session sess = a->session; uint32_t obj = 0; uint8_t out[10] = { }; uint32_t count = 0; /* create */ if (!ADBG_EXPECT_TEEC_SUCCESS(a->case_t, **fs_create(&sess, a->file_name, sizeof(a->file_name), TEE_DATA_FLAG_ACCESS_WRITE, 0, data_01, sizeof(data_01), &obj, a->storage_id)))** goto exit; if (!ADBG_EXPECT_TEEC_SUCCESS(a->case_t, fs_close(&sess, obj))) goto exit; /* write new data */ if (!ADBG_EXPECT_TEEC_SUCCESS(a->case_t, **fs_open(&sess, a->file_name, sizeof(a->file_name), TEE_DATA_FLAG_ACCESS_WRITE, &obj, a->storage_id)))** goto exit; `
fs_open is aim to overwirte the raw data of obj from fs_create, so above fs_open will return TEE_ERROR_ACCESS_CONFLICT.
fs_open
fs_create
TEE_ERROR_ACCESS_CONFLICT
Now i have a issue in my test, i want to sure if the case codes are wrong.
Could you please help with my question? Thanks!
TEE_DATA_FLAG_OVERWRITE is not a valid flag for TEE_OpenPersistentObject().
TEE_DATA_FLAG_OVERWRITE
TEE_OpenPersistentObject()
Hi, why xtest 6016 case don't use TEE_DATA_FLAG_OVERWRITE flag for fs_open after fs_create?
fs_open
is aim to overwirte the raw data of obj fromfs_create
, so abovefs_open
will returnTEE_ERROR_ACCESS_CONFLICT
.Now i have a issue in my test, i want to sure if the case codes are wrong.
Could you please help with my question? Thanks!