ztest: fix ztest thread priority in cooperative mode

By default ztest thread is running at the priority `-1`. This value is
invalid when the testcase is running in cooperative mode only. Set
default ztest thread priority to `-2` if this is the case. The fix is
modeled on the approach used to define the default
`MAIN_THREAD_PRIORITY`.

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
Piotr Mienkowski 2021-03-07 21:39:52 +01:00 committed by Kumar Gala
parent 9c871fb0b6
commit 41c10d4f66
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ config ZTEST_ASSERT_VERBOSE
config ZTEST_THREAD_PRIORITY
int "Testing thread priority"
default -2 if !PREEMPT_ENABLED
default -1
help
Set priority of the testing thread. Default is -1 (cooperative).