Skip to contentSkip to conversation

gawk: Disable known ptest fails on musl

PATCH New Khem Raj 1 participant 3 messages Apr 14, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v3 1/3 gawk: Disable known ptest fails on musl

Add needed locale rdeps on musl as well.

---
v2: Delete failing tests on musl
v3: No change

 meta/recipes-extended/gawk/gawk_5.2.1.bb | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
meta/recipes-extended/gawk/gawk_5.2.1.bb +15 -2
index e381bad148..bbb26231a1 100644
@@ -62,8 +62,21 @@ do_install_ptest() {
 	rm -f ${D}${PTEST_PATH}/test/timeout.*
 }
 
-RDEPENDS:${PN}-ptest += "make"
+do_install_ptest:append:libc-musl() {
+	# Reported  https://lists.gnu.org/archive/html/bug-gawk/2021-02/msg00005.html
+	rm -f ${D}${PTEST_PATH}/test/clos1way6.*
+	# Needs en_US.UTF-8 but then does not work with musl
+	rm -f ${D}${PTEST_PATH}/test/backsmalls1.*
+	# Needs en_US.UTF-8 but then does not work with musl
+	rm -f ${D}${PTEST_PATH}/test/commas.*
+	# The below two need LANG=C inside the make rule for musl
+	rm -f ${D}${PTEST_PATH}/test/rebt8b1.*
+	rm -f ${D}${PTEST_PATH}/test/regx8bit.*
+}
+
+RDEPENDS:${PN}-ptest += "make locale-base-en-us"
 
-RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us locale-base-en-us.iso-8859-1"
+RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1"
+RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales"
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.40.0
author
#1 lore raw

PATCH v3 2/3 gawk: Remove redundant patch

This patch is doing the same things thats already being done in the do_install_ptest where the problematic tests are being deleted from final package. run-ptest script runs a find for available tests and runs each test target found during run therefore its enough to remove them from final install.

---
v2: New
v3: No change

 .../gawk/gawk/remove-sensitive-tests.patch    | 43 -------------------
 meta/recipes-extended/gawk/gawk_5.2.1.bb      |  1 -
 2 files changed, 44 deletions(-)
 delete mode 100644 meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch
meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch deleted +0 -43
deleted file mode 100644
index ffae55058b..0000000000
@@ -1,43 +0,0 @@
-From 354d24baf7c51977d22ff61ad42e6a2cbd4dc8ac Mon Sep 17 00:00:00 2001
-From: Ross Burton <[email protected]>
-Date: Tue, 21 Dec 2021 17:09:12 +0000
-Subject: [PATCH] gawk: remove load-sensitive tests
-
-These tests require an unloaded host as otherwise timing sensitive tests can fail
-https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton <[email protected]>
-
----
- test/Maketests | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/test/Maketests b/test/Maketests
-index 3a667af..f117697 100644
---- a/test/Maketests
-+++ b/test/Maketests
-@@ -2137,11 +2137,6 @@ symtab12:
- 	@-AWKPATH="$(srcdir)" $(AWK) -f [email protected]  >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- 	@-$(CMP) "$(srcdir)"/[email protected] _$@ && rm -f _$@
- 
--timeout:
--	@echo $@ $(ZOS_FAIL)
--	@-AWKPATH="$(srcdir)" $(AWK) -f [email protected]  >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
--	@-$(CMP) "$(srcdir)"/[email protected] _$@ && rm -f _$@
--
- typedregex1:
- 	@echo $@
- 	@-AWKPATH="$(srcdir)" $(AWK) -f [email protected]  >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
-@@ -2371,11 +2366,6 @@ rwarray:
- 	@-AWKPATH="$(srcdir)" $(AWK) -f [email protected]  < "$(srcdir)"/[email protected] >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- 	@-$(CMP) "$(srcdir)"/[email protected] _$@ && rm -f _$@
- 
--time:
--	@echo $@
--	@-AWKPATH="$(srcdir)" $(AWK) -f [email protected]  >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
--	@-$(CMP) "$(srcdir)"/[email protected] _$@ && rm -f _$@
--
- mpfrbigint:
- 	@echo $@
- 	@-AWKPATH="$(srcdir)" $(AWK) -f [email protected]  -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
meta/recipes-extended/gawk/gawk_5.2.1.bb +0 -1
index bbb26231a1..c914326563 100644
@@ -16,7 +16,6 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
 PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
 
 SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
-           file://remove-sensitive-tests.patch \
            file://run-ptest \
            "
 
Signature · 1 line
2.40.0
author
#2 lore raw

PATCH v3 3/3 gawk: Add skipped.txt to emit test to ignore

In reply to Khem Raj

This file can be processed by run-ptest during runtime and tests mentioned in skipped.txt will not be run.

---
v3: New

 meta/recipes-extended/gawk/gawk/run-ptest | 5 +++++
 meta/recipes-extended/gawk/gawk_5.2.1.bb  | 6 ++++++
 2 files changed, 11 insertions(+)
meta/recipes-extended/gawk/gawk/run-ptest +5 -0
index 2675650600..f4ef3e7bd4 100644
@@ -3,6 +3,11 @@
 cd test
 for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do
   unset LANG
+  grep -q "^$i$" skipped.txt
+  if [ $? -eq 0 ]; then
+    echo "SKIP: $i"
+    continue
+  fi
   srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1
   if [ -e _$i ]; then
     cat _$i
meta/recipes-extended/gawk/gawk_5.2.1.bb +6 -0
index c914326563..768c8eb364 100644
@@ -59,6 +59,9 @@ do_install_ptest() {
 	# https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371
 	rm -f ${D}${PTEST_PATH}/test/time.*
 	rm -f ${D}${PTEST_PATH}/test/timeout.*
+	for t in time timeout; do
+		echo $t >> ${D}${PTEST_PATH}/test/skipped.txt
+	done
 }
 
 do_install_ptest:append:libc-musl() {
@@ -71,6 +74,9 @@ do_install_ptest:append:libc-musl() {
 	# The below two need LANG=C inside the make rule for musl
 	rm -f ${D}${PTEST_PATH}/test/rebt8b1.*
 	rm -f ${D}${PTEST_PATH}/test/regx8bit.*
+	for t in clos1way6 backsmalls1 commas rebt8b1 regx8bit; do
+		echo $t >> ${D}${PTEST_PATH}/test/skipped.txt
+	done
 }
 
 RDEPENDS:${PN}-ptest += "make locale-base-en-us"
Signature · 1 line
2.40.0