zephyr/tests
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
..
application_development/gen_inc_file cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
arch modules: tfm: Split trusted-firmware-m repository 2021-11-01 11:20:06 -04:00
benchmarks kernel: Introduce K_MEM_SLAB_DEFINE_STATIC 2021-11-07 05:36:48 -05:00
bluetooth Bluetooth: Mesh: Moved composition data out of mesh shell 2021-11-08 11:07:11 -05:00
boards cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
boot/uefi tests: uefi: move uefi test out of hello world 2021-10-22 06:36:51 -04:00
crypto tests: crypto: Follow changes in mbedTLS 3.0 version 2021-10-07 14:02:40 -05:00
drivers canbus: rename zephyr,can-primary chosen property to zephyr,canbus 2021-11-07 09:05:39 -05:00
kernel tests/thread_apis: Fix whitebox assumptions in runtime_stats test 2021-11-08 21:32:20 -05:00
lib drivers: mbox: Introduce MBOX driver class 2021-10-27 18:27:21 +02:00
misc cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
net net: lwm2m: Add IPSO current sensor object 2021-11-08 11:01:22 -05:00
posix cmake: use find_package() instead of literal include in tests and samples 2021-11-01 10:33:09 -04:00
subsys tests: pm: power_mgmt: Check device runtime pm integration 2021-11-08 19:54:12 -05:00
unit lib/os/cbprintf_nano.c: avoid sign extension on unsigned formats 2021-09-02 19:37:06 -04:00
ztest ztest: add a weak implementation of test_main() 2021-10-28 16:57:51 -04:00