diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2019-05-22 13:16:42 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-24 05:57:40 -0700 |
commit | 78ec9d739a404a64b03d50d5b83c0520b790f7a6 (patch) | |
tree | f07d87c3efa18f9e04eb9d8afc61405629eb0350 /extra | |
parent | 99900cae2fa4e17b6c1433111f4c142ebf27c024 (diff) | |
download | chrome-ec-78ec9d739a404a64b03d50d5b83c0520b790f7a6.tar.gz |
core/host/task: Add OS sleeps instead of busy-looping
When running on a busy builder, fuzzing tests often time out.
I suspect this is due to the fact that one of the thread is busy
looping, and for some reason, does not give enough time for
other threads to run.
Fix the issue by using nanosleep OS call (avoiding namespace
clash with msleep/usleep that are implemented differently).
From the builder stack traces, we know these tests often
fail in 2 busy-loops, so fix those.
BRANCH=none
BUG=chromium:963768
TEST=Emulate busy system with 4 cores only:
taskset 0xf yes > /dev/null & (about ten times)
Then run tests:
while taskset 0xf build/host/usb_pd_fuzz/usb_pd_fuzz.exe \
-runs=1; do :; done
=> No failures after 30 minutes.
Change-Id: I458ff783d166e27fb38dc33853f08e5b3acba980
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1623050
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'extra')
0 files changed, 0 insertions, 0 deletions