From 29d14affe55ffc3a2bb9eee19c355b756aeb7f7e Mon Sep 17 00:00:00 2001 From: Andrea Grandi Date: Fri, 9 Dec 2022 12:04:40 -0800 Subject: test: Increase tolerance of timer test Timer test is flaky on hardware so we increase the tolerance to avoid false errors. This is okay since the primary goal of the test is to verify we can build timer functions on all platforms, not verify their accuracy. BUG=b:260723169 TEST=test/run_device_tests.py -b bloonchipper -t timer TEST=test/run_device_tests.py -b dartmonkey -t timer TEST=make run-timer BRANCH=none Signed-off-by: Andrea Grandi Change-Id: I0442fe212ce305b04ad89ba67e227abd6bcc7fa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4093614 Code-Coverage: Zoss Reviewed-by: Tom Hughes --- test/timer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/timer.cc b/test/timer.cc index 8eb5f87519..bac49f8498 100644 --- a/test/timer.cc +++ b/test/timer.cc @@ -26,7 +26,7 @@ test_static int test_usleep(void) usleep(expected_duration); int sleep_duration = time_since32(start_time); - TEST_NEAR(expected_duration, sleep_duration, 20, "%d"); + TEST_NEAR(expected_duration, sleep_duration, 100, "%d"); return EC_SUCCESS; } -- cgit v1.2.1