Bruno Haible <[email protected]> writes:

> Collin Funk wrote:
>> Likewise, the fenv-rounding tests fail in the same places as FreeBSD and
>> OpenBSD.
>> 
>> Patch attached.
>
> Thanks. The change looks good. But please also update
> doc/posix-functions/fesetround.texi.

Oops, forgot about that. Pushed the attached patch with the
documentation update.

Thanks,
Collin

>From a0d10f43c3bda84990b2f222bfb196869e08eb31 Mon Sep 17 00:00:00 2001
Message-ID: <a0d10f43c3bda84990b2f222bfb196869e08eb31.1761089644.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Mon, 20 Oct 2025 20:50:21 -0700
Subject: [PATCH] fenv-rounding tests: Avoid test failure on Android.

* tests/test-fenv-round.c (test_towardzero, test_upward)
(test_downward): Disable tests that are known to fail.
* doc/posix-functions/fesetround.texi: Update list of platforms.
---
 ChangeLog                           | 5 +++++
 doc/posix-functions/fesetround.texi | 2 +-
 tests/test-fenv-round.c             | 6 +++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 099df21e82..c674c1e203 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2025-10-21  Collin Funk  <[email protected]>
 
+	fenv-rounding tests: Avoid test failure on Android.
+	* tests/test-fenv-round.c (test_towardzero, test_upward)
+	(test_downward): Disable tests that are known to fail.
+	* doc/posix-functions/fesetround.texi: Update list of platforms.
+
 	snan tests: Avoid test failure on Android.
 	* tests/test-snan-1.c (main): Disable test that is known to fail.
 
diff --git a/doc/posix-functions/fesetround.texi b/doc/posix-functions/fesetround.texi
index 9106b84467..d7a14f2e42 100644
--- a/doc/posix-functions/fesetround.texi
+++ b/doc/posix-functions/fesetround.texi
@@ -21,5 +21,5 @@ @node fesetround
 @itemize
 @item
 The rounding mode has no effect on @code{long double} operations on some platforms:
-FreeBSD/arm64, NetBSD/sparc64, OpenBSD/arm64, OpenBSD/mips64.
+Android/arm64, FreeBSD/arm64, NetBSD/sparc64, OpenBSD/arm64, OpenBSD/mips64.
 @end itemize
diff --git a/tests/test-fenv-round.c b/tests/test-fenv-round.c
index 746cd63541..38426f0dce 100644
--- a/tests/test-fenv-round.c
+++ b/tests/test-fenv-round.c
@@ -45,7 +45,7 @@ test_towardzero ()
     a = -1; b = 3; q = a / b; p = b * q;
     ASSERT (p > a);
   }
-#if !(((defined __FreeBSD__ || defined __OpenBSD__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
+#if !(((defined __FreeBSD__ || defined __OpenBSD__ || defined __ANDROID__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
   {
     long double volatile a, b, q, p;
 
@@ -80,7 +80,7 @@ test_upward ()
     a = -1; b = 3; q = a / b; p = b * q;
     ASSERT (p > a);
   }
-#if !(((defined __FreeBSD__ || defined __OpenBSD__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
+#if !(((defined __FreeBSD__ || defined __OpenBSD__ || defined __ANDROID__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
   {
     long double volatile a, b, q, p;
 
@@ -115,7 +115,7 @@ test_downward ()
     a = -1; b = 3; q = a / b; p = b * q;
     ASSERT (p < a);
   }
-#if !(((defined __FreeBSD__ || defined __OpenBSD__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
+#if !(((defined __FreeBSD__ || defined __OpenBSD__ || defined __ANDROID__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
   {
     long double volatile a, b, q, p;
 
-- 
2.51.0

Reply via email to