Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys In ATF t_ptrace_wait* SIGILL tests allow ...
details: https://anonhg.NetBSD.org/src/rev/ccee0d3c293d
branches: trunk
changeset: 456156:ccee0d3c293d
user: kamil <kamil%NetBSD.org@localhost>
date: Thu Apr 25 11:45:12 2019 +0000
description:
In ATF t_ptrace_wait* SIGILL tests allow any si_code
These codes are not portable between CPUs and kernels.
Change the checks to return any valid si_code in the defined range of ILL
values.
PR port-sparc/54140 by Andreas Gustafsson
diffstat:
tests/lib/libc/sys/t_ptrace_wait.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (58 lines):
diff -r 8218fcadbaf2 -r ccee0d3c293d tests/lib/libc/sys/t_ptrace_wait.c
--- a/tests/lib/libc/sys/t_ptrace_wait.c Thu Apr 25 11:21:34 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.c Thu Apr 25 11:45:12 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.111 2019/04/19 21:54:32 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $ */
/*-
* Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.111 2019/04/19 21:54:32 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.112 2019/04/25 11:45:12 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -471,7 +471,8 @@
ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
break;
case SIGILL:
- ATF_REQUIRE_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+ ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+ info.psi_siginfo.si_code <= ILL_BADSTK);
break;
case SIGFPE:
ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
@@ -647,7 +648,8 @@
ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
break;
case SIGILL:
- ATF_REQUIRE_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+ ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+ info.psi_siginfo.si_code <= ILL_BADSTK);
break;
case SIGFPE:
ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
@@ -826,7 +828,8 @@
ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
break;
case SIGILL:
- ATF_REQUIRE_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+ ATF_REQUIRE(info.psi_siginfo.si_code >= 0 &&
+ info.psi_siginfo.si_code <= ILL_BADSTK);
break;
case SIGFPE:
ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
@@ -2123,7 +2126,8 @@
FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, SEGV_MAPERR);
break;
case SIGILL:
- FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, ILL_PRVOPC);
+ FORKEE_ASSERT(info.psi_siginfo.si_code >= 0 &&
+ info.psi_siginfo.si_code <= ILL_BADSTK);
break;
case SIGFPE:
FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
Home |
Main Index |
Thread Index |
Old Index