Clean up libm vector tests exception test disabling.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 7 Feb 2017 23:06:19 +0000 (23:06 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 7 Feb 2017 23:06:19 +0000 (23:06 +0000)
The libm vector tests disable tests of exception raising via defining
macros EXCEPTION_TESTS_float and EXCEPTION_TESTS_double to 0 in the
headers for individual vector lengths.

As EXCEPTION_TESTS is used in code in libm-test-driver.c that is
otherwise ready to be built only once per type, this is not a good
idea; it's better to define TEST_EXCEPTIONS appropriately so that
flag_test_exceptions then gets initialized appropriately.
Furthermore, it's better to do this just once, in test-math-vector.h,
since there is no actual dependence on the vector length or type.
This patch duly makes that change.

Tested for x86_64.

* math/test-math-finite.h (TEST_EXCEPTIONS): New macro.
* math/test-math-no-finite.h (TEST_EXCEPTIONS): Likewise.
* math/test-math-vector.h (TEST_EXCEPTIONS): Likewise.
* math/test-math-no-inline.h (TEST_EXCEPTIONS): Remove macro.
* math/test-double-vlen2.h (EXCEPTION_TESTS_double): Likewise.
* math/test-double-vlen4.h (EXCEPTION_TESTS_double): Likewise.
* math/test-double-vlen8.h (EXCEPTION_TESTS_double): Likewise.
* math/test-float-vlen4.h (EXCEPTION_TESTS_float): Likewise.
* math/test-float-vlen8.h (EXCEPTION_TESTS_float): Likewise.
* math/test-float-vlen16.h (EXCEPTION_TESTS_float): Likewise.

ChangeLog
math/test-double-vlen2.h
math/test-double-vlen4.h
math/test-double-vlen8.h
math/test-float-vlen16.h
math/test-float-vlen4.h
math/test-float-vlen8.h
math/test-math-finite.h
math/test-math-no-finite.h
math/test-math-no-inline.h
math/test-math-vector.h

index 037552dac45b425ead1e08bed1b555cd00157fdd..4ea4c07afde6537dec03816f55159c202014556a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2017-02-07  Joseph Myers  <joseph@codesourcery.com>
 
+       * math/test-math-finite.h (TEST_EXCEPTIONS): New macro.
+       * math/test-math-no-finite.h (TEST_EXCEPTIONS): Likewise.
+       * math/test-math-vector.h (TEST_EXCEPTIONS): Likewise.
+       * math/test-math-no-inline.h (TEST_EXCEPTIONS): Remove macro.
+       * math/test-double-vlen2.h (EXCEPTION_TESTS_double): Likewise.
+       * math/test-double-vlen4.h (EXCEPTION_TESTS_double): Likewise.
+       * math/test-double-vlen8.h (EXCEPTION_TESTS_double): Likewise.
+       * math/test-float-vlen4.h (EXCEPTION_TESTS_float): Likewise.
+       * math/test-float-vlen8.h (EXCEPTION_TESTS_float): Likewise.
+       * math/test-float-vlen16.h (EXCEPTION_TESTS_float): Likewise.
+
        [BZ #21112]
        * sysdeps/ieee754/flt-32/e_powf.c (cp_h): Use value with trailing
        12 bits zero.
index 58d029ab2a0a5fbbbfce21381a830bee14393d7d..06571cf65c98d42096d344633d6774628efea95c 100644 (file)
@@ -20,7 +20,6 @@
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
 
-#define EXCEPTION_TESTS_double 0
 #define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen2
index 5ebcd133b1887ea9783ec0e04521387182778521..47254703b689e3cb1f843294b03622ab84350ea4 100644 (file)
@@ -20,7 +20,6 @@
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
 
-#define EXCEPTION_TESTS_double 0
 #define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen4
index 8d9049eb285e32717c0fdc2600b17bbf3d7c5e3e..a1254ae396125a666671b11de78c17ef3974e676 100644 (file)
@@ -20,7 +20,6 @@
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
 
-#define EXCEPTION_TESTS_double 0
 #define ROUNDING_TESTS_double(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen8
index 9388d77a82f15238414f8519c20644b1d0990909..b6d209e61c1dd67f343c2359886ace1795d53616 100644 (file)
@@ -20,7 +20,6 @@
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
 
-#define EXCEPTION_TESTS_float 0
 #define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen16
index 0a3a25463a98a83982ccc4379de07e9a1974ef3b..4bac669d214864b52d91e80e006f7f940bec3840 100644 (file)
@@ -20,7 +20,6 @@
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
 
-#define EXCEPTION_TESTS_float 0
 #define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen4
index f744dc5771e1ee6c84a0e4dd4a026d48c1c0e34d..e72257ceee37a3cc62b47fbc89935b75dd791715 100644 (file)
@@ -20,7 +20,6 @@
 #include "test-math-no-inline.h"
 #include "test-math-vector.h"
 
-#define EXCEPTION_TESTS_float 0
 #define ROUNDING_TESTS_float(MODE) ((MODE) == FE_TONEAREST)
 
 #define VEC_SUFF _vlen8
index d081ff27e652d492181aaf5c2422fe3614eddce1..e1ab93481fcc2c724f71dc127edf517782593df1 100644 (file)
@@ -18,3 +18,4 @@
 
 #define TEST_FINITE 1
 #define TEST_ERRNO 0
+#define TEST_EXCEPTIONS 1
index 815096205e95e7c6af2434e5198a6204d2942061..c4b824676f34d4a0d667ae9d622c449df72b1123 100644 (file)
@@ -17,3 +17,4 @@
    <http://www.gnu.org/licenses/>.  */
 
 #define TEST_FINITE 0
+#define TEST_EXCEPTIONS 1
index 81dde30df830d6a815eb6f34bf44ec1d7e682489..83ba170ef13da3d56a877ff9a7c0178de652c118 100644 (file)
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #define TEST_INLINE 0
-#define TEST_EXCEPTIONS 1
 
 #ifndef __NO_MATH_INLINES
 # define __NO_MATH_INLINES
index 63b63853ff9028e6ab6c9b36a6ca13436184724a..8a9ae9caa1bcb131d7ccd83079eef23f2a654d52 100644 (file)
@@ -19,6 +19,7 @@
 #define TEST_MATHVEC 1
 #define TEST_FINITE 0
 #define TEST_ERRNO 0
+#define TEST_EXCEPTIONS 0
 
 #define CNCT(x, y) x ## y
 #define CONCAT(a, b) CNCT (a, b)