zephyr/tests/kernel
Andy Ross b65277990a tests/kernel/context: Fixup slop in cpu_idle test case
This test was written to idle for exactly 1ms and wake up with zero
error, which is just too tight for some platforms (and worked on
emulators where the tick rate is 10x coarser only because 0 == 0!).

And it's not clear that it's testing anything we promise in
documentation, regardless.  Early wakeups are not an error and
absolutely not disallowed, yet the test is treating the wakeup like a
sleep.

Clean it up a bit and relax the tolerance to what we can compute
reliably: do all the math in ticks, idle for 10ms (i.e. longer than a
host quantum for emulators), and allow 1 tick of slop on either side to
permit slightly early wakeups while still verifying that "yes, the idle
did idle".

Fixes #46641

Signed-off-by: Andy Ross <andyross@google.com>
2022-07-01 11:37:54 +02:00
..
common tests/kernel/common: Let picolibc pick a malloc heap size 2022-06-30 10:33:24 +02:00
condvar/condvar_api tests: condition variables: move to new ztest API 2022-06-18 08:10:32 -04:00
context tests/kernel/context: Fixup slop in cpu_idle test case 2022-07-01 11:37:54 +02:00
device device_mmio: Introduce DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME 2022-06-16 11:26:10 +02:00
early_sleep tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
events tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
fatal tests/kernel/fatal: Work around historical API misuse 2022-05-20 12:34:30 +02:00
fifo tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
fpu_sharing tests: fpu_sharing: Fix the skipped testing on acrn_ehl_crb 2022-05-20 19:24:54 -07:00
gen_isr_table tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
interrupt test: interrupt: change the test interrupt line to a bigger one. 2022-06-23 09:08:43 +02:00
lifo tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
mbox tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
mem_heap linker: update files with <zephyr/...> include prefix 2022-05-09 12:45:29 -04:00
mem_protect tests: mem_protect: Fix checking wrong variable 2022-06-30 12:37:14 -05:00
mem_slab tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
mp tests: remove redundant <zephyr/zephyr.h> includes 2022-06-15 09:13:11 +02:00
msgq tests: kernel: msgq_api: Migrate to K_THREAD_STACK_DECLARE 2022-06-20 10:25:52 +02:00
mutex tests: mutex: define testcases in yaml 2022-05-13 12:16:57 -04:00
obj_tracking Revert "tests/kernel/obj_tracking: Filter cAVS 2.5 builds to prevent DSP host hangs" 2022-01-26 10:09:19 -05:00
pending tests: remove redundant <zephyr/zephyr.h> includes 2022-06-15 09:13:11 +02:00
pipe everywhere: fix typos 2022-03-18 13:24:08 -04:00
poll tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
profiling/profiling_api tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
queue tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
sched tests: sched: preempt: Fix the skipped testing when enabling SMP 2022-06-22 12:22:01 +02:00
semaphore tests: kernel: semaphore: fix mutual exclusion test issue 2022-05-17 11:45:16 +09:00
sleep tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
smp tests: remove redundant <zephyr/zephyr.h> includes 2022-06-15 09:13:11 +02:00
smp_boot_delay tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
spinlock tests: remove redundant <zephyr/zephyr.h> includes 2022-06-15 09:13:11 +02:00
stack/stack tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
threads tests: threads: Remove unused variable 2022-06-30 12:37:14 -05:00
tickless/tickless_concept tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
timer tests/timer_api: Use correct 'abs' macro with correct type parameter 2022-06-14 01:50:36 +09:00
usage/thread_runtime_stats tests/kernel/usage/thread_runtime_stats: relax precision test for RISC-V 2022-06-13 13:21:16 -04:00
workq tests: workq: remove tests using legacy work queue API 2022-06-27 12:46:21 +02:00
xip everywhere: fix typos 2022-03-18 13:24:08 -04:00