diff options
author | ngie <ngie@FreeBSD.org> | 2015-01-02 00:57:40 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-01-02 00:57:40 +0000 |
commit | 2b004350150158bfa3636f47b4d39b4f273fa24c (patch) | |
tree | 202c26b7b2876fa5910abb8d6d758e6f8c032bd3 /contrib/netbsd-tests/lib/libm/t_scalbn.c | |
parent | 3bc3ae6d630c58c75395ebd1cb2d8ecd53362e38 (diff) | |
download | FreeBSD-src-2b004350150158bfa3636f47b4d39b4f273fa24c.zip FreeBSD-src-2b004350150158bfa3636f47b4d39b4f273fa24c.tar.gz |
Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the
tested errno isn't stale
This was needed in order for the test to pass on amd64 with stable/10
MFC after: 3 days
Diffstat (limited to 'contrib/netbsd-tests/lib/libm/t_scalbn.c')
-rw-r--r-- | contrib/netbsd-tests/lib/libm/t_scalbn.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libm/t_scalbn.c b/contrib/netbsd-tests/lib/libm/t_scalbn.c index 2d186cf..fe70b3c 100644 --- a/contrib/netbsd-tests/lib/libm/t_scalbn.c +++ b/contrib/netbsd-tests/lib/libm/t_scalbn.c @@ -225,6 +225,9 @@ ATF_TC_BODY(scalbnf_val, tc) double rv; for (i = 0; i < tcnt; i++) { +#ifdef __FreeBSD__ + errno = 0; +#endif rv = scalbnf(tests[i].inval, tests[i].exp); ATF_CHECK_EQ_MSG(errno, tests[i].error, "test %zu: errno %d instead of %d", i, errno, @@ -369,6 +372,9 @@ ATF_TC_BODY(scalbnl_val, tc) long double rv; for (i = 0; i < tcnt; i++) { +#ifdef __FreeBSD__ + errno = 0; +#endif rv = scalbnl(tests[i].inval, tests[i].exp); ATF_CHECK_EQ_MSG(errno, tests[i].error, "test %zu: errno %d instead of %d", i, errno, |