Skip to content

Commit 39fabf0

Browse files
committed
tests: kernel: Add k_thread_runtime_stats_is_enabled function unittest
Add test for 'k_thread_runtime_stats_is_enabled(tid)'. Signed-off-by: James Roy <rruuaanng@outlook.com>
1 parent 0e22e9a commit 39fabf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/kernel/usage/thread_runtime_stats/src/test_thread_runtime_stats.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ ZTEST(usage_api, test_thread_stats_enable_disable)
217217

218218
k_thread_runtime_stats_get(_current, &stats1);
219219
k_thread_runtime_stats_get(tid, &helper_stats1);
220+
zassert_true(k_thread_runtime_stats_is_enabled(tid));
220221
k_thread_runtime_stats_disable(tid);
222+
zassert_false(k_thread_runtime_stats_is_enabled(tid));
221223

222224
/*
223225
* Busy wait for the remaining tick before re-enabling the thread

0 commit comments

Comments
 (0)