Tue Jun 7 13:51:52 2011 UTC ()
Sparc64 does not fail the strtold_nan test, so don't expect failure there


(martin)
diff -r1.19 -r1.20 src/tests/lib/libc/stdlib/t_strtod.c

cvs diff -r1.19 -r1.20 src/tests/lib/libc/stdlib/t_strtod.c (expand / switch to unified diff)

--- src/tests/lib/libc/stdlib/t_strtod.c 2011/06/05 16:33:51 1.19
+++ src/tests/lib/libc/stdlib/t_strtod.c 2011/06/07 13:51:52 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: t_strtod.c,v 1.19 2011/06/05 16:33:51 jruoho Exp $ */ 1/* $NetBSD: t_strtod.c,v 1.20 2011/06/07 13:51:52 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2011 The NetBSD Foundation, Inc. 4 * Copyright (c) 2011 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jukka Ruohonen. 8 * by Jukka Ruohonen.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* Public domain, Otto Moerbeek <otto@drijf.net>, 2006. */ 32/* Public domain, Otto Moerbeek <otto@drijf.net>, 2006. */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__RCSID("$NetBSD: t_strtod.c,v 1.19 2011/06/05 16:33:51 jruoho Exp $"); 35__RCSID("$NetBSD: t_strtod.c,v 1.20 2011/06/07 13:51:52 martin Exp $");
36 36
37#include <errno.h> 37#include <errno.h>
38#include <math.h> 38#include <math.h>
39#include <stdio.h> 39#include <stdio.h>
40#include <stdlib.h> 40#include <stdlib.h>
41#include <string.h> 41#include <string.h>
42 42
43#include <atf-c.h> 43#include <atf-c.h>
44#include <atf-c/config.h> 44#include <atf-c/config.h>
45 45
46#if defined(__i386__) || defined(__amd64__) || defined(__sparc__) 46#if defined(__i386__) || defined(__amd64__) || defined(__sparc__)
47#include <fenv.h> 47#include <fenv.h>
48#endif 48#endif
@@ -215,27 +215,29 @@ ATF_TC_BODY(strtof_nan, tc) @@ -215,27 +215,29 @@ ATF_TC_BODY(strtof_nan, tc)
215 215
216ATF_TC(strtold_nan); 216ATF_TC(strtold_nan);
217ATF_TC_HEAD(strtold_nan, tc) 217ATF_TC_HEAD(strtold_nan, tc)
218{ 218{
219 atf_tc_set_md_var(tc, "descr", "A strtold(3) with NaN"); 219 atf_tc_set_md_var(tc, "descr", "A strtold(3) with NaN");
220} 220}
221 221
222ATF_TC_BODY(strtold_nan, tc) 222ATF_TC_BODY(strtold_nan, tc)
223{ 223{
224#ifndef __vax__ 224#ifndef __vax__
225# ifdef __HAVE_LONG_DOUBLE 225# ifdef __HAVE_LONG_DOUBLE
226 char *end; 226 char *end;
227 227
 228#ifndef __sparc64__
228 atf_tc_expect_fail("PR lib/45020"); 229 atf_tc_expect_fail("PR lib/45020");
 230#endif
229 231
230 long double ld = strtold(nan_string, &end); 232 long double ld = strtold(nan_string, &end);
231 ATF_REQUIRE(isnan(ld) != 0); 233 ATF_REQUIRE(isnan(ld) != 0);
232 ATF_REQUIRE(__isnanl(ld) != 0); 234 ATF_REQUIRE(__isnanl(ld) != 0);
233 ATF_REQUIRE(strcmp(end, "y") == 0); 235 ATF_REQUIRE(strcmp(end, "y") == 0);
234# else 236# else
235 atf_tc_skip("Requires long double support"); 237 atf_tc_skip("Requires long double support");
236# endif 238# endif
237#else 239#else
238 atf_tc_skip("vax not supported"); 240 atf_tc_skip("vax not supported");
239#endif 241#endif
240} 242}
241 243