diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-08-20 23:45:24 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-25 17:47:20 +0100 |
| commit | 86f54ee3cdcbc7544121d2dd7093a4049ea84333 (patch) | |
| tree | 3042cd2ccfa1178e3b2b19b1a853e4dd94d4708e /meta | |
| parent | 28eb7f66337bceee57b855b6e8112e6888dd02c2 (diff) | |
| download | poky-86f54ee3cdcbc7544121d2dd7093a4049ea84333.tar.gz | |
libc-test: Ignore fma math tests
(From OE-Core rev: 135a572cdb7c7cf487aa46ef1a5500b81593a30a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch | 291 | ||||
| -rw-r--r-- | meta/recipes-core/musl/libc-test_git.bb | 1 |
2 files changed, 292 insertions, 0 deletions
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 0000000000..96ff279fa6 --- /dev/null +++ b/meta/recipes-core/musl/libc-test/0001-math-Delete-failing-tests.patch | |||
| @@ -0,0 +1,291 @@ | |||
| 1 | From c46b87834ad13c8e1b8f4ae1655773fc946c98e5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 20 Aug 2025 12:41:26 -0700 | ||
| 4 | Subject: [PATCH] math: Delete failing tests | ||
| 5 | |||
| 6 | These tests are regularly failing due ot fenv | ||
| 7 | issue on musl but its not prioritized enough | ||
| 8 | in musl. Ignore them for now. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [musl-specific] | ||
| 11 | |||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | src/math/fma.c | 47 -------------------------------------------- | ||
| 15 | src/math/fmaf.c | 47 -------------------------------------------- | ||
| 16 | src/math/fmal.c | 52 ------------------------------------------------- | ||
| 17 | src/math/powf.c | 47 -------------------------------------------- | ||
| 18 | src/math/yn.c | 43 ---------------------------------------- | ||
| 19 | 5 files changed, 236 deletions(-) | ||
| 20 | delete mode 100644 src/math/fma.c | ||
| 21 | delete mode 100644 src/math/fmaf.c | ||
| 22 | delete mode 100644 src/math/fmal.c | ||
| 23 | delete mode 100644 src/math/powf.c | ||
| 24 | delete mode 100644 src/math/yn.c | ||
| 25 | |||
| 26 | diff --git a/src/math/fma.c b/src/math/fma.c | ||
| 27 | deleted file mode 100644 | ||
| 28 | index 24b65c8..0000000 | ||
| 29 | --- a/src/math/fma.c | ||
| 30 | +++ /dev/null | ||
| 31 | @@ -1,47 +0,0 @@ | ||
| 32 | -#include <stdint.h> | ||
| 33 | -#include <stdio.h> | ||
| 34 | -#include "mtest.h" | ||
| 35 | - | ||
| 36 | -static struct ddd_d t[] = { | ||
| 37 | -#include "sanity/fma.h" | ||
| 38 | -#include "special/fma.h" | ||
| 39 | -}; | ||
| 40 | - | ||
| 41 | -int main(void) | ||
| 42 | -{ | ||
| 43 | - #pragma STDC FENV_ACCESS ON | ||
| 44 | - double y; | ||
| 45 | - float d; | ||
| 46 | - int e, i, err = 0; | ||
| 47 | - struct ddd_d *p; | ||
| 48 | - | ||
| 49 | - for (i = 0; i < sizeof t/sizeof *t; i++) { | ||
| 50 | - p = t + i; | ||
| 51 | - | ||
| 52 | - if (p->r < 0) | ||
| 53 | - continue; | ||
| 54 | - fesetround(p->r); | ||
| 55 | - feclearexcept(FE_ALL_EXCEPT); | ||
| 56 | - y = fma(p->x, p->x2, p->x3); | ||
| 57 | - e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); | ||
| 58 | - | ||
| 59 | - /* do not check inexact by default */ | ||
| 60 | -#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION | ||
| 61 | - if (!checkexceptall(e, p->e, p->r)) { | ||
| 62 | -#else | ||
| 63 | - if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) { | ||
| 64 | -#endif | ||
| 65 | - printf("%s:%d: bad fp exception: %s fma(%a,%a,%a)=%a, want %s", | ||
| 66 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e)); | ||
| 67 | - printf(" got %s\n", estr(e)); | ||
| 68 | - err++; | ||
| 69 | - } | ||
| 70 | - d = ulperr(y, p->y, p->dy); | ||
| 71 | - if (!checkcr(y, p->y, p->r)) { | ||
| 72 | - printf("%s:%d: %s fma(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n", | ||
| 73 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); | ||
| 74 | - err++; | ||
| 75 | - } | ||
| 76 | - } | ||
| 77 | - return !!err; | ||
| 78 | -} | ||
| 79 | diff --git a/src/math/fmaf.c b/src/math/fmaf.c | ||
| 80 | deleted file mode 100644 | ||
| 81 | index c4329a2..0000000 | ||
| 82 | --- a/src/math/fmaf.c | ||
| 83 | +++ /dev/null | ||
| 84 | @@ -1,47 +0,0 @@ | ||
| 85 | -#include <stdint.h> | ||
| 86 | -#include <stdio.h> | ||
| 87 | -#include "mtest.h" | ||
| 88 | - | ||
| 89 | -static struct fff_f t[] = { | ||
| 90 | -#include "sanity/fmaf.h" | ||
| 91 | -#include "special/fmaf.h" | ||
| 92 | -}; | ||
| 93 | - | ||
| 94 | -int main(void) | ||
| 95 | -{ | ||
| 96 | - #pragma STDC FENV_ACCESS ON | ||
| 97 | - float y; | ||
| 98 | - float d; | ||
| 99 | - int e, i, err = 0; | ||
| 100 | - struct fff_f *p; | ||
| 101 | - | ||
| 102 | - for (i = 0; i < sizeof t/sizeof *t; i++) { | ||
| 103 | - p = t + i; | ||
| 104 | - | ||
| 105 | - if (p->r < 0) | ||
| 106 | - continue; | ||
| 107 | - fesetround(p->r); | ||
| 108 | - feclearexcept(FE_ALL_EXCEPT); | ||
| 109 | - y = fmaf(p->x, p->x2, p->x3); | ||
| 110 | - e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); | ||
| 111 | - | ||
| 112 | - /* do not check inexact by default */ | ||
| 113 | -#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION | ||
| 114 | - if (!checkexceptall(e, p->e, p->r)) { | ||
| 115 | -#else | ||
| 116 | - if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) { | ||
| 117 | -#endif | ||
| 118 | - printf("%s:%d: bad fp exception: %s fmaf(%a,%a,%a)=%a, want %s", | ||
| 119 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e)); | ||
| 120 | - printf(" got %s\n", estr(e)); | ||
| 121 | - err++; | ||
| 122 | - } | ||
| 123 | - d = ulperrf(y, p->y, p->dy); | ||
| 124 | - if (!checkcr(y, p->y, p->r)) { | ||
| 125 | - printf("%s:%d: %s fmaf(%a,%a,%a) want %a got %a ulperr %.3f = %a + %a\n", | ||
| 126 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); | ||
| 127 | - err++; | ||
| 128 | - } | ||
| 129 | - } | ||
| 130 | - return !!err; | ||
| 131 | -} | ||
| 132 | diff --git a/src/math/fmal.c b/src/math/fmal.c | ||
| 133 | deleted file mode 100644 | ||
| 134 | index 791d5d3..0000000 | ||
| 135 | --- a/src/math/fmal.c | ||
| 136 | +++ /dev/null | ||
| 137 | @@ -1,52 +0,0 @@ | ||
| 138 | -#include <stdint.h> | ||
| 139 | -#include <stdio.h> | ||
| 140 | -#include "mtest.h" | ||
| 141 | - | ||
| 142 | -static struct lll_l t[] = { | ||
| 143 | -#if LDBL_MANT_DIG == 53 | ||
| 144 | -#include "sanity/fma.h" | ||
| 145 | -#include "special/fma.h" | ||
| 146 | -#elif LDBL_MANT_DIG == 64 | ||
| 147 | -#include "sanity/fmal.h" | ||
| 148 | -#include "special/fmal.h" | ||
| 149 | -#endif | ||
| 150 | -}; | ||
| 151 | - | ||
| 152 | -int main(void) | ||
| 153 | -{ | ||
| 154 | - #pragma STDC FENV_ACCESS ON | ||
| 155 | - long double y; | ||
| 156 | - float d; | ||
| 157 | - int e, i, err = 0; | ||
| 158 | - struct lll_l *p; | ||
| 159 | - | ||
| 160 | - for (i = 0; i < sizeof t/sizeof *t; i++) { | ||
| 161 | - p = t + i; | ||
| 162 | - | ||
| 163 | - if (p->r < 0) | ||
| 164 | - continue; | ||
| 165 | - fesetround(p->r); | ||
| 166 | - feclearexcept(FE_ALL_EXCEPT); | ||
| 167 | - y = fmal(p->x, p->x2, p->x3); | ||
| 168 | - e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); | ||
| 169 | - | ||
| 170 | - /* do not check inexact by default */ | ||
| 171 | -#if defined CHECK_INEXACT || defined CHECK_INEXACT_OMISSION | ||
| 172 | - if (!checkexceptall(e, p->e, p->r)) { | ||
| 173 | -#else | ||
| 174 | - if (!checkexceptall(e|INEXACT, p->e|INEXACT, p->r)) { | ||
| 175 | -#endif | ||
| 176 | - printf("%s:%d: bad fp exception: %s fmal(%La,%La,%La)=%La, want %s", | ||
| 177 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, estr(p->e)); | ||
| 178 | - printf(" got %s\n", estr(e)); | ||
| 179 | - err++; | ||
| 180 | - } | ||
| 181 | - d = ulperrl(y, p->y, p->dy); | ||
| 182 | - if (!checkcr(y, p->y, p->r)) { | ||
| 183 | - printf("%s:%d: %s fmal(%La,%La,%La) want %La got %La ulperr %.3f = %a + %a\n", | ||
| 184 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->x3, p->y, y, d, d-p->dy, p->dy); | ||
| 185 | - err++; | ||
| 186 | - } | ||
| 187 | - } | ||
| 188 | - return !!err; | ||
| 189 | -} | ||
| 190 | diff --git a/src/math/powf.c b/src/math/powf.c | ||
| 191 | deleted file mode 100644 | ||
| 192 | index 4778c2f..0000000 | ||
| 193 | --- a/src/math/powf.c | ||
| 194 | +++ /dev/null | ||
| 195 | @@ -1,47 +0,0 @@ | ||
| 196 | -#include <stdint.h> | ||
| 197 | -#include <stdio.h> | ||
| 198 | -#include "mtest.h" | ||
| 199 | - | ||
| 200 | -static struct ff_f t[] = { | ||
| 201 | -#include "ucb/powf.h" | ||
| 202 | -#include "sanity/powf.h" | ||
| 203 | -#include "special/powf.h" | ||
| 204 | - | ||
| 205 | -}; | ||
| 206 | - | ||
| 207 | -int main(void) | ||
| 208 | -{ | ||
| 209 | - #pragma STDC FENV_ACCESS ON | ||
| 210 | - float y; | ||
| 211 | - float d; | ||
| 212 | - int e, i, err = 0; | ||
| 213 | - struct ff_f *p; | ||
| 214 | - | ||
| 215 | - for (i = 0; i < sizeof t/sizeof *t; i++) { | ||
| 216 | - p = t + i; | ||
| 217 | - | ||
| 218 | - if (p->r < 0) | ||
| 219 | - continue; | ||
| 220 | - fesetround(p->r); | ||
| 221 | - feclearexcept(FE_ALL_EXCEPT); | ||
| 222 | - y = powf(p->x, p->x2); | ||
| 223 | - e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); | ||
| 224 | - | ||
| 225 | - if (!checkexcept(e, p->e, p->r)) { | ||
| 226 | - if (fabsf(y) < 0x1p-126f && (e|INEXACT) == (INEXACT|UNDERFLOW)) | ||
| 227 | - printf("X "); | ||
| 228 | - else | ||
| 229 | - err++; | ||
| 230 | - printf("%s:%d: bad fp exception: %s powf(%a,%a)=%a, want %s", | ||
| 231 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->y, estr(p->e)); | ||
| 232 | - printf(" got %s\n", estr(e)); | ||
| 233 | - } | ||
| 234 | - d = ulperrf(y, p->y, p->dy); | ||
| 235 | - if (!checkulp(d, p->r)) { | ||
| 236 | - printf("%s:%d: %s powf(%a,%a) want %a got %a ulperr %.3f = %a + %a\n", | ||
| 237 | - p->file, p->line, rstr(p->r), p->x, p->x2, p->y, y, d, d-p->dy, p->dy); | ||
| 238 | - err++; | ||
| 239 | - } | ||
| 240 | - } | ||
| 241 | - return !!err; | ||
| 242 | -} | ||
| 243 | diff --git a/src/math/yn.c b/src/math/yn.c | ||
| 244 | deleted file mode 100644 | ||
| 245 | index 244dbb8..0000000 | ||
| 246 | --- a/src/math/yn.c | ||
| 247 | +++ /dev/null | ||
| 248 | @@ -1,43 +0,0 @@ | ||
| 249 | -#define _XOPEN_SOURCE 700 | ||
| 250 | -#include <stdint.h> | ||
| 251 | -#include <stdio.h> | ||
| 252 | -#include "mtest.h" | ||
| 253 | - | ||
| 254 | -static struct di_d t[] = { | ||
| 255 | -#include "sanity/yn.h" | ||
| 256 | -#include "special/yn.h" | ||
| 257 | -}; | ||
| 258 | - | ||
| 259 | -int main(void) | ||
| 260 | -{ | ||
| 261 | - #pragma STDC FENV_ACCESS ON | ||
| 262 | - double y; | ||
| 263 | - float d; | ||
| 264 | - int e, i, err = 0; | ||
| 265 | - struct di_d *p; | ||
| 266 | - | ||
| 267 | - for (i = 0; i < sizeof t/sizeof *t; i++) { | ||
| 268 | - p = t + i; | ||
| 269 | - | ||
| 270 | - if (p->r < 0) | ||
| 271 | - continue; | ||
| 272 | - fesetround(p->r); | ||
| 273 | - feclearexcept(FE_ALL_EXCEPT); | ||
| 274 | - y = yn(p->i, p->x); | ||
| 275 | - e = fetestexcept(INEXACT|INVALID|DIVBYZERO|UNDERFLOW|OVERFLOW); | ||
| 276 | - | ||
| 277 | - if (!checkexcept(e, p->e, p->r)) { | ||
| 278 | - printf("%s:%d: bad fp exception: %s yn(%lld, %a)=%a, want %s", | ||
| 279 | - p->file, p->line, rstr(p->r), p->i, p->x, p->y, estr(p->e)); | ||
| 280 | - printf(" got %s\n", estr(e)); | ||
| 281 | - err++; | ||
| 282 | - } | ||
| 283 | - d = ulperr(y, p->y, p->dy); | ||
| 284 | - if ((!(p->x < 0) && !checkulp(d, p->r)) || (p->x < 0 && !isnan(y) && y != -inf)) { | ||
| 285 | - printf("%s:%d: %s yn(%lld, %a) want %a got %a, ulperr %.3f = %a + %a\n", | ||
| 286 | - p->file, p->line, rstr(p->r), p->i, p->x, p->y, y, d, d-p->dy, p->dy); | ||
| 287 | - err++; | ||
| 288 | - } | ||
| 289 | - } | ||
| 290 | - return !!err; | ||
| 291 | -} | ||
diff --git a/meta/recipes-core/musl/libc-test_git.bb b/meta/recipes-core/musl/libc-test_git.bb index 5ec307c25b..9d159ea9d2 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 = " \ | |||
| 14 | git://repo.or.cz/libc-test;branch=master;protocol=https \ | 14 | git://repo.or.cz/libc-test;branch=master;protocol=https \ |
| 15 | file://0001-Fix-strptime-on-musl.patch \ | 15 | file://0001-Fix-strptime-on-musl.patch \ |
| 16 | file://0001-api-unistd-guard-optional-obsolete-_PC-_SC-constants.patch \ | 16 | file://0001-api-unistd-guard-optional-obsolete-_PC-_SC-constants.patch \ |
| 17 | file://0001-math-Delete-failing-tests.patch \ | ||
| 17 | file://run-ptest \ | 18 | file://run-ptest \ |
| 18 | file://run-libc-ptests \ | 19 | file://run-libc-ptests \ |
| 19 | " | 20 | " |
