summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-01-02 00:57:40 +0000
committerngie <ngie@FreeBSD.org>2015-01-02 00:57:40 +0000
commit2b004350150158bfa3636f47b4d39b4f273fa24c (patch)
tree202c26b7b2876fa5910abb8d6d758e6f8c032bd3 /contrib/netbsd-tests
parent3bc3ae6d630c58c75395ebd1cb2d8ecd53362e38 (diff)
downloadFreeBSD-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')
-rw-r--r--contrib/netbsd-tests/lib/libm/t_scalbn.c6
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,
OpenPOWER on IntegriCloud