deleted file mode 100644
@@ -1,240 +0,0 @@
-From c46b87834ad13c8e1b8f4ae1655773fc946c98e5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 20 Aug 2025 12:41:26 -0700
-Subject: [PATCH] math: Delete failing tests
-
-These tests are regularly failing due ot fenv
-issue on musl but its not prioritized enough
-in musl. Ignore them for now.
-
-Upstream-Status: Inappropriate [musl-specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/math/fma.c | 47 --------------------------------------------
- src/math/fmaf.c | 47 --------------------------------------------
- src/math/fmal.c | 52 -------------------------------------------------
- src/math/powf.c | 47 --------------------------------------------
- 5 files changed, 236 deletions(-)
- delete mode 100644 src/math/fma.c
- delete mode 100644 src/math/fmaf.c
- delete mode 100644 src/math/fmal.c
- delete mode 100644 src/math/powf.c
-
-diff --git a/src/math/fma.c b/src/math/fma.c
-deleted file mode 100644
-index 24b65c8..0000000
---- a/src/math/fma.c
-+++ /dev/null
-@@ -1,47 +0,0 @@
--#include <stdint.h>
--#include <stdio.h>
--#include "mtest.h"
--
--static struct ddd_d t[] = {
--#include "sanity/fma.h"
--#include "special/fma.h"
--};
--
--int main(void)
--{
-- #pragma STDC FENV_ACCESS ON
-- double y;
-- float d;
-- int e, i, err = 0;
-- struct ddd_d *p;
--
-- for (i = 0; i < sizeof t/sizeof *t; i++) {
-- p = t + i;
--
-- if (p->r < 0)
-- continue;
-- fesetround(p->r);
-- feclearexcept(FE_ALL_EXCEPT);
-- y = fma(p->x, p->x2, p->x3);
-- e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
--
-- /* do not check inexact by default */
--#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
-- if (!checkexceptall(e, p->e, p->r)) {
--#else
-- if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) {
--#endif
-- printf("%s:%d: bad fp exception: %s fma(%a,%a,%a)=%a, want %s",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e));
-- printf(" got %s\n", estr(e));
-- err++;
-- }
-- d = ulperr(y, p->y, p->dy);
-- if (!checkcr(y, p->y, p->r)) {
-- printf("%s:%d: %s fma(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy);
-- err++;
-- }
-- }
-- return !!err;
--}
-diff --git a/src/math/fmaf.c b/src/math/fmaf.c
-deleted file mode 100644
-index c4329a2..0000000
---- a/src/math/fmaf.c
-+++ /dev/null
-@@ -1,47 +0,0 @@
--#include <stdint.h>
--#include <stdio.h>
--#include "mtest.h"
--
--static struct fff_f t[] = {
--#include "sanity/fmaf.h"
--#include "special/fmaf.h"
--};
--
--int main(void)
--{
-- #pragma STDC FENV_ACCESS ON
-- float y;
-- float d;
-- int e, i, err = 0;
-- struct fff_f *p;
--
-- for (i = 0; i < sizeof t/sizeof *t; i++) {
-- p = t + i;
--
-- if (p->r < 0)
-- continue;
-- fesetround(p->r);
-- feclearexcept(FE_ALL_EXCEPT);
-- y = fmaf(p->x, p->x2, p->x3);
-- e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
--
-- /* do not check inexact by default */
--#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
-- if (!checkexceptall(e, p->e, p->r)) {
--#else
-- if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) {
--#endif
-- printf("%s:%d: bad fp exception: %s fmaf(%a,%a,%a)=%a, want %s",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e));
-- printf(" got %s\n", estr(e));
-- err++;
-- }
-- d = ulperrf(y, p->y, p->dy);
-- if (!checkcr(y, p->y, p->r)) {
-- printf("%s:%d: %s fmaf(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy);
-- err++;
-- }
-- }
-- return !!err;
--}
-diff --git a/src/math/fmal.c b/src/math/fmal.c
-deleted file mode 100644
-index 791d5d3..0000000
---- a/src/math/fmal.c
-+++ /dev/null
-@@ -1,52 +0,0 @@
--#include <stdint.h>
--#include <stdio.h>
--#include "mtest.h"
--
--static struct lll_l t[] = {
--#if LDBL_MANT_DIG == 53
--#include "sanity/fma.h"
--#include "special/fma.h"
--#elif LDBL_MANT_DIG == 64
--#include "sanity/fmal.h"
--#include "special/fmal.h"
--#endif
--};
--
--int main(void)
--{
-- #pragma STDC FENV_ACCESS ON
-- long double y;
-- float d;
-- int e, i, err = 0;
-- struct lll_l *p;
--
-- for (i = 0; i < sizeof t/sizeof *t; i++) {
-- p = t + i;
--
-- if (p->r < 0)
-- continue;
-- fesetround(p->r);
-- feclearexcept(FE_ALL_EXCEPT);
-- y = fmal(p->x, p->x2, p->x3);
-- e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
--
-- /* do not check inexact by default */
--#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION
-- if (!checkexceptall(e, p->e, p->r)) {
--#else
-- if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) {
--#endif
-- printf("%s:%d: bad fp exception: %s fmal(%La,%La,%La)=%La, want %s",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e));
-- printf(" got %s\n", estr(e));
-- err++;
-- }
-- d = ulperrl(y, p->y, p->dy);
-- if (!checkcr(y, p->y, p->r)) {
-- printf("%s:%d: %s fmal(%La,%La,%La) want %La got %La ulperr %.3f = %a + %a\n",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy);
-- err++;
-- }
-- }
-- return !!err;
--}
-diff --git a/src/math/powf.c b/src/math/powf.c
-deleted file mode 100644
-index 4778c2f..0000000
---- a/src/math/powf.c
-+++ /dev/null
-@@ -1,47 +0,0 @@
--#include <stdint.h>
--#include <stdio.h>
--#include "mtest.h"
--
--static struct ff_f t[] = {
--#include "ucb/powf.h"
--#include "sanity/powf.h"
--#include "special/powf.h"
--
--};
--
--int main(void)
--{
-- #pragma STDC FENV_ACCESS ON
-- float y;
-- float d;
-- int e, i, err = 0;
-- struct ff_f *p;
--
-- for (i = 0; i < sizeof t/sizeof *t; i++) {
-- p = t + i;
--
-- if (p->r < 0)
-- continue;
-- fesetround(p->r);
-- feclearexcept(FE_ALL_EXCEPT);
-- y = powf(p->x, p->x2);
-- e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
--
-- if (!checkexcept(e, p->e, p->r)) {
-- if (fabsf(y) < 0x1p-126f && (e|INEXACT) == (INEXACT|UNDERFLOW))
-- printf("X ");
-- else
-- err++;
-- printf("%s:%d: bad fp exception: %s powf(%a,%a)=%a, want %s",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e));
-- printf(" got %s\n", estr(e));
-- }
-- d = ulperrf(y, p->y, p->dy);
-- if (!checkulp(d, p->r)) {
-- printf("%s:%d: %s powf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n",
-- p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy);
-- err++;
-- }
-- }
-- return !!err;
--}
@@ -9,18 +9,19 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=43ed1245085be90dc934288117d55a3b"
inherit ptest
-SRCREV = "f2bac7711bec93467b73bec1465579ea0b8d5071"
+SRCREV = "63e36e934e8f2bedf645303a90b64098e2af6c8f"
SRC_URI = " \
git://repo.or.cz/libc-test;branch=master;protocol=https \
file://0001-Fix-strptime-on-musl.patch \
file://0001-api-unistd-guard-optional-obsolete-_PC-_SC-constants.patch \
- file://0001-math-Delete-failing-tests.patch \
file://run-ptest \
file://run-libc-ptests \
"
PV = "0+git"
+UPSTREAM_CHECK_COMMITS = "1"
+
# libc-test 'make' or 'make run' command is designed to build and run tests. It
# reports both build and test failures. The commands should be run on target.
do_compile() {
@@ -43,6 +44,10 @@ RDEPENDS:${PN}-ptest = " \
tzdata \
"
+# Tests that fail on musl: fenv issues (math) and bugs not fixed yet
+LIBC_TEST_EXCLUDE ?= "math/fma math/fmaf math/fmal math/powf \
+ functional/wordexp regression/regex-backref-oob regression/regexec-backref"
+
install_path = "/opt/${PN}"
FILES:${PN} += "${install_path}/*"
@@ -50,6 +55,7 @@ do_install () {
install -d ${D}${install_path}/
cp ${S}/Makefile ${D}${install_path}
cp ${S}/config.mak.def ${D}${install_path}/config.mak
+ echo 'NAMES:=$(filter-out ${LIBC_TEST_EXCLUDE},$(NAMES))' >> ${D}${install_path}/config.mak
cp -r ${S}/src ${D}${install_path}
}
Update to the current master, which brings 18 commits, mostly new tests: wordexp, regex backreferences, strtod rounding and fma/pow corner cases. Leave out the tests that fail on musl with a NAMES filter in config.mak, listed in LIBC_TEST_EXCLUDE, instead of deleting their sources: - math/fma, fmaf, fmal and powf fail because of fenv issues in musl; they were deleted by 0001-math-Delete-failing-tests.patch, now dropped. - The new functional/wordexp, regression/regex-backref-oob and regression/regexec-backref tests check for bugs that musl master does not fix yet. The deep nested arithmetic case in the wordexp test also crashes bash as /bin/sh. Add UPSTREAM_CHECK_COMMITS so new commits on master are reported. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../0001-math-Delete-failing-tests.patch | 240 ------------------ meta/recipes-core/musl/libc-test_git.bb | 10 +- 2 files changed, 8 insertions(+), 242 deletions(-) delete mode 100644 meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch