| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: t_siginfo.c,v 1.30 2015/12/22 14:25:58 christos Exp $ */ | | 1 | /* $NetBSD: t_siginfo.c,v 1.31 2017/03/05 16:07:38 chs Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2010 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2010 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -299,29 +299,27 @@ ATF_TC_HEAD(sigfpe_flt, tc) | | | @@ -299,29 +299,27 @@ ATF_TC_HEAD(sigfpe_flt, tc) |
299 | | | 299 | |
300 | atf_tc_set_md_var(tc, "descr", | | 300 | atf_tc_set_md_var(tc, "descr", |
301 | "Checks that signal trampoline correctly calls SIGFPE handler " | | 301 | "Checks that signal trampoline correctly calls SIGFPE handler " |
302 | "for floating div-by-zero"); | | 302 | "for floating div-by-zero"); |
303 | } | | 303 | } |
304 | | | 304 | |
305 | ATF_TC_BODY(sigfpe_flt, tc) | | 305 | ATF_TC_BODY(sigfpe_flt, tc) |
306 | { | | 306 | { |
307 | struct sigaction sa; | | 307 | struct sigaction sa; |
308 | double d = strtod("0", NULL); | | 308 | double d = strtod("0", NULL); |
309 | | | 309 | |
310 | if (isQEMU()) | | 310 | if (isQEMU()) |
311 | atf_tc_skip("Test does not run correctly under QEMU"); | | 311 | atf_tc_skip("Test does not run correctly under QEMU"); |
312 | #if defined(__powerpc__) | | 312 | #if defined(__arm__) && !__SOFTFP__ |
313 | atf_tc_skip("Test not valid on powerpc"); | | | |
314 | #elif defined(__arm__) && !__SOFTFP__ | | | |
315 | /* | | 313 | /* |
316 | * Some NEON fpus do not implement IEEE exception handling, | | 314 | * Some NEON fpus do not implement IEEE exception handling, |
317 | * skip these tests if running on them and compiled for | | 315 | * skip these tests if running on them and compiled for |
318 | * hard float. | | 316 | * hard float. |
319 | */ | | 317 | */ |
320 | if (0 == fpsetmask(fpsetmask(FP_X_INV))) | | 318 | if (0 == fpsetmask(fpsetmask(FP_X_INV))) |
321 | atf_tc_skip("FPU does not implement exception handling"); | | 319 | atf_tc_skip("FPU does not implement exception handling"); |
322 | #endif | | 320 | #endif |
323 | if (sigsetjmp(sigfpe_flt_env, 0) == 0) { | | 321 | if (sigsetjmp(sigfpe_flt_env, 0) == 0) { |
324 | sa.sa_flags = SA_SIGINFO; | | 322 | sa.sa_flags = SA_SIGINFO; |
325 | sa.sa_sigaction = sigfpe_flt_action; | | 323 | sa.sa_sigaction = sigfpe_flt_action; |
326 | sigemptyset(&sa.sa_mask); | | 324 | sigemptyset(&sa.sa_mask); |
327 | sigaction(SIGFPE, &sa, NULL); | | 325 | sigaction(SIGFPE, &sa, NULL); |