openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gawk: replace AR patch with upstreamed patch
@ 2021-10-19 11:35 Ross Burton
  2021-10-19 11:35 ` [PATCH 2/2] gawk: reduce strictness of the time test Ross Burton
  0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2021-10-19 11:35 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../0001-Use-cross-AR-during-compile.patch    | 47 +++++++++----------
 1 file changed, 21 insertions(+), 26 deletions(-)

diff --git a/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch b/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch
index ca0d668ce9..be6dbe1e57 100644
--- a/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch
+++ b/meta/recipes-extended/gawk/gawk/0001-Use-cross-AR-during-compile.patch
@@ -1,35 +1,30 @@
-From 207b94e37c84007b294e57878c913271aad544ef Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 11 Nov 2020 23:13:23 -0800
-Subject: [PATCH] Use cross AR during compile
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
 
-If AR is specifcied then it should be used instead of defaulting to 'ar'
-from host
+From 47dce6a7002a8d7b818c19d574d81327b769871b Mon Sep 17 00:00:00 2001
+From: "Arnold D. Robbins" <arnold@skeeve.com>
+Date: Fri, 5 Jun 2020 13:14:54 +0300
+Subject: Allow for cross-compile version of ar.
 
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- configure.ac | 7 +++++++
- 1 file changed, 7 insertions(+)
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+(limited to 'configure.ac')
 
 diff --git a/configure.ac b/configure.ac
-index 31364ab..4804f7b 100644
+index 31364ab8..8c256f21 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -92,6 +92,13 @@ GAWK_CANONICAL_HOST
- AC_USE_SYSTEM_EXTENSIONS
+@@ -105,6 +105,9 @@ AC_EXEEXT
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
  
- dnl checks for programs
-+m4_ifndef([AC_PROG_AR],[dnl
-+  AN_MAKEVAR([AR], [AC_PROG_AR])
-+  AN_PROGRAM([ar], [AC_PROG_AR])
-+  AC_DEFUN([AC_PROG_AR],
-+  [AC_CHECK_TOOL(AR, ar, :)])
-+])
-+AC_PROG_AR
- AC_PROG_EGREP
- AC_PROG_YACC
- AC_PROG_LN_S
++# support/ builds libsupport.a, allow for cross version of ar
++AM_PROG_AR
++
+ # This is mainly for my use during testing and development.
+ # Yes, it's a bit of a hack.
+ AC_MSG_CHECKING([for special development options])
 -- 
-2.29.2
-
+cgit v1.2.1
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] gawk: reduce strictness of the time test
  2021-10-19 11:35 [PATCH 1/2] gawk: replace AR patch with upstreamed patch Ross Burton
@ 2021-10-19 11:35 ` Ross Burton
  2021-10-19 12:04   ` [OE-core] " Jacob Kroon
  0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2021-10-19 11:35 UTC (permalink / raw)
  To: openembedded-core

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 <ross.burton@arm.com>
---
 .../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 0000000000..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 <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
+ }
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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH 2/2] gawk: reduce strictness of the time test
  2021-10-19 11:35 ` [PATCH 2/2] gawk: reduce strictness of the time test Ross Burton
@ 2021-10-19 12:04   ` Jacob Kroon
  2021-10-19 17:03     ` Ross Burton
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Kroon @ 2021-10-19 12:04 UTC (permalink / raw)
  To: Ross Burton, openembedded-core

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH 2/2] gawk: reduce strictness of the time test
  2021-10-19 12:04   ` [OE-core] " Jacob Kroon
@ 2021-10-19 17:03     ` Ross Burton
  0 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2021-10-19 17:03 UTC (permalink / raw)
  To: Jacob Kroon; +Cc: OE-core

On Tue, 19 Oct 2021 at 13:04, Jacob Kroon <jacob.kroon@gmail.com> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-19 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 11:35 [PATCH 1/2] gawk: replace AR patch with upstreamed patch Ross Burton
2021-10-19 11:35 ` [PATCH 2/2] gawk: reduce strictness of the time test Ross Burton
2021-10-19 12:04   ` [OE-core] " Jacob Kroon
2021-10-19 17:03     ` Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).