1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

gawk: reduce strictness of the time test

The time.awk test does a sleep() and verifies that the actual delay is
close to the requested time. However on a loaded system the range of
acceptable durations is quite tight and will occasionally fail.

Solve this by increasing the range of acceptable delays slightly to
between 50% and 200% of the requested delay.

[ YOCTO #14371 ]

(From OE-Core rev: 92920dd698c5d3a3d8197083f0a1932e7f6550dc)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2021-10-19 12:35:29 +01:00
committed by Richard Purdie
parent 52f2c3413c
commit 0b66f93a70
2 changed files with 23 additions and 0 deletions
@@ -0,0 +1,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
}
+1
View File
@@ -18,6 +18,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
file://run-ptest \
file://0001-Use-cross-AR-during-compile.patch \
file://test-time.patch \
"
SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03"