diff --git a/tests/kernel/common/src/boot_delay.c b/tests/kernel/common/src/boot_delay.c index d4b80eb4269..74861e7c847 100644 --- a/tests/kernel/common/src/boot_delay.c +++ b/tests/kernel/common/src/boot_delay.c @@ -19,6 +19,17 @@ */ void test_bootdelay(void) { + if (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC > 1000000000) { + /* Systems with very fast counters (like the x86 TSC) + * and long firmware startup (often 10+ seconds on a + * EFI PC!) can easily roll this over during startup, + * and there's no way to detect that case with a 32 + * bit OS API. Just skip it if we have a GHz-scale + * counter. + */ + ztest_test_skip(); + } + uint32_t current_cycles = k_cycle_get_32(); /* compare this with the boot delay specified */