-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restric usage #715
Restric usage #715
Conversation
The failure is expected since there's an added test for something that is fixed in OP-TEE/optee_os#6505. |
For "ta: storage: fix ta_storage_cmd_key_in_persistent() cleanup":
|
For "xtest: regression: add case 6021 object usage":
|
1e1d39f
to
5a19d47
Compare
Tags applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Etienne Carriere <[email protected]>
for commit "TEE_DATA_FLAG_OVERWRITE"
"ta: storage: fix ta_storage_cmd_key_in_persistent() cleanup" with imperative mode in commit message.
edited: fix commit reference that was obviously not accurate
host/xtest/regression_6000.c
Outdated
res = fs_get_obj_info(&sess, obj, &obj_info); | ||
if (!ADBG_EXPECT_TEEC_SUCCESS(c, res)) | ||
goto exit; | ||
ADBG_EXPECT_COMPARE_UNSIGNED(c, obj_info.objectUsage, ==, 0xfffffffe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to clear an explicitly meaningful usage bitflag:
ADBG_EXPECT_COMPARE_UNSIGNED(c, obj_info.objectUsage, ==,
0xffffffff & ~TEE_USAGE_EXTRACTABLE);
host/xtest/regression_6000.c
Outdated
} | ||
DEFINE_TEST_MULTIPLE_STORAGE_IDS(xtest_tee_test_6021) | ||
ADBG_CASE_DEFINE(regression, 6021, xtest_tee_test_6021, | ||
"Modify and check object usage"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: "Modify and check persistent object usage"
{ | ||
const uint32_t flags = TEE_DATA_FLAG_ACCESS_READ | | ||
TEE_DATA_FLAG_ACCESS_WRITE | | ||
TEE_DATA_FLAG_ACCESS_WRITE_META; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TEE_DATA_FLAG_OVERWRITE
to ensure object is destroyed and recreated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll add it to the create call.
5a19d47
to
7cd1deb
Compare
Addressing comments, tag applied. |
res = fs_get_obj_info(&sess, obj, &obj_info); | ||
if (!ADBG_EXPECT_TEEC_SUCCESS(c, res)) | ||
goto exit; | ||
ADBG_EXPECT_COMPARE_UNSIGNED(c, obj_info.objectUsage, ==, ou); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goto exit
here on failure I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test has failed at this point, but it's not completely useless to open a new session, reopen the object, and check once more. The test is stable even on errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Sorry for the bad reference for my R-b tag. |
Fixes the error cleanup path in two places where a created test object was supposed to be removed. Fixes: 90f2335 ("Test Persistent Object with keys") Signed-off-by: Jens Wiklander <[email protected]> Reviewed-by: Jerome Forissier <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
Add case 6021 to test modifying and checking object usage of a persistent object. Link: OP-TEE/optee_os#6495 Signed-off-by: Jens Wiklander <[email protected]> Reviewed-by: Jerome Forissier <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
7cd1deb
to
ba45026
Compare
Tag applied |
Depends on the fix in OP-TEE/optee_os#6505