summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/gawk/gawk/test-time.patch
blob: 05a68c5faf85d50357ade388a340e0392b9e9ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
The test time.awk does a sleep() and checks that the real sleep duration is
close to the expected duration.

As currently our tests can run on a heavily loaded system, increase the range of
a passing duration.

Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>

diff --git a/test/time.awk b/test/time.awk
index 517377e2..ca81d92d 100644
--- a/test/time.awk
+++ b/test/time.awk
@@ -16,7 +16,7 @@ BEGIN {
    printf "sleep(%s) = %s\n",delta,sleep(delta)
    t1 = timecheck()
    slept = t1-t0
-   if ((slept < 0.9*delta) || (slept > 1.3*delta))
+   if ((slept < 0.5*delta) || (slept > 2*delta))
       printf "Warning: tried to sleep %.2f secs, but slept for %.2f secs\n",
 	     delta,slept
 }