From edf7240a00cee42084249cacea4ddee44c05eb2c Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Sun, 25 Aug 2024 18:20:45 +0200 Subject: [PATCH] make sure we do not go over the timeout --- bench/tool/tool.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bench/tool/tool.ml b/bench/tool/tool.ml index bf79771a8..f51e5891b 100644 --- a/bench/tool/tool.ml +++ b/bench/tool/tool.ml @@ -58,8 +58,12 @@ let wait_pid = let stime = stime_diff in let clock = end_time -. start_time in + (* Sometimes the clock goes a little bit above the allowed timeout... *) + let clock = min clock timeout in let rusage = { Report.Rusage.clock; utime; stime } in - if !did_timeout then Report.Run_result.Timeout rusage + + if !did_timeout || Float.equal clock timeout then + Report.Run_result.Timeout rusage else match status with | WEXITED code -> begin