Re: [OE-core] [PATCH 2/2] gawk: reduce strictness of the time test

2021-10-19 Thread Ross Burton
On Tue, 19 Oct 2021 at 13:04, Jacob Kroon  wrote:
> I would have removed the test. These load-sensitive tests are gonna fail
> occasionally, whatever limit you put there.

I'm split on this.

Removing the test obviously means that it can never fail, whereas a
timeout will fail given potentially huge load.  But the bounds on a
timeout could be sufficiently large (say, up to 10 seconds instead of
1) to be fairly sure that the underlying code is in fact still
working, which is better than not testing at all.

Ross

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157189): 
https://lists.openembedded.org/g/openembedded-core/message/157189
Mute This Topic: https://lists.openembedded.org/mt/86437428/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH 2/2] gawk: reduce strictness of the time test

2021-10-19 Thread Jacob Kroon

On 10/19/21 13:35, Ross Burton wrote:

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 ]



I would have removed the test. These load-sensitive tests are gonna fail 
occasionally, whatever limit you put there.


Jacob

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157112): 
https://lists.openembedded.org/g/openembedded-core/message/157112
Mute This Topic: https://lists.openembedded.org/mt/86437428/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] gawk: reduce strictness of the time test

2021-10-19 Thread Ross Burton
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 ]

Signed-off-by: Ross Burton 
---
 .../gawk/gawk/test-time.patch | 22 +++
 meta/recipes-extended/gawk/gawk_5.1.0.bb  |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-extended/gawk/gawk/test-time.patch

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 00..05a68c5faf
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/test-time.patch
@@ -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 
+
+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
+ }
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"
 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"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157109): 
https://lists.openembedded.org/g/openembedded-core/message/157109
Mute This Topic: https://lists.openembedded.org/mt/86437428/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-