zephyr/tests/kernel
Andy Ross f085928ab0 tests/kernel/fifo/fifo_timeout: Tick alignment for oversensitive timing
This test was written to wait on a fifo with a timeout, return, and
check the timing between the start and end using k_cycle_get_32() to
see that it didn't run long.  But timeouts expire on tick boundaries,
and so if tick expires between the start of the test and the entry to
k_fifo_get(), the timeout will take one full tick longer than expected
due to aliasing.

As it happened this passed everywhere except nRF (whose cycle timer is
32 kHz and thus more susceptible to coarser aliasing like this), and
even there it passed for a while until the spinlock validation layer
went in and added just enough time to the userspace code paths
(i.e. the code between the start time fetch and the point where the
fifo blocks takes longer) to open the window and push us over the
limit.

The workaround here is just to add a k_sleep(1) call, which is
guaranteed to block and wake up synchronously at the next tick.

Fixes #13289

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-03-01 19:45:39 +01:00
..
arm_irq_vector_table tests: kernel: arm_irq_vector_table: extend the test for nRF9160 2019-02-28 18:17:03 +01:00
arm_runtime_nmi cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
boot_page_table x86: modify MMU APIs for multiple page tables 2019-02-14 12:46:36 -05:00
common tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
context tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
critical tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
device tests: Enable kernel.device tests for qemu_x86_64 2019-02-26 22:55:40 -08:00
early_sleep tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
fatal tests: kernel: fatal: remove #ifdefs for ARM platforms 2019-02-28 11:57:25 -08:00
fifo tests/kernel/fifo/fifo_timeout: Tick alignment for oversensitive timing 2019-03-01 19:45:39 +01:00
fp_sharing cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
gen_isr_table tests: kernel: gen_isr_table: Exclude platforms test isnt valid on 2019-02-12 15:35:29 -05:00
interrupt tests: kernel: interrupt: Exclude platforms test isnt valid on 2019-02-07 15:58:43 -05:00
lifo tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
mbox tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mem_heap/mheap_api_concept cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
mem_pool tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mem_protect tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mem_slab tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mp cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
msgq/msgq_api tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
mutex tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
obj_tracing tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
pending tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
pipe tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 12:47:12 -08:00
poll tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
profiling/profiling_api power: rename CPU_LPS_n power states 2019-02-26 02:30:13 +01:00
queue tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
sched tests/kernel/sched/schedule_api: Restore spinning for timer alignment 2019-02-28 13:06:48 -06:00
semaphore tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
sleep tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
smp cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
spinlock cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
stack tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
static_idt cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
threads tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
tickless tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
timer tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
workq tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
xip boards: remove pulpino board 2019-01-31 22:47:18 -05:00