zephyr/tests
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
..
application_development cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
benchmarks tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
bluetooth Bluetooth: Mesh: Use BT_GATT_CCC_MANAGED 2019-02-27 10:30:50 +01:00
boards tests/boards/intel_s1000_crb: fix potential uninit variables 2019-02-26 01:44:42 +01:00
booting/stub cmake: increase minimal required version to 3.13.1 2019-01-03 11:51:29 -05:00
cmsis_rtos_v1 tests: Mass SMP disablement on non-SMP-safe tests 2019-02-28 13:02:20 -06:00
cmsis_rtos_v2 tests: cmsis_rtos_v2: Join and detach tests 2019-02-08 11:59:38 -05:00
compliance tests/compiance/checkpatch: force the format to 'email' 2016-11-10 19:30:32 +00:00
coverage tests: coverage: GCOV counter value changed in GCC8. 2019-01-28 08:39:06 -05:00
crypto libc: fix CONFIG_STDOUT_CONSOLE semantics 2019-02-26 08:00:33 -06:00
drivers cmake: Drop all in-tree usage 'set_conf_file' 2019-03-01 09:44:09 +01:00
kernel tests/kernel/fifo/fifo_timeout: Tick alignment for oversensitive timing 2019-03-01 19:45:39 +01:00
lib lib/os: Conditionally eliminate alloca/VLA usage 2019-02-28 10:06:35 -08:00
misc tests: util: Add UTIL_LISTIFY tests 2019-02-11 09:28:14 -05:00
net cmake: Drop all in-tree usage 'set_conf_file' 2019-03-01 09:44:09 +01:00
posix tests: Mass SMP disablement on non-SMP-safe tests 2019-02-27 14:22:06 -08:00
shell shell: Deprecate macros for subcommands creation 2019-02-20 07:31:35 -05:00
subsys tests: fs: Add missing return check 2019-03-01 09:50:15 +01:00
unit tests: move testsuite and configs into subsys/ 2019-02-22 08:58:40 -05:00
ztest tests: move testsuite and configs into subsys/ 2019-02-22 08:58:40 -05:00