From 8fe9679fd6d5f33a24675c19aa9788ce742759e4 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Fri, 2 Jan 2015 00:57:40 +0000 Subject: [PATCH] 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 --- contrib/netbsd-tests/lib/libm/t_scalbn.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/netbsd-tests/lib/libm/t_scalbn.c b/contrib/netbsd-tests/lib/libm/t_scalbn.c index 2d186cf1df8..fe70b3cd738 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,