testing/drivers: Fixed the wrong test-case.

This commit fixed the wrong-test case where the time is acquired after
the timer being set, leading to the assertion failure.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
ouyangxiangzhen 2025-07-28 14:12:18 +08:00 committed by Xiang Xiao
parent ae7a0d81e9
commit a16c545134

View file

@ -196,11 +196,11 @@ static void drivertest_posix_timer(FAR void **state)
/* Start the timer */
posix_timer_state->tim = get_timestamp();
ret = timer_settime(timerid, 0, &(posix_timer_state->it), NULL);
assert_return_code(ret, OK);
posix_timer_state->tim = get_timestamp();
/* Get the timer status */
ret = timer_gettime(timerid, &it);