Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libc/gen Skip the sigfpe_flt and sigfpe_int tests ...



details:   https://anonhg.NetBSD.org/src/rev/f8bfa877f7b0
branches:  trunk
changeset: 762825:f8bfa877f7b0
user:      riz <riz%NetBSD.org@localhost>
date:      Wed Mar 02 03:42:56 2011 +0000

description:
Skip the sigfpe_flt and sigfpe_int tests on powerpc; powerpc does
not fault on divide-by-zero.  As discussed on tech-userlevel.

diffstat:

 tests/lib/libc/gen/t_siginfo.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (43 lines):

diff -r 889d0aad77d0 -r f8bfa877f7b0 tests/lib/libc/gen/t_siginfo.c
--- a/tests/lib/libc/gen/t_siginfo.c    Tue Mar 01 22:52:54 2011 +0000
+++ b/tests/lib/libc/gen/t_siginfo.c    Wed Mar 02 03:42:56 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_siginfo.c,v 1.9 2011/03/01 12:47:43 pooka Exp $ */
+/* $NetBSD: t_siginfo.c,v 1.10 2011/03/02 03:42:56 riz Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -27,6 +27,7 @@
  */
 
 #include <atf-c.h>
+#include <atf-c/config.h>
 
 #include <sys/inttypes.h>
 #include <sys/resource.h>
@@ -38,6 +39,7 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <setjmp.h>
 
@@ -302,6 +304,8 @@
            "'cpu0: Intel Pentium II (Klamath) (686-class), id 0x633'") == 0)
                atf_tc_skip("Test does not run correctly under qemu "
                    "(heuristic match)");
+       if (strcmp(atf_config_get("atf_arch"),"powerpc") == 0)
+               atf_tc_skip("Test not valid on powerpc");
        if (sigsetjmp(sigfpe_flt_env, 0) == 0) {
                sa.sa_flags = SA_SIGINFO;
                sa.sa_sigaction = sigfpe_flt_action;
@@ -351,6 +355,8 @@
        struct sigaction sa;
        long l = strtol("0", NULL, 10);
 
+       if (strcmp(atf_config_get("atf_arch"),"powerpc") == 0)
+               atf_tc_skip("Test not valid on powerpc");
        if (sigsetjmp(sigfpe_int_env, 0) == 0) {
                sa.sa_flags = SA_SIGINFO;
                sa.sa_sigaction = sigfpe_int_action;



Home | Main Index | Thread Index | Old Index