Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/kernel Since it is unlikely that any of this really wa...
details: https://anonhg.NetBSD.org/src/rev/eb7f784714c0
branches: trunk
changeset: 351890:eb7f784714c0
user: kre <kre%NetBSD.org@localhost>
date: Fri Mar 03 12:23:26 2017 +0000
description:
Since it is unlikely that any of this really wants to test whether
[v]fork() produces pid==1 (init) (if it were useful to test that, an
entirely different test would be appropriate) change the tests so
they check for [v]fork() failure, as probably intended, instead.
diffstat:
tests/kernel/t_ptrace_wait.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (108 lines):
diff -r c37a787224a9 -r eb7f784714c0 tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c Fri Mar 03 11:36:20 2017 +0000
+++ b/tests/kernel/t_ptrace_wait.c Fri Mar 03 12:23:26 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.76 2017/03/01 08:05:15 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.77 2017/03/03 12:23:26 kre Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.76 2017/03/01 08:05:15 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.77 2017/03/03 12:23:26 kre Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -1329,7 +1329,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = fork()) != 1);
+ FORKEE_ASSERT((child2 = fork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -1450,7 +1450,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = fork()) != 1);
+ FORKEE_ASSERT((child2 = fork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -1533,7 +1533,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = vfork()) != 1);
+ FORKEE_ASSERT((child2 = vfork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -1654,7 +1654,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = vfork()) != 1);
+ FORKEE_ASSERT((child2 = vfork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -1734,7 +1734,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = vfork()) != 1);
+ FORKEE_ASSERT((child2 = vfork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -1830,7 +1830,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = vfork()) != 1);
+ FORKEE_ASSERT((child2 = vfork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -5265,7 +5265,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = fork()) != 1);
+ FORKEE_ASSERT((child2 = fork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -6050,7 +6050,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = fork()) != 1);
+ FORKEE_ASSERT((child2 = fork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -6181,7 +6181,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = fork()) != 1);
+ FORKEE_ASSERT((child2 = fork()) != -1);
if (child2 == 0)
_exit(exitval2);
@@ -6311,7 +6311,7 @@
printf("Before raising %s from child\n", strsignal(sigval));
FORKEE_ASSERT(raise(sigval) == 0);
- FORKEE_ASSERT((child2 = vfork()) != 1);
+ FORKEE_ASSERT((child2 = vfork()) != -1);
if (child2 == 0)
_exit(exitval2);
Home |
Main Index |
Thread Index |
Old Index