From nobody Wed Jun 10 12:36:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gb4yL4c5kz6g4NY for ; Wed, 10 Jun 2026 12:36:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gb4yK4rPxz43MT for ; Wed, 10 Jun 2026 12:36:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781094969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WBuC/TBiDQFEZZAFpm8K4JuJRIbjMq8bJ7OTqddG8u8=; b=cJufRwAujB4jwcnuse//Fh1x/zVsrqt3omeFYHgi6yvxRCNtVVlOV4mU2Q0OAyM6+sqRkX ELfSpzsWtovX4JKTCa7QqLp1F8lRWxt6V/ch4wAjycoxH5XiOF/V2DMcdT2CZLgtBuG4i4 s0cCKgZfTDoAXfgOg3v8Hu+1nw/TWm3d4AvBb+hIgAgh32SuIjmGhlNWP+/fXm8bjgyc5f bw4+Yy8HFaOx3tBHi++2E/IakVf9OaWdbL2BTWngPEX67c/cb0N/EEqo91o717YkgdPLp1 WV2yC8OdS3ToqaKsM22j4pEZneJ21XvtygTBywGNyiiqA0AP4Y2kydQjbeqdkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781094969; a=rsa-sha256; cv=none; b=nr7cxekEe9EAm6fIjAPvHTcHilKJXpE2toCfI4y7/r4TtlV8/x2IWAPIwN7/sa0bPbtFy6 eFII1oRZkS+U2+bYGScfc3kGzDgYgbBTthfTlVLSRJUcodmCk1GGPE7SltKJ1H0yQxj1Hc BA3eUjLS3zEuZuYBGxgg03wBFYy2cvvXoHCPSPwGSj76xJyfrH7SDyFYqw1Kaw4z+H8uav FDBsTyyghl5Zib5DaKHnfnEgMOaeAjtdmmwPzmmTwiHZ0afFHVMCGSCntMEEdE+Yl9xWSv IIff3WsuDaKUW2TMgxF9jZeMmtdMOORtaeprzBhGqbl6eyb1U9HLbBEAhS5rcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781094969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WBuC/TBiDQFEZZAFpm8K4JuJRIbjMq8bJ7OTqddG8u8=; b=RcFy1FzhJoYroTZ+qD1UeRGHCwVDikb62ON5E5QerF+9Qhw2HttLDkhCEXYBoiPaGzjzQo VoAe7JYlnf2jx1GzEuGckY0MszR60h/74OU1vPVmsj0xTfts9yQ/RpInapbLQ7mxG6FFql 4xmzRMECE/rTEf7WM22S/LiiiBiTjwg4oB9APaqsjJ04vj2Z7GABGMTKMf5CaakhXjIv9Y v7o2gXZ/BEtBwfqLZuosLN+q9fyrwjm7Y/Pm8VaR4bMk8hZBBucQ6//3x8IrppLJiVtiU3 iruLBSqB8T/vudc4FF8QE//HNLuwMKDi4nxWR9vUMkkMzmcchdqwO7bCpG0AzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gb4yK3D1Zz1Ksv for ; Wed, 10 Jun 2026 12:36:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3df28 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Jun 2026 12:36:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: K Rin From: Warner Losh Subject: git: 2671607f1b5c - main - libc/tests: Enable fpsetround_basic which was never triggered since ported. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2671607f1b5c6e787eb754b0d291a2b5e28e8ac9 Auto-Submitted: auto-generated Date: Wed, 10 Jun 2026 12:36:09 +0000 Message-Id: <6a295a39.3df28.4072fc80@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2671607f1b5c6e787eb754b0d291a2b5e28e8ac9 commit 2671607f1b5c6e787eb754b0d291a2b5e28e8ac9 Author: K Rin AuthorDate: 2025-04-10 04:34:47 +0000 Commit: Warner Losh CommitDate: 2026-06-10 12:35:03 +0000 libc/tests: Enable fpsetround_basic which was never triggered since ported. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1656 --- lib/libc/tests/gen/fpclassify_test.c | 13 ++++++----- lib/libc/tests/gen/fpsetmask_test.c | 42 ++++++++++++++++++++++-------------- lib/libc/tests/gen/fpsetround_test.c | 7 +++--- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/lib/libc/tests/gen/fpclassify_test.c b/lib/libc/tests/gen/fpclassify_test.c index 21dea9e8fee7..ed573b9e2b57 100644 --- a/lib/libc/tests/gen/fpclassify_test.c +++ b/lib/libc/tests/gen/fpclassify_test.c @@ -33,7 +33,7 @@ #include #include -#ifndef _FLOAT_IEEE754 +#ifndef __i386__ ATF_TC(no_test); ATF_TC_HEAD(no_test, tc) @@ -46,7 +46,10 @@ ATF_TC_BODY(no_test,tc) atf_tc_skip("Test not available on this architecture"); } -#else /* defined(_FLOAT_IEEE754) */ +#else /* defined(__i386__) */ + +#undef LDBL_MANT_DIG +#define LDBL_MANT_DIG DBL_MANT_DIG ATF_TC(fpclassify_float); ATF_TC_HEAD(fpclassify_float, tc) @@ -187,12 +190,12 @@ ATF_TC_BODY(fpclassify_long_double, tc) ATF_REQUIRE_EQ(f, 0); } #endif /* TEST_LONG_DOUBLE */ -#endif /* _FLOAT_IEEE754 */ +#endif /* __i386__ */ ATF_TP_ADD_TCS(tp) { -#ifndef _FLOAT_IEEE754 +#ifndef __i386__ ATF_TP_ADD_TC(tp, no_test); #else ATF_TP_ADD_TC(tp, fpclassify_float); @@ -200,7 +203,7 @@ ATF_TP_ADD_TCS(tp) #ifdef TEST_LONG_DOUBLE ATF_TP_ADD_TC(tp, fpclassify_long_double); #endif /* TEST_LONG_DOUBLE */ -#endif /* _FLOAT_IEEE754 */ +#endif /* __i386__ */ return atf_no_error(); } diff --git a/lib/libc/tests/gen/fpsetmask_test.c b/lib/libc/tests/gen/fpsetmask_test.c index 1c2d9316e5a7..377e42be1469 100644 --- a/lib/libc/tests/gen/fpsetmask_test.c +++ b/lib/libc/tests/gen/fpsetmask_test.c @@ -37,7 +37,7 @@ #include #include -#ifndef _FLOAT_IEEE754 +#ifndef __i386__ ATF_TC(no_test); ATF_TC_HEAD(no_test, tc) @@ -52,9 +52,16 @@ ATF_TC_BODY(no_test, tc) atf_tc_skip("Test not available on this architecture."); } -#else /* defined(_FLOAT_IEEE754) */ +#else /* defined(__i386__) */ #include +#ifndef ___STRING +#define ___STRING(x) #x +#endif +#ifndef __arraycount +#define __arraycount(x) (sizeof(x) / sizeof((x)[0])) +#endif + #if __arm__ && !__SOFTFP__ /* @@ -142,8 +149,8 @@ f_inv(void) static void f_ofl(void) { - f_x = f_huge * f_huge; + printf("%f %f %Lf", f_x, d_x, ld_x); // avoid compiler optimization } static void @@ -151,6 +158,7 @@ d_ofl(void) { d_x = d_huge * d_huge; + printf("%f %f %Lf", f_x, d_x, ld_x); // avoid compiler optimization } static void @@ -158,33 +166,34 @@ ld_ofl(void) { ld_x = ld_huge * ld_huge; + printf("%f %f %Lf", f_x, d_x, ld_x); // avoid compiler optimization } /* trip underflow */ static void f_ufl(void) { - f_x = f_tiny * f_tiny; + printf("%f %f %Lf", f_x, d_x, ld_x); // avoid compiler optimization } static void d_ufl(void) { - d_x = d_tiny * d_tiny; + printf("%f %f %Lf", f_x, d_x, ld_x); // avoid compiler optimization } static void ld_ufl(void) { - ld_x = ld_tiny * ld_tiny; + printf("%f %f %Lf", f_x, d_x, ld_x); // avoid compiler optimization } struct ops { void (*op)(void); - fp_except mask; + fp_except_t mask; int sicode; }; @@ -218,12 +227,12 @@ static void fpsetmask_masked(const struct ops *test_ops) { struct sigaction sa; - fp_except ex1, ex2; + fp_except_t ex1, ex2; const struct ops *t; /* mask all exceptions, clear history */ fpsetmask(0); - fpsetsticky(0); + fpresetsticky(~0); /* set up signal handler */ sa.sa_sigaction = sigfpe; @@ -241,8 +250,8 @@ fpsetmask_masked(const struct ops *test_ops) ATF_CHECK_EQ(ex1 & t->mask, t->mask); ATF_CHECK_EQ(signal_caught, 0); - /* check correct fpsetsticky() behaviour */ - ex2 = fpsetsticky(0); + /* check correct fpresetsticky() behaviour */ + ex2 = fpresetsticky(~0); ATF_CHECK_EQ(fpgetsticky(), 0); ATF_CHECK_EQ(ex1, ex2); } @@ -260,7 +269,7 @@ fpsetmask_unmasked(const struct ops *test_ops) /* mask all exceptions, clear history */ fpsetmask(0); - fpsetsticky(0); + fpresetsticky(~0); /* set up signal handler */ sa.sa_sigaction = sigfpe; @@ -275,13 +284,16 @@ fpsetmask_unmasked(const struct ops *test_ops) for (t = test_ops; t->op != NULL; t++) { fpsetmask(t->mask); r = sigsetjmp(b, 1); + printf("r = %d\n", r); if (!r) { (*t->op)(); BARRIER(); + fpresetsticky(~0); } ATF_CHECK_EQ(signal_caught, 1); ATF_CHECK_EQ(sicode, t->sicode); signal_caught = 0; + sicode = 0; } } @@ -312,8 +324,6 @@ sigfpe(int s, siginfo_t *si, void *c) if (strcmp(MACHINE, "macppc") == 0) \ atf_tc_expect_fail("PR port-macppc/46319"); \ \ - if (isQEMU()) \ - atf_tc_expect_fail("PR misc/44767"); \ \ m(t##_ops); \ } @@ -348,12 +358,12 @@ ATF_TC_BODY(fpsetmask_basic, tc) } -#endif /* defined(_FLOAT_IEEE754) */ +#endif /* defined(__i386__) */ ATF_TP_ADD_TCS(tp) { -#ifndef _FLOAT_IEEE754 +#ifndef __i386__ ATF_TP_ADD_TC(tp, no_test); #else ATF_TP_ADD_TC(tp, fpsetmask_basic); diff --git a/lib/libc/tests/gen/fpsetround_test.c b/lib/libc/tests/gen/fpsetround_test.c index 0f23e74e57c8..6114cf25e8e3 100644 --- a/lib/libc/tests/gen/fpsetround_test.c +++ b/lib/libc/tests/gen/fpsetround_test.c @@ -54,8 +54,9 @@ ATF_TC_HEAD(fpsetround_basic, tc) "Minimal testing of fpgetround(3) and fpsetround(3)"); } -#ifdef _FLOAT_IEEE754 +#ifdef __i386__ #include +#define __arraycount(a) (sizeof(a) / sizeof(*(a))) static const struct { const char *n; @@ -121,7 +122,7 @@ test(int r) ATF_TC_BODY(fpsetround_basic, tc) { -#ifndef _FLOAT_IEEE754 +#ifndef __i386__ atf_tc_skip("Test not applicable on this architecture."); #else int r; @@ -151,7 +152,7 @@ ATF_TC_BODY(fpsetround_basic, tc) rnd[j].rf, r); test(r); } -#endif /* _FLOAT_IEEE754 */ +#endif /* __i386__ */ } ATF_TP_ADD_TCS(tp)