From: Khem Raj Date: Thu, 24 Jul 2025 07:24:13 +0000 (-0700) Subject: busybox: Skip a non-posix awk ptest on musl systems X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a74eaca8e1830d09c5ff678c7d361cedbfc6f68a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git busybox: Skip a non-posix awk ptest on musl systems The test depends on BSD extension REG_STARTEND which is not in POSIX, glibc does implement this extention so it works on glibc systems but musl does not and it needs to be skipped and LIBC environment variable is used in this test as well to run it conditionally. Signed-off-by: Khem Raj Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 4ebaeb92c9..c203f2f8f1 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -371,6 +371,7 @@ do_install_ptest () { rm -rf ${D}${PTEST_PATH}/testsuite/wget sort ${B}/.config > ${D}${PTEST_PATH}/.config ln -s ${base_bindir}/busybox ${D}${PTEST_PATH}/busybox + sed -i -e 's|LIBC=""|LIBC=${TCLIBC}|g' ${D}${PTEST_PATH}/run-ptest } inherit update-alternatives diff --git a/meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch b/meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch new file mode 100644 index 0000000000..18e57a87be --- /dev/null +++ b/meta/recipes-core/busybox/busybox/0001-busybox-Add-awk-gsub-erroneous-word-start-match-test.patch @@ -0,0 +1,28 @@ +From 7ee04187bd59acc922982fb49e76ba6c39dd8a91 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 11 May 2025 08:36:54 -0700 +Subject: [PATCH] busybox: Add awk gsub erroneous word start match test to know fails on musl + +Musl does not implement this BSD extension REG_STARTEND and the test states +that it will fail without this extention, therefore guard it with SKIP_KNOWN_BUGS +so it can be ignored. + +Upstream-Status: Submitted [https://lists.busybox.net/pipermail/busybox/2025-July/091623.html] +Signed-off-by: Khem Raj +--- + testsuite/awk.tests | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/testsuite/awk.tests b/testsuite/awk.tests +index be25f6696..c56e217e8 100755 +--- a/testsuite/awk.tests ++++ b/testsuite/awk.tests +@@ -612,7 +612,7 @@ b + # Currently we use REG_STARTEND ("This flag is a BSD extension, not present in POSIX") + # to implement the code to handle this correctly, but if your libc has no REG_STARTEND, + # the alternative code mishandles this case. +-testing 'awk gsub erroneous word start match' \ ++test x"$LIBC" != x"musl" && testing 'awk gsub erroneous word start match' \ + "awk 'BEGIN { a=\"abc\"; gsub(/\