Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib Remove the amd64-part from the Qemu checks. The fo...



details:   https://anonhg.NetBSD.org/src/rev/1b138e1b4952
branches:  trunk
changeset: 767074:1b138e1b4952
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Jul 08 05:10:05 2011 +0000

description:
Remove the amd64-part from the Qemu checks. The following tests fail also on
i386/qemu: 'strtold_inf', 'strtold_nan', and 'infinity_long_double'. It seems
that more than anything else, these are dependent on the used Qemu version.

diffstat:

 tests/lib/libc/stdlib/t_strtod.c |  17 ++++-------------
 tests/lib/libm/t_infinity.c      |  14 +++-----------
 2 files changed, 7 insertions(+), 24 deletions(-)

diffs (100 lines):

diff -r 8cd918177346 -r 1b138e1b4952 tests/lib/libc/stdlib/t_strtod.c
--- a/tests/lib/libc/stdlib/t_strtod.c  Fri Jul 08 03:29:52 2011 +0000
+++ b/tests/lib/libc/stdlib/t_strtod.c  Fri Jul 08 05:10:05 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_strtod.c,v 1.23 2011/07/07 11:04:30 jruoho Exp $ */
+/*     $NetBSD: t_strtod.c,v 1.24 2011/07/08 05:10:05 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 /* Public domain, Otto Moerbeek <otto%drijf.net@localhost>, 2006. */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_strtod.c,v 1.23 2011/07/07 11:04:30 jruoho Exp $");
+__RCSID("$NetBSD: t_strtod.c,v 1.24 2011/07/08 05:10:05 jruoho Exp $");
 
 #include <sys/utsname.h>
 
@@ -164,17 +164,12 @@
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
 
-       struct utsname utsname;
-
        /*
         * See the closed PR lib/33262.
         *
         * This may also fail under QEMU; cf. PR misc/44767.
         */
-       ATF_REQUIRE(uname(&utsname) == 0);
-
-       if (strcmp(utsname.machine, "amd64") == 0 &&
-           system("cpuctl identify 0 | grep -q QEMU") == 0)
+       if (system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR misc/44767");
 
        for (size_t i = 0; i < __arraycount(inf_strings); i++) {
@@ -238,7 +233,6 @@
 #ifndef __vax__
 #   ifdef __HAVE_LONG_DOUBLE
 
-       struct utsname utsname;
        char *end;
 
        /*
@@ -246,10 +240,7 @@
         *
         * This may also fail under QEMU; cf. PR misc/44767.
         */
-       ATF_REQUIRE(uname(&utsname) == 0);
-
-       if (strcmp(utsname.machine, "amd64") == 0 &&
-           system("cpuctl identify 0 | grep -q QEMU") == 0)
+       if (system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR misc/44767");
 
        long double ld = strtold(nan_string, &end);
diff -r 8cd918177346 -r 1b138e1b4952 tests/lib/libm/t_infinity.c
--- a/tests/lib/libm/t_infinity.c       Fri Jul 08 03:29:52 2011 +0000
+++ b/tests/lib/libm/t_infinity.c       Fri Jul 08 05:10:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_infinity.c,v 1.4 2011/07/07 11:04:30 jruoho Exp $ */
+/* $NetBSD: t_infinity.c,v 1.5 2011/07/08 05:10:05 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -29,15 +29,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_infinity.c,v 1.4 2011/07/07 11:04:30 jruoho Exp $");
-
-#include <sys/utsname.h>
+__RCSID("$NetBSD: t_infinity.c,v 1.5 2011/07/08 05:10:05 jruoho Exp $");
 
 #include <atf-c.h>
 #include <math.h>
 #include <float.h>
 #include <stdlib.h>
-#include <string.h>
 
 ATF_TC(infinity_float);
 ATF_TC_HEAD(infinity_float, tc)
@@ -92,15 +89,10 @@
 
 ATF_TC_BODY(infinity_long_double, tc)
 {
-       struct utsname utsname;
-
        /*
         * May fail under QEMU; cf. PR misc/44767.
         */
-       ATF_REQUIRE(uname(&utsname) == 0);
-
-       if (strcmp(utsname.machine, "amd64") == 0 &&
-           system("cpuctl identify 0 | grep -q QEMU") == 0)
+       if (system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR misc/44767");
 
 #ifndef LDBL_MAX



Home | Main Index | Thread Index | Old Index