zephyr/tests/kernel
Nicolas Pitre a1ce2fb990 tests: lifo_usage: make it less susceptible to SMP races
On SMP, and especially using qemu on a busy system, it is possible for
a thread with a later timeout to get ahead of another one with an
earlier timeout. The tight timeout value difference (10ms) makes it
possible albeit difficult to reproduce. The result is something like:

|START - test_timeout_threads_pend_on_lifo
| thread (q order: 2, t/o: 0, lifo 0x4001d350)
|
|    Assertion failed at main.c:140:
|test_multiple_threads_pending: (data->timeout_order not equal to ii)
| *** thread 2 woke up, expected 1

Let's make timeout values 10 times larger to make this unlikely race
even less likely.

While at it... The timeout field in struct timeout_order_data is some ms
value and not a number of ticks, so change the type accordingly.
And leverage k_cyc_to_ms_floor32() to simplify computation in
is_timeout_in_range().

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-02-14 09:32:03 -05:00
..
common tests: skip arch_nop test when machine timer uses divided sys clock 2021-12-20 17:51:30 +01:00
condvar/condvar_api tests: condvar_api: fix empty loop error for XCC 2022-01-25 21:16:32 -05:00
context tests: kernel: context: add MIPS support 2022-01-19 13:48:21 -05:00
device tests: kernel: device: remove PM related tests 2021-12-02 10:53:39 +01:00
early_sleep tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
events tests: kernel/events/event_api: memory coherence fixes 2022-01-18 20:26:42 -05:00
fatal tests/kernel/fatal/exception: Remove legacy irq_lock() usage 2022-01-19 15:10:55 -05:00
fifo tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
fpu_sharing tests: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
gen_isr_table tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
interrupt tests/kernel/interrupt: Don't wait so long just for a tick 2022-01-26 13:34:45 -05:00
lifo tests: lifo_usage: make it less susceptible to SMP races 2022-02-14 09:32:03 -05:00
mbox test/kernel/mbox: Drop needless _1cpu_ from test cases 2022-01-26 13:34:45 -05:00
mem_heap tests: k_heap_api: make alloc pending tests a bit more robust 2022-02-08 07:34:48 -05:00
mem_protect tests: mem_protect: enlarge heap size of RISCV64 2022-01-18 13:11:36 -05:00
mem_slab tests: mslab_api: remove double asterisk inside func comments 2022-01-12 16:02:16 -05:00
mp tests/kernel/mp: Must enable KERNEL_COHERENCE explicitly 2022-01-21 13:22:15 -05:00
msgq tests: msgq: improve code coverage for msgq API 2021-11-01 11:15:15 -04:00
mutex tests: remove @return doc for void functions 2022-01-12 16:02:16 -05: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 cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
pipe tests: pipes: Add pipe flush tests 2022-01-10 12:17:14 -05:00
poll tests: removing incorrect testcases of poll 2021-11-29 18:26:02 -05:00
profiling/profiling_api pm: policy: return a reference to the next state 2022-01-11 10:46:20 +01:00
queue tests/kernel/queue: Mark SMP-unsafe case 1cpu, reduce logging output 2022-01-21 13:22:15 -05:00
sched test: change test suite name and testcase name 2021-11-03 16:44:50 -04:00
semaphore tests: semaphore: fix empty loop error for XCC 2022-01-25 21:16:32 -05:00
sleep cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
smp tests/kernel/smp: Add SMP switch torture test 2022-01-18 12:05:54 -05:00
smp_boot_delay tests/kernel: Add test for CONFIG_SMP_BOOT_DELAY 2021-11-23 13:23:54 -05:00
spinlock cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
stack/stack tests: stack: fix improper assert message 2021-10-13 06:17:23 -04:00
threads tests: kernel: threads: Correct test assertion in thread_apis test 2021-12-13 20:13:21 -05:00
tickless/tickless_concept cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
timer tests: kernel: cycle64: mark test as slow 2021-11-29 10:35:49 -05:00
workq tests: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
xip tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00