From patchwork Thu Aug 21 06:45:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 68896 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56E03CA0EF8 for ; Thu, 21 Aug 2025 06:45:39 +0000 (UTC) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mx.groups.io with SMTP id smtpd.web11.3238.1755758738727564109 for ; Wed, 20 Aug 2025 23:45:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b/2FwNVH; spf=pass (domain: gmail.com, ip: 209.85.215.176, mailfrom: raj.khem@gmail.com) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-b471737b347so396567a12.1 for ; Wed, 20 Aug 2025 23:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755758738; x=1756363538; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/CFMGKCbpx9IAzczfcmA26QgT8Jw4S7sRsn0RPR0MdE=; b=b/2FwNVHcIwkMP3EVDtjm1bEu9iG65dfzaZ0M0fM6irPsxK6ndeeHtfWFf3i8iVQye KFrMQWQ5NGoKeHSx7UGOZYtcqixWZFz7/tw0za4CtHLLJaJvhv48DlhI5ULWmX6QFmfr 4RKke6qcFxiGmbUBt6TgMCHYEzdgMToSC3MH8uxDuds+bWaAhZCkHws0aEbIj6hs+jSa tll5ibujoUbdSSANmf5vPNYSQxci7kT2w0TFXM15VU8vpp/KXDM0NXCgFQK2vPgyDM1e uF9f0w6OdHUNl+ndKeWlwWHgrmfemmND8Ybnml/TTgtqhlac0Rv0BKVUrlcjspG5aRc3 g0Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755758738; x=1756363538; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/CFMGKCbpx9IAzczfcmA26QgT8Jw4S7sRsn0RPR0MdE=; b=uzRjaTie8ZyPb6sLJetdHekkvh92VhClqh+wTA5oxhKNNXC2NRgjTk6opKSAWkLSDQ 3P6Lkh57Z7B91tk1p5Xk9RMkDmp5uKrrVMRRaYmAwc5JNdyMMVgAtZViumG3sUoF8X2C 2bmahCU2OkfWfXU9IGnqif1jisgsP3NStA6+pC3+ZA7/rCe0KY/wh2AkewWekYVJjynY nlqN04c9gPMinU2WeibmxVvPJ5z4yqwXqrlvAJSoX+tHC5/UGUCUlS17AZzoB/zEVpkp 4klqFluBqPkfL4QBRN3tkfyjWI4gIGPQjNX9s1eUHHUS5b8tc8KaBS8OxV2LOB2JkP/D nsvw== X-Gm-Message-State: AOJu0YyW6uNYVgQKbBUvYIwpZLlq0aRSfLjIAQ9Ulv4wjhIkBuMemtn/ YK5sVX02O3I/opiIbW1Lh1qwn0E+/f+/sHvAtw+4w3VfTJS5tUrFak2724GJ/6Gs X-Gm-Gg: ASbGnctPIDZ8R8y8ExBCAFYKuHrtKxnXfsRQ6/UO9PPDuLqZk/f5neFnhMMZjjbbAvt +yhqJ8Gib82ZiyQhuAAqigedNh8hS1QIqKxc+LHQnRuiGvHbrhbxuyr863v19Ft/eImegVAt2Ab JcwyjE5ZeiaStH/X9n306VU96Uv3kBFa5bOkH+npLN4ydMN8ue2pFI0WbUNTZZss77/8OV4XE/I CGd8TbrQQTwBvX0Eo/KhYxXDFB6lckXRLjWOWeutSJFg44a9Z0yVH1C4q+oMqAXkn2GtfCvBFga MZ+19avkrhVfDjEdzm0dWi4TjQOgPao7+uEqUxWj5AevF8UBAKP/9BzaMKyzA1w4RLb078nTKW0 2QP6aSkCy2D3l+AnmRXn5SA== X-Google-Smtp-Source: AGHT+IGHJlctL6CvEt/num6rG8zFOZ7eECbuOPLfx4hT/ZAr1/P0yUUdBDfZv6pFvm0UuvsYDGY1BQ== X-Received: by 2002:a17:903:3884:b0:243:43a:fa20 with SMTP id d9443c01a7336-245fec0d37dmr19649545ad.24.1755758737643; Wed, 20 Aug 2025 23:45:37 -0700 (PDT) Received: from apollo.tail3ccdd3.ts.net ([2601:646:8201:fd20::adc2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-245ed35d778sm45876685ad.49.2025.08.20.23.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Aug 2025 23:45:36 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Cc: Khem Raj Subject: [PATCH 7/9] libc-test: Ignore fma math tests Date: Wed, 20 Aug 2025 23:45:24 -0700 Message-ID: <20250821064528.754633-7-raj.khem@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250821064528.754633-1-raj.khem@gmail.com> References: <20250821064528.754633-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 21 Aug 2025 06:45:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222215 Signed-off-by: Khem Raj --- .../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 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 +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 +--- + 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 +-#include +-#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 +-#include +-#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 +-#include +-#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 +-#include +-#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 +-#include +-#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 \ "