Skip to content
Commit 86b53643 authored by Andy Ross's avatar Andy Ross Committed by Andrew Boie
Browse files

tests/kernel: Add preemption priority test



This test exaustively tests preemption points between threads of all
priority classes (cooperative, preemptible, and metairq), done both
from a synchronous reschedule (via k_sem_give() and from interrupt
context (via irq_offload()), and with and without the sched_lock()
held.  It then detects the next thread that runs and validates vs. the
documented priority rules.

Note that there is a whitelisted case on ARM, where irq_offload()
seems not to be working like a true interrupt (it always returns to
the interrupted context and doesn't seem to hit the normal exception
return path which can context switch).  And native_posix is excluded
because of failures and the fact that it's actually never possible to
truly preempt a thread there (they run to completion inside _Swap()
et. al. and then block themselves).  Both of these should be fixable
in the future but don't (seem to) directly relate to this test.

Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 3a0cb2d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment