NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51839: [PATCH] tests/lib/libm/t_scalbn: reset errno to 0 before calling scalbn*
The following reply was made to PR bin/51839; it has been noted by GNATS.
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/51839: [PATCH] tests/lib/libm/t_scalbn: reset errno to 0
before calling scalbn*
Date: Thu, 12 Jan 2017 20:42:28 -0800
--Apple-Mail=_5D1A96CB-9463-4C92-94B6-6DD94B7A0DF3
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
-Ngie
--Apple-Mail=_5D1A96CB-9463-4C92-94B6-6DD94B7A0DF3
Content-Disposition: attachment;
filename*0=t_scalbn-reset-errno-to-0-before-calling-scalbn-functions-and-te;
filename*1=sting-errno.patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_scalbn-reset-errno-to-0-before-calling-scalbn-functions-and-testing-errno.patch"
Content-Transfer-Encoding: 7bit
Index: lib/libm/t_scalbn.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libm/t_scalbn.c,v
retrieving revision 1.11
diff -u -r1.11 t_scalbn.c
--- lib/libm/t_scalbn.c 3 Mar 2014 10:39:08 -0000 1.11
+++ lib/libm/t_scalbn.c 13 Jan 2017 04:35:31 -0000
@@ -81,6 +81,7 @@
double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0;
rv = scalbn(tests[i].inval, tests[i].exp);
ATF_CHECK_EQ_MSG(errno, tests[i].error,
"test %zu: errno %d instead of %d", i, errno,
@@ -222,6 +223,7 @@
double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0;
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,
@@ -366,6 +368,7 @@
long double rv;
for (i = 0; i < tcnt; i++) {
+ errno = 0;
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,
--Apple-Mail=_5D1A96CB-9463-4C92-94B6-6DD94B7A0DF3--
Home |
Main Index |
Thread Index |
Old Index