Skip to content

Commit

Permalink
ta: os_test: fix TA time wrap test
Browse files Browse the repository at this point in the history
In the test for wrapped TA time in test_time() we check that the time
has wrapped and that not too much time has passed. The limit for this is
currently 2 seconds of which 1 second is passed in TEE_Wait(). This is
currently not enough time with the recent introduction of fTPM being
probed in parallel with the test. So in order to avoid occasional false
negatives increase the limit to 60 seconds.

Fixes: a2c1ce3 ("ta: os_test: fix TA time wrap test")
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
  • Loading branch information
jenswi-linaro committed Jan 28, 2025
1 parent 50e1cbd commit 9636ad4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ta/os_test/os_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
EMSG("Unexpected wrapped time %"PRIu32".%03"PRIu32, t.seconds,
t.millis);
return TEE_ERROR_BAD_STATE;
Expand Down

0 comments on commit 9636ad4

Please sign in to comment.