bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* expl tests: Avoid test failure on NetBSD 10.0/i386
@ 2024-04-05 13:18 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2024-04-05 13:18 UTC (permalink / raw
  To: bug-gnulib

On NetBSD 10.0/i386, I see this test failure:

FAIL: test-expl
===============

../../gltests/test-exp.h:81: assertion 'err > - err_bound / TWO_MANT_DIG && err < err_bound / TWO_MANT_DIG' failed
FAIL test-expl (exit status: 134)

The expl() function is just more imprecise on this platform than elsewhere.
Here is a workaround:


2024-04-05  Bruno Haible  <bruno@clisp.org>

	expl tests: Avoid test failure on NetBSD 10.0/i386.
	* tests/test-exp.h (test_function): Allow more deviation on NetBSD/i386.

diff --git a/tests/test-exp.h b/tests/test-exp.h
index 1b1d35c400..f7ef2a4063 100644
--- a/tests/test-exp.h
+++ b/tests/test-exp.h
@@ -63,7 +63,9 @@ test_function (void)
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
       (sizeof (DOUBLE) > sizeof (double) ?
-#if defined __i386__ && defined __FreeBSD__
+#if defined __i386__ && defined __NetBSD__
+       L_(25000.0)
+#elif defined __i386__ && defined __FreeBSD__
        L_(2400.0)
 #else
        L_(24.0)





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-05 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 13:18 expl tests: Avoid test failure on NetBSD 10.0/i386 Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).