summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/gawk
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-10-19 12:35:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-23 17:42:27 +0100
commit0b66f93a7051a0f7372a49c6eba060781c433537 (patch)
tree0630e9270bb89d3b78efaa36040b0904558a9271 /meta/recipes-extended/gawk
parent52f2c3413c4e609bedb854c1d128af990de79685 (diff)
downloadpoky-0b66f93a7051a0f7372a49c6eba060781c433537.tar.gz
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>
Diffstat (limited to 'meta/recipes-extended/gawk')
-rw-r--r--meta/recipes-extended/gawk/gawk/test-time.patch22
-rw-r--r--meta/recipes-extended/gawk/gawk_5.1.0.bb1
2 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk/test-time.patch b/meta/recipes-extended/gawk/gawk/test-time.patch
new file mode 100644
index 0000000000..05a68c5faf
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/test-time.patch
@@ -0,0 +1,22 @@
1The test time.awk does a sleep() and checks that the real sleep duration is
2close to the expected duration.
3
4As currently our tests can run on a heavily loaded system, increase the range of
5a passing duration.
6
7Upstream-Status: Inappropriate
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9
10diff --git a/test/time.awk b/test/time.awk
11index 517377e2..ca81d92d 100644
12--- a/test/time.awk
13+++ b/test/time.awk
14@@ -16,7 +16,7 @@ BEGIN {
15 printf "sleep(%s) = %s\n",delta,sleep(delta)
16 t1 = timecheck()
17 slept = t1-t0
18- if ((slept < 0.9*delta) || (slept > 1.3*delta))
19+ if ((slept < 0.5*delta) || (slept > 2*delta))
20 printf "Warning: tried to sleep %.2f secs, but slept for %.2f secs\n",
21 delta,slept
22 }
diff --git a/meta/recipes-extended/gawk/gawk_5.1.0.bb b/meta/recipes-extended/gawk/gawk_5.1.0.bb
index 3c801e8bcc..0961efa897 100644
--- a/meta/recipes-extended/gawk/gawk_5.1.0.bb
+++ b/meta/recipes-extended/gawk/gawk_5.1.0.bb
@@ -18,6 +18,7 @@ PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ 18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://run-ptest \ 19 file://run-ptest \
20 file://0001-Use-cross-AR-during-compile.patch \ 20 file://0001-Use-cross-AR-during-compile.patch \
21 file://test-time.patch \
21" 22"
22 23
23SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03" 24SRC_URI[md5sum] = "f719bc9966df28e67fc6ebc405e7ea03"