summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-15 11:42:55 +0800
committerChromeBot <chrome-bot@google.com>2013-05-15 12:12:24 -0700
commit4bbf6f5d1ac06ae3064e9fad8ad90254be839c2a (patch)
treec7049734c85ba98cb881b80c8ec422208ff8a892 /test
parentd9cf88b35ad211d873f48b41fd985e22ff049b83 (diff)
downloadchrome-ec-4bbf6f5d1ac06ae3064e9fad8ad90254be839c2a.tar.gz
Relax timing constraints in hooks test
Current timing constraints are too tight that the test sometimes fails when it shouldn't. BUG=chrome-os-partner:19236 TEST=Pass the test BRANCH=None Change-Id: Ib94ff44691ba36f14dbf02319d0371770b5ece5d Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/51250 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/hooks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/hooks.c b/test/hooks.c
index 1ece19e9cf..fb7944cff1 100644
--- a/test/hooks.c
+++ b/test/hooks.c
@@ -94,13 +94,13 @@ static int test_deferred(void)
{
deferred_call_count = 0;
hook_call_deferred(deferred_func, 10 * MSEC);
- usleep(11 * MSEC);
+ usleep(20 * MSEC);
TEST_ASSERT(deferred_call_count == 1);
hook_call_deferred(deferred_func, 10 * MSEC);
usleep(5 * MSEC);
hook_call_deferred(deferred_func, -1);
- usleep(10 * MSEC);
+ usleep(15 * MSEC);
TEST_ASSERT(deferred_call_count == 1);
hook_call_deferred(deferred_func, 10 * MSEC);