Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/kernel Move the #ifndef/#define dance for the (current...
details: https://anonhg.NetBSD.org/src/rev/e264e619e7ce
branches: trunk
changeset: 350506:e264e619e7ce
user: kre <kre%NetBSD.org@localhost>
date: Fri Jan 13 03:01:09 2017 +0000
description:
Move the #ifndef/#define dance for the (currently) system undefined
PTRACE_VFORK* macros out of a function that is not always compiled
(as they are used in other functions that are.) Unbreak the build.
diffstat:
tests/kernel/t_ptrace_wait.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diffs (58 lines):
diff -r 2e20268ac777 -r e264e619e7ce tests/kernel/t_ptrace_wait.c
--- a/tests/kernel/t_ptrace_wait.c Fri Jan 13 01:39:04 2017 +0000
+++ b/tests/kernel/t_ptrace_wait.c Fri Jan 13 03:01:09 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.54 2017/01/12 21:35:53 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.55 2017/01/13 03:01:09 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.54 2017/01/12 21:35:53 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.55 2017/01/13 03:01:09 kre Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -65,6 +65,19 @@
#define PARENT_FROM_CHILD(info, fds, msg) \
ATF_REQUIRE(msg_read_child(info " from parent " # fds, &fds, &msg, sizeof(msg)) == 0)
+/*
+ * ptrace(2) command PT_SET_EVENT_MASK: option PTRACE_VFORK unsupported
+ */
+#ifndef PTRACE_VFORK
+#define PTRACE_VFORK 0
+#endif
+/*
+ * ptrace(2) command PT_SET_EVENT_MASK: option PTRACE_VFORK_DONE unsupported
+ */
+#ifndef PTRACE_VFORK_DONE
+#define PTRACE_VFORK_DONE 0
+#endif
+
ATF_TC(traceme1);
ATF_TC_HEAD(traceme1, tc)
{
@@ -1296,19 +1309,6 @@
ptrace_event_t event;
const int elen = sizeof(event);
- /*
- * ptrace(2) command PT_SET_EVENT_MASK: option PTRACE_VFORK unsupported
- */
-#ifndef PTRACE_VFORK
-#define PTRACE_VFORK 0
-#endif
- /*
- * ptrace(2) command PT_SET_EVENT_MASK: option PTRACE_VFORK_DONE
- * unsupported
- */
-#ifndef PTRACE_VFORK_DONE
-#define PTRACE_VFORK_DONE 0
-#endif
atf_tc_expect_fail("PR kern/51630");
printf("Before forking process PID=%d\n", getpid());
Home |
Main Index |
Thread Index |
Old Index