Skip to content

Commit 287086e

Browse files
committed
tests: sleep: Increase tick margin for Xilinx QEMU
The Xilinx QEMU, used to emulate the Xilinx ZynqMP platform, is particularly unstable in terms of timing. This commit increases the tick margin for the Xilinx ZynqMP platform from 1 to 5 in order to allow the sleep test to pass with a reasonable repeatability. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 4864817 commit 287086e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/kernel/sleep/src/main.c

+9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@
2424
#define ONE_SECOND_ALIGNED \
2525
(u32_t)(k_ticks_to_ms_floor64(k_ms_to_ticks_ceil32(ONE_SECOND) + _TICK_ALIGN))
2626

27+
#if defined(CONFIG_SOC_XILINX_ZYNQMP)
28+
/*
29+
* The Xilinx QEMU, used to emulate the Xilinx ZynqMP platform, is particularly
30+
* unstable in terms of timing. The tick margin of at least 5 is necessary to
31+
* allow this test to pass with a reasonable repeatability.
32+
*/
33+
#define TICK_MARGIN 5
34+
#else
2735
#define TICK_MARGIN 1
36+
#endif
2837

2938
static struct k_sem test_thread_sem;
3039
static struct k_sem helper_thread_sem;

0 commit comments

Comments
 (0)