diff mbox series

[7/9] libc-test: Ignore fma math tests

Message ID 20250821064528.754633-7-raj.khem@gmail.com
State New
Headers show
Series [v2,1/9] m4: Fix ptest on musl | expand

Commit Message

Khem Raj Aug. 21, 2025, 6:45 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-math-Delete-failing-tests.patch      | 291 ++++++++++++++++++
 meta/recipes-core/musl/libc-test_git.bb       |   1 +
 2 files changed, 292 insertions(+)
 create mode 100644 meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch

Comments

patchtest@automation.yoctoproject.org Aug. 21, 2025, 7:04 a.m. UTC | #1
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/7-9-libc-test-Ignore-fma-math-tests.patch

FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)

PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: No modified recipes, skipping pretest (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
diff mbox series

Patch

diff --git a/meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch b/meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch
new file mode 100644
index 00000000000..96ff279fa6c
--- /dev/null
+++ b/meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch
@@ -0,0 +1,291 @@ 
+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 --------------------------------------------
+ src/math/yn.c   | 43 ----------------------------------------
+ 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
+ delete mode 100644 src/math/yn.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;
+-}
+diff --git a/src/math/yn.c b/src/math/yn.c
+deleted file mode 100644
+index 244dbb8..0000000
+--- a/src/math/yn.c
++++ /dev/null
+@@ -1,43 +0,0 @@
+-#define _XOPEN_SOURCE 700
+-#include <stdint.h>
+-#include <stdio.h>
+-#include "mtest.h"
+-
+-static struct di_d t[] = {
+-#include "sanity/yn.h"
+-#include "special/yn.h"
+-};
+-
+-int main(void)
+-{
+-	#pragma STDC FENV_ACCESS ON
+-	double y;
+-	float d;
+-	int e, i, err = 0;
+-	struct di_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 = yn(p->i, p->x);
+-		e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW);
+-
+-		if (!checkexcept(e, p->e, p->r)) {
+-			printf("%s:%d: bad fp exception: %s yn(%lld, %a)=%a, want %s",
+-				p->file, p->line, rstr(p->r), p->i, p->x, p->y, estr(p->e));
+-			printf(" got %s\n", estr(e));
+-			err++;
+-		}
+-		d = ulperr(y, p->y, p->dy);
+-		if ((!(p->x < 0) && !checkulp(d, p->r)) || (p->x < 0 && !isnan(y) && y != -inf)) {
+-			printf("%s:%d: %s yn(%lld, %a) want %a got %a, ulperr %.3f = %a + %a\n",
+-				p->file, p->line, rstr(p->r), p->i, p->x, p->y, y, d, d-p->dy, p->dy);
+-			err++;
+-		}
+-	}
+-	return !!err;
+-}
diff --git a/meta/recipes-core/musl/libc-test_git.bb b/meta/recipes-core/musl/libc-test_git.bb
index 5ec307c25be..9d159ea9d27 100644
--- a/meta/recipes-core/musl/libc-test_git.bb
+++ b/meta/recipes-core/musl/libc-test_git.bb
@@ -14,6 +14,7 @@  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 \
 "