This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.25-581-g48273d4


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  48273d42bc0689d6e8e79c1750a62f6bc3721307 (commit)
      from  16000c8d04f60a15fc0187e8719d741329501c39 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48273d42bc0689d6e8e79c1750a62f6bc3721307

commit 48273d42bc0689d6e8e79c1750a62f6bc3721307
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Jun 23 20:10:45 2017 +0000

    Make libm-test-support code clear exceptions after each test.
    
    The libm-test-support code clears exceptions at the end of
    test_exceptions.  However, it's possible that exceptions get raised as
    part of the subsequent checks on the results of the function being
    tested, and such exceptions then carry through to the next test run
    and can cause that to fail spuriously.  In particular, it's possible
    for the ulps calculation to raise exceptions in some cases.  This
    patch puts exception clearing at the end of each of the check_*
    functions, alongside errno clearing, to avoid one test affecting the
    next in that way.
    
    Tested for x86_64 (in conjunction with float128 patches).
    
    	* libm-test-support.c (check_float_internal): Clear exceptions at
    	end of function.
    	(check_int): Likewise.
    	(check_long): Likewise.
    	(check_bool): Likewise.
    	(check_longlong): Likewise.
    	(check_intmax_t): Likewise.
    	(check_uintmax_t): Likewise.

diff --git a/ChangeLog b/ChangeLog
index fa0ac20..464e65d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2017-06-23  Joseph Myers  <joseph@codesourcery.com>
 
+	* libm-test-support.c (check_float_internal): Clear exceptions at
+	end of function.
+	(check_int): Likewise.
+	(check_long): Likewise.
+	(check_bool): Likewise.
+	(check_longlong): Likewise.
+	(check_intmax_t): Likewise.
+	(check_uintmax_t): Likewise.
+
 	* sysdeps/x86/fpu/bits/fenv.h [_LIBC] (__feraiseexcept_renamed):
 	Do not declare.
 	* sysdeps/x86/fpu/include/bits/fenv.h [_LIBC &&
diff --git a/math/libm-test-support.c b/math/libm-test-support.c
index 7612d39..078d307 100644
--- a/math/libm-test-support.c
+++ b/math/libm-test-support.c
@@ -718,6 +718,7 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
 
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 
@@ -795,6 +796,7 @@ check_int (const char *test_name, int computed, int expected,
   update_stats (ok);
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 
@@ -828,6 +830,7 @@ check_long (const char *test_name, long int computed, long int expected,
   update_stats (ok);
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 
@@ -861,6 +864,7 @@ check_bool (const char *test_name, int computed, int expected,
   update_stats (ok);
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 
@@ -895,6 +899,7 @@ check_longlong (const char *test_name, long long int computed,
   update_stats (ok);
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 
@@ -928,6 +933,7 @@ check_intmax_t (const char *test_name, intmax_t computed,
   update_stats (ok);
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 
@@ -961,6 +967,7 @@ check_uintmax_t (const char *test_name, uintmax_t computed,
   update_stats (ok);
  out:
   fpstack_test (test_name);
+  feclearexcept (FE_ALL_EXCEPT);
   errno = 0;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    9 +++++++++
 math/libm-test-support.c |    7 +++++++
 2 files changed, 16 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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