Module Name: src Committed By: jruoho Date: Sun Mar 11 06:32:53 UTC 2012
Modified Files: src/tests/lib/libm: t_atan.c Log Message: Fix previous: curiously enough, i386/qemu is not affected, so use the "system(3) hack" to identify Qemu. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libm/t_atan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libm/t_atan.c diff -u src/tests/lib/libm/t_atan.c:1.4 src/tests/lib/libm/t_atan.c:1.5 --- src/tests/lib/libm/t_atan.c:1.4 Sat Mar 10 20:11:01 2012 +++ src/tests/lib/libm/t_atan.c Sun Mar 11 06:32:53 2012 @@ -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 @@ ATF_TC_BODY(atan_inf_neg, tc) 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 @@ ATF_TC_BODY(atan_inf_pos, tc) 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 @@ ATF_TC_BODY(atan_tan, tc) 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++) {