)]}'
{
  "commit": "904a6c0319dece00a51561406018a136ddbc4191",
  "tree": "4d27bd8d773b20ba99d811fdf7197834ec339077",
  "parents": [
    "f169c5bc13707ad828a8ec34b3e9422f33e4861c"
  ],
  "author": {
    "name": "Andy Ross",
    "email": "andrew.j.ross@intel.com",
    "time": "Tue Sep 28 11:32:15 2021 -0700"
  },
  "committer": {
    "name": "Anas Nashif",
    "email": "anas.nashif@intel.com",
    "time": "Mon Nov 08 21:32:20 2021 -0500"
  },
  "message": "tests/thread_apis: Fix whitebox assumptions in runtime_stats test\n\nThe thread_apis tests of the RUNTIME_STATS feature weren\u0027t really\ntesting the right behavior.\n\n+ It assumed that accounting would only happen at context switch time\n  and required that the returned values not change for running threads\n  (even CLEARLY running threads like _current!).  But that\u0027s not a\n  documented feature!  It\u0027s actually sort of a wart that we\u0027d like to\n  be able to fix (and have fixed, the new backend returns realtime\n  values so you can track CPU-bound processes on another CPU).\n\n+ It assumed that k_thread_runtime_stats_all_get() would return time\n  that includes idle time (or conversely it forgot that\n  k_thread_foreach enumerates over idle threads).  This was sort of a\n  bug in the original (because it means that the result is always the\n  system uptime multiplied by the number of CPUs)\n\nBroadly, instead of testing the result of a \"time\" function for\nequality (never a good idea) test it via appropriate bounds given the\nusage.\n\nSigned-off-by: Andy Ross \u003candrew.j.ross@intel.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d3bdb920158adc49d6e2916e259e55ab06d4b8c1",
      "old_mode": 33188,
      "old_path": "tests/kernel/threads/thread_apis/src/main.c",
      "new_id": "77c7ce97b39924da91307418516159f84dd0f6f3",
      "new_mode": 33188,
      "new_path": "tests/kernel/threads/thread_apis/src/main.c"
    }
  ]
}
