This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Allow fesetround failures in math/test-misc.c if ROUNDING_TESTS fails


This patch adds further tests of ROUNDING_TESTS to math/test-misc.c,
to avoid failure of fesetround resulting in the test failure for
rounding modes not expected to be fully supported.  This stops this
test failing for soft-float MIPS.

2013-06-20  Joseph Myers  <joseph@codesourcery.com>

	* math/test-misc.c (main): Ignore fesetround failure when failures
	of subsequent rounding tests would be ignored.

diff --git a/math/test-misc.c b/math/test-misc.c
index 390415a..27d673b 100644
--- a/math/test-misc.c
+++ b/math/test-misc.c
@@ -1295,7 +1295,11 @@ main (void)
 	  if (fesetround (mode))
 	    {
 	      printf ("failed to set rounding mode to %s\n", mstr);
-	      result = 1;
+	      if (ROUNDING_TESTS (long double, mode)
+		  && ROUNDING_TESTS (double, mode))
+		result = 1;
+	      else
+		puts ("ignoring this failure");
 	      break;
 	    }
 	  d5 = ld5 * i;

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]