Skip to content
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

ta: os_test: fix TA time wrap test #771

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ta/os_test/os_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ static TEE_Result test_time(void)
* TEE_GetTAPersistentTime() should be much less than 1 second, in fact
* it's not even a millisecond.
*/
if (t.seconds > 1 || t.millis >= 1000) {
if (t.seconds > 60 || t.millis >= 1000) {
EMSG("Unexpected stored TA time %"PRIu32".%03"PRIu32, t.seconds,
t.millis);
return TEE_ERROR_BAD_STATE;
Expand All @@ -623,7 +623,7 @@ static TEE_Result test_time(void)
}
MSG("TA time %"PRIu32".%03"PRIu32, t.seconds, t.millis);

if (t.seconds > 1) {
if (t.seconds > 60) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test at line 603 is not impacted by the same CPU overload issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, it's at least far less likely since we're not exiting to the normal world in between.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe fragile, depends on the scheduler. Won't this trigger rare CI test failures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll increase the time there too.

EMSG("Unexpected wrapped time %"PRIu32".%03"PRIu32, t.seconds,
t.millis);
return TEE_ERROR_BAD_STATE;
Expand Down