This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Add tests for fegetexceptflag, fesetexceptflag [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: <rth at redhat dot com>
- Date: Wed, 10 Aug 2016 21:34:17 +0000
- Subject: Re: Add tests for fegetexceptflag, fesetexceptflag [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1608102101380.6916@digraph.polyomino.org.uk>
On Wed, 10 Aug 2016, Joseph Myers wrote:
> 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).
Actually, that existing test (test-fenvinline) verifies some aspects of
those functions' operation - but not enough, as evidenced by the powerpc
bug found by my new tests.
Anyway, the thing that made me suspect test coverage was inadequate was
noticing that sysdeps/alpha/fpu/fsetexcptflg.c appears to clear all
previously set exceptions unconditionally, regardless of whether specified
in the mask of flags to be restored that was passed to fesetexceptflag.
I have not verified this, but would expect the new test test-fexcept to
fail on Alpha, in which case sysdeps/alpha/fpu/fsetexcptflg.c should be
fixed accordingly (with bug filed in Bugzilla as usual, etc.).
--
Joseph S. Myers
joseph@codesourcery.com