Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libm Fix previous: curiously enough, i386/qemu is ...



details:   https://anonhg.NetBSD.org/src/rev/68d015151531
branches:  trunk
changeset: 777968:68d015151531
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Mar 11 06:32:53 2012 +0000

description:
Fix previous: curiously enough, i386/qemu is not affected, so use the
"system(3) hack" to identify Qemu.

diffstat:

 tests/lib/libm/t_atan.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (47 lines):

diff -r a5fdb522c770 -r 68d015151531 tests/lib/libm/t_atan.c
--- a/tests/lib/libm/t_atan.c   Sun Mar 11 06:11:29 2012 +0000
+++ b/tests/lib/libm/t_atan.c   Sun Mar 11 06:32:53 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_atan.c,v 1.4 2012/03/10 20:11:01 jruoho Exp $ */
+/* $NetBSD: t_atan.c,v 1.5 2012/03/11 06:32:53 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
 #include <atf-c.h>
 #include <atf-c/config.h>
 #include <math.h>
+#include <stdlib.h>
 #include <string.h>
 
 /*
@@ -65,7 +66,8 @@
        const double x = -1.0L / 0.0L;
        const double eps = 1.0e-40;
 
-       if (strcmp(atf_config_get("atf_arch"), "i386") == 0)
+       if (strcmp(atf_config_get("atf_arch"), "i386") == 0 &&
+           system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR port-i386/46108");
 
        if (fabs(atan(x) + M_PI_2) > eps)
@@ -85,7 +87,8 @@
        const double x = +1.0L / 0.0L;
        const double eps = 1.0e-40;
 
-       if (strcmp(atf_config_get("atf_arch"), "i386") == 0)
+       if (strcmp(atf_config_get("atf_arch"), "i386") == 0 &&
+           system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR port-i386/46108");
 
        if (fabs(atan(x) - M_PI_2) > eps)
@@ -107,7 +110,8 @@
        double y;
        size_t i;
 
-       if (strcmp(atf_config_get("atf_arch"), "i386") == 0)
+       if (strcmp(atf_config_get("atf_arch"), "i386") == 0 &&
+           system("cpuctl identify 0 | grep -q QEMU") == 0)
                atf_tc_expect_fail("PR port-i386/46108");
 
        for (i = 0; i < __arraycount(x); i++) {



Home | Main Index | Thread Index | Old Index