Skip to content
Commit f20084ff authored by Peng Chen's avatar Peng Chen Committed by Andrew Boie
Browse files

Code Coverage: Fix the issue of function code coverage in thread.c



The k_thread_state_str is a new function added into
kernel/thread.c recently which was used to return
the human friendly thread state, so it hasn't been
called by other existing code.
In order to improve the function code coverage, we
just replace the "th->base.thread_state & _THREAD_PENDING"
code by using k_thread_state_str function in
tests/kernel/sched/preempt/src/main.c, because
k_thread_state_str function is realized by judging
the thread_state member to return the thread state.

Signed-off-by: default avatarpeng1 chen <peng1.chen@intel.com>
parent 52c7df60
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment