zephyr/tests/kernel
Andy Ross 904a6c0319 tests/thread_apis: Fix whitebox assumptions in runtime_stats test
The thread_apis tests of the RUNTIME_STATS feature weren't really
testing the right behavior.

+ It assumed that accounting would only happen at context switch time
  and required that the returned values not change for running threads
  (even CLEARLY running threads like _current!).  But that's not a
  documented feature!  It's actually sort of a wart that we'd like to
  be able to fix (and have fixed, the new backend returns realtime
  values so you can track CPU-bound processes on another CPU).

+ It assumed that k_thread_runtime_stats_all_get() would return time
  that includes idle time (or conversely it forgot that
  k_thread_foreach enumerates over idle threads).  This was sort of a
  bug in the original (because it means that the result is always the
  system uptime multiplied by the number of CPUs)

Broadly, instead of testing the result of a "time" function for
equality (never a good idea) test it via appropriate bounds given the
usage.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-11-08 21:32:20 -05:00
..
common tests: clock: tests for k_cycle_get_64 2021-11-08 13:41:53 -05:00
condvar/condvar_api cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
context tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
device tests: use common PM action callback naming 2021-11-03 20:27:18 -04:00
early_sleep tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
events tests: add event test code 2021-10-16 06:27:10 -04:00
fatal tests: kernel: disable one test for qemu_cortex_a9 2021-11-01 22:10:04 -04:00
fifo tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
fpu_sharing cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02: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: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
lifo tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
mbox tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
mem_heap tests: heap: add test case for coverage 2021-11-07 05:39:10 -05:00
mem_protect tests: userspace: add a test for code coverage 2021-10-28 12:01:01 -04:00
mem_slab tests: kernel: mem_slab: Fix test for no multithreading 2021-11-03 09:18:40 -04:00
mp tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
msgq tests: msgq: improve code coverage for msgq API 2021-11-01 11:15:15 -04:00
mutex tests: mutex: fix improper test identifier 2021-10-20 10:19:18 -04:00
pending cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
pipe cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
poll cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
profiling/profiling_api pm: policy: Add cpu information in the API 2021-11-06 10:21:53 -04:00
queue tests: queue: add a test case for coverage 2021-10-28 12:06:25 -04:00
sched test: change test suite name and testcase name 2021-11-03 16:44:50 -04:00
semaphore cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
sleep cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
smp tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04: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/thread_apis: Fix whitebox assumptions in runtime_stats test 2021-11-08 21:32:20 -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: timer api with real time slot in test_sleep_abs 2021-09-10 16:20:30 -04:00
workq tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00
xip tests: added kernel tests for arm arch with linker script generator 2021-08-30 08:54:23 -04:00