]> git.ipfire.org Git - thirdparty/glibc.git/commit - ChangeLog
Add libm-test.inc macro for all-rounding-modes testing.
authorJoseph Myers <joseph@codesourcery.com>
Sat, 8 Mar 2014 14:08:38 +0000 (14:08 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Sat, 8 Mar 2014 14:08:38 +0000 (14:08 +0000)
commite9996ef750d845b46bc7d743c730c73f044720af
treeac5744944655997448bbc0140433487adc59b52f
parent5c7808498e9e1fd3df43aa2bd84fd47dc8e6ab7c
Add libm-test.inc macro for all-rounding-modes testing.

This patch adds support in libm-test.inc for automatically running
tests of a function in all rounding modes, in the form of a macro
ALL_RM_TEST to loop over all rounding modes when running tests of a
function, and uses it for functions whose results should always be
independent of the rounding mode.

Conversion of tests of nextafter to ALL_RM_TEST was deferred because
trying that conversion showed up bug 16677.  (Finding such a bug of
course illustrates the point of testing more systematically in all
rounding modes rather than only reactively when bugs get reported in a
particular function in a non-default mode.)  Conversion of tests where
results can depend on the rounding mode will follow once I add
gen-libm-test.pl support for using different initializers for the
expected results for different rounding modes (again, some conversions
may need deferring until bugs are fixed, depending on how
straightforward they are to XFAIL in a particular context).

Some existing tests get run five times rather than four, with
round-to-nearest tests both run in that as default rounding mode and
also with it explicitly set with fesetround (FE_TONEAREST).  This
duplication doesn't seem particularly useful, so ALL_RM_TEST only runs
tests four times.

Tested x86_64 and x86.

* math/libm-test.inc (ALL_RM_TEST): New macro.
(ceil_test): Use ALL_RM_TEST.
(cimag_test): Likewise.
(conj_test): Likewise.
(copysign_test): Likewise.
(cproj_test): Likewise.
(creal_test): Likewise.
(fabs_test): Likewise.
(floor_test): Likewise.
(fmax_test): Likewise.
(fmin_test): Likewise.
(fmod_test): Likewise.
(fpclassify_test): Likewise.
(frexp_test): Likewise.
(ilogb_test): Likewise.
(isfinite_test): Likewise.
(finite_test): Likewise.
(isgreater_test): Likewise.
(isgreaterequal_test): Likewise.
(isinf_test): Likewise.
(isless_test): Likewise.
(islessequal_test): Likewise.
(islessgreater_test): Likewise.
(isnan_test): Likewise.
(isnormal_test): Likewise.
(issignaling_test): Likewise.
(isunordered_test): Likewise.
(logb_test): Likewise.
(logb_downward_test_data): Remove.
(logb_test_downward): Likewise.
(lround_test): Use ALL_RM_TEST.
(llround_test): Likewise.
(modf_test): Likewise.
(nexttoward_test): Likewise.
(remainder_test): Likewise.
(drem_test): Likewise.
(remainder_tonearest_test_data): Likewise.
(remainder_test_tonearest): Likewise.
(drem_test_tonearest): Likewise.
(remainder_towardzero_test_data): Likewise.
(remainder_test_towardzero): Likewise.
(drem_test_towardzero): Likewise.
(remainder_downward_test_data): Likewise.
(remainder_test_downward): Likewise.
(drem_test_downward): Likewise.
(remainder_upward_test_data): Likewise.
(remainder_test_upward): Likewise.
(drem_test_upward): Likewise.
(remquo_test): Use ALL_RM_TEST.  Remove comment about x.
(round_test): Use ALL_RM_TEST.
(signbit_test): Likewise.
(trunc_test): Likewise.
(significand_test): Likewise.
(main): Don't call removed functions.
ChangeLog
math/libm-test.inc