From eda52c4ab4c8c3090a07132a4f66efd3a639badd Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Wed, 24 Jul 2013 07:21:58 +0800 Subject: Lessen timing constraints in hooks test HOOK_TICK and HOOK_SECOND aren't firing with precise interval. Let's lessen the timing constraints. BUG=chromium:263288 TEST=Pass all tests BRANCH=None Change-Id: Ic093c2a27ed1b8621469a4097e567b80d1eeb50d Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/63144 Reviewed-by: Randall Spangler --- test/hooks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/hooks.c b/test/hooks.c index 843833917a..679cf584d3 100644 --- a/test/hooks.c +++ b/test/hooks.c @@ -82,11 +82,11 @@ static int test_ticks(void) interval = tick_time[1].val - tick_time[0].val; error_pct = (interval - HOOK_TICK_INTERVAL) * 100 / HOOK_TICK_INTERVAL; - TEST_ASSERT_ABS_LESS(error_pct, 3); + TEST_ASSERT_ABS_LESS(error_pct, 10); interval = second_time[1].val - second_time[0].val; - error_pct = (interval - 1000 * MSEC) * 100 / (1000 * MSEC); - TEST_ASSERT_ABS_LESS(error_pct, 3); + error_pct = (interval - SECOND) * 100 / SECOND; + TEST_ASSERT_ABS_LESS(error_pct, 10); return EC_SUCCESS; } -- cgit v1.2.1