summaryrefslogtreecommitdiff
path: root/test/hooks.c
diff options
context:
space:
mode:
authorVic (Chun-Ju) Yang <victoryang@chromium.org>2014-01-08 16:08:26 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-08 16:39:38 +0000
commit65825452ba64a103cab267de4376a7f03cd8975a (patch)
tree2d5850db995ab928ac36329fd4f6c6ce4c345c49 /test/hooks.c
parent10081abeb653a6fef4aa735a0f11a48d4d04dc67 (diff)
downloadchrome-ec-65825452ba64a103cab267de4376a7f03cd8975a.tar.gz
Fix an integer underflow bug in hooks test
The variable 'interval' is declared as unsigned integer, and this sometimes causes an integer underflow when substracting it by SECOND, and in turns leads to false test failure. Changing it to signed integer. BUG=chrome-os-partner:19236 TEST=Repeatedly run hooks test BRANCH=None Change-Id: Ic6d8001f90fb8756b6bdadf811a668c02fbccb34 Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/181882 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'test/hooks.c')
-rw-r--r--test/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/hooks.c b/test/hooks.c
index 0e3c4f0e0e..b3bcbd9e41 100644
--- a/test/hooks.c
+++ b/test/hooks.c
@@ -70,7 +70,7 @@ static int test_init_hook(void)
static int test_ticks(void)
{
- uint64_t interval;
+ int64_t interval;
int error_pct;
/*