Skip to content

Commit

Permalink
tests: posix: common: fix k_usleep() tick alignment
Browse files Browse the repository at this point in the history
The kusleep(1) in test_posix_realtime() is not sufficient for all
boards. Extend it by the difference between rts.tv_nsec and
mts.tv_nsec on ehl_crb is 100000 (100 microseconds).

Fixes zephyrproject-rtos#33544.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
  • Loading branch information
jenmwms committed May 14, 2021
1 parent 21d1ad3 commit d759790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/posix/common/src/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void test_posix_realtime(void)
* which may break, in which case follow the suggestion in the
* comment above.
*/
k_usleep(1);
k_usleep(100);

ret = clock_gettime(CLOCK_MONOTONIC, &mts);
zassert_equal(ret, 0, "Fail to get monotonic clock");
Expand Down

0 comments on commit d759790

Please sign in to comment.