glibc/sysdeps
Joseph Myers 5220a1aa8d Add tests for fegetexceptflag, fesetexceptflag.
I noticed that there was no meaningful test coverage for
fegetexceptflag and fesetexceptflag (one test ensures that calls to
them compile and link, but nothing to verify they work correctly).
This patch adds tests for these functions.

fesetexceptflag is meant to set the relevant exception flag bits to
the saved state without causing enabled traps to be taken.  On some
architectures, it is not possible to set exception flag bits without
causing enabled traps to occur.  Such architectures need to define
EXCEPTION_SET_FORCES_TRAP to 1 in their math-tests.h, as is done in
this patch for powerpc.  x86 avoids needing to define this because the
traps resulting from setting exception bits don't occur until the next
floating-point operation or fwait instruction.

Tested for x86_64, x86 and powerpc.  Note that test-fexcept fails for
powerpc because of a pre-existing bug in fesetexceptflag for powerpc,
which I'll fix separately.

	* math/test-fexcept-traps.c: New file.
	* math/test-fexcept.c: Likewise.
	* math/Makefile (tests): Add test-fexcept and test-fexcept-traps.
	* sysdeps/generic/math-tests.h (EXCEPTION_SET_FORCES_TRAP): New
	macro.
	* sysdeps/powerpc/math-tests.h [!__NO_FPRS__]
	(EXCEPTION_SET_FORCES_TRAP): Likewise.
2016-08-10 21:01:08 +00:00
..
aarch64 [AArch64] Update libm-test-ulps 2016-07-21 09:48:45 +01:00
alpha alpha: fix trunc for big input values 2016-08-02 09:18:59 +02:00
arm Minimize sysdeps code involved in defining major/minor/makedev. 2016-08-03 15:23:04 -04:00
generic Add tests for fegetexceptflag, fesetexceptflag. 2016-08-10 21:01:08 +00:00
gnu Define UDP_ENCAP_* from Linux 4.7 in netinet/udp.h. 2016-08-03 12:13:16 +00:00
hppa hppa: Update libm-test-ulps. 2016-07-06 14:45:23 +02:00
i386 i386: Compile rtld-*.os with -mno-sse -mno-mmx -mfpmath=387 2016-07-18 15:16:24 -07:00
ia64 elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
ieee754 Remove tacit double usage in ldbl-128 2016-08-03 11:01:25 -05:00
init_array Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
m68k m68k: suppress -Wframe-address warning 2016-07-04 23:15:29 +02:00
mach Fix recvmsg returning SIGLOST on PF_LOCAL sockets 2016-08-09 01:42:50 +02:00
microblaze Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
mips MIPS: run tst-mode-switch-{1,2,3}.c using test-skeleton.c 2016-06-27 23:57:40 +02:00
nacl Add nextup and nextdown math functions 2016-06-16 21:37:45 +05:30
nios2 elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
nptl Increase fork signal safety for single-threaded processes [BZ #19703] 2016-05-12 15:26:55 +02:00
posix getaddrinfo: Convert from extend_alloca to struct scratch_buffer 2016-05-12 14:07:56 +02:00
powerpc Add tests for fegetexceptflag, fesetexceptflag. 2016-08-10 21:01:08 +00:00
pthread Revert "aio: fix newp->running data race" 2016-05-04 15:52:30 +02:00
s390 S390: Do not clobber r13 with memcpy on 31bit with copies >1MB. 2016-07-20 08:29:43 +02:00
sh elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
sparc sparc32/sparcv9: add a VIS3 version of fdim 2016-08-05 22:35:01 +02:00
tile Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
unix x86: Use sysdep.o from libc.a in static libraries 2016-08-04 11:10:57 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
x86 Fixed wrong vector sincos/sincosf ABI to have it compatible with 2016-07-01 14:15:38 +03:00
x86_64 x86_64: Call finite scalar versions in vectorized log, pow, exp (bz #20033). 2016-08-02 16:35:25 +03:00