summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-10-03 11:07:09 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-10 12:37:07 +0000
commit1562d4f9303d163a15aa896ad55a4957804490d9 (patch)
treedc7da827a7f1b5b8b725051692a96906ad220ba7 /core
parent3631e9a43ddb5874875a7d21dfea2a6009183bc6 (diff)
downloadchrome-ec-1562d4f9303d163a15aa896ad55a4957804490d9.tar.gz
usbc: fix flaky tests
Change waits in USBC tests to 1 MSEC. When we wait and don't care, wait for much longer. We also need to ensure that the lower priority task actually ran when we are trying to cycle the state machine. If the entire process is starved then we have to do some manual checking. Added more prints statements to help debug failing tests. BRANCH=none BUG=none TEST=repeat all tests 100 times without failure Change-Id: I12e0f0fa5247a24c87a4ff457e2be684991f0cad Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1837995 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/host/task.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/host/task.c b/core/host/task.c
index d004698ed7..b6ab778b60 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -206,6 +206,11 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait)
return 0;
}
+uint32_t *task_get_event_bitmap(task_id_t tskid)
+{
+ return &tasks[tskid].event;
+}
+
uint32_t task_wait_event(int timeout_us)
{
int tid = task_get_current();