Module Name: src
Committed By: kamil
Date: Tue Mar 28 13:16:30 UTC 2017
Modified Files:
src/tests/kernel: t_ptrace_wait.c
Log Message:
Explain expected behavior for PTRACE_FORK events in t_ptrace_wait*
PR kern/52117 ptrace(2) PTRACE_FORK fails on some platforms
Add message similar to:
We expect two SIGTRAP events, for child 22199 (TRAP_CHLD,
pe_report_event=PTRACE_FORK, state.pe_other_pid=child2) and for child2
(TRAP_CHLD, pe_report_event=PTRACE_FORK, state.pe_other_pid=child)
This should make the expected behavior more clear.
Sponsored by <The NetBSD Foundation>
To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/tests/kernel/t_ptrace_wait.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/kernel/t_ptrace_wait.c
diff -u src/tests/kernel/t_ptrace_wait.c:1.83 src/tests/kernel/t_ptrace_wait.c:1.84
--- src/tests/kernel/t_ptrace_wait.c:1.83 Tue Mar 28 12:39:07 2017
+++ src/tests/kernel/t_ptrace_wait.c Tue Mar 28 13:16:30 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ptrace_wait.c,v 1.83 2017/03/28 12:39:07 kamil Exp $ */
+/* $NetBSD: t_ptrace_wait.c,v 1.84 2017/03/28 13:16:30 kamil Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ptrace_wait.c,v 1.83 2017/03/28 12:39:07 kamil Exp $");
+__RCSID("$NetBSD: t_ptrace_wait.c,v 1.84 2017/03/28 13:16:30 kamil Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -1360,6 +1360,10 @@ ATF_TC_BODY(fork1, tc)
printf("Before resuming the child process where it left off and "
"without signal to be sent\n");
+ printf("We expect two SIGTRAP events, for child %d (TRAP_CHLD, "
+ "pe_report_event=PTRACE_FORK, state.pe_other_pid=child2) and "
+ "for child2 (TRAP_CHLD, pe_report_event=PTRACE_FORK, "
+ "state.pe_other_pid=child)\n", child);
ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child);
@@ -5328,6 +5332,10 @@ ATF_TC_BODY(siginfo5, tc)
printf("Before resuming the child process where it left off and "
"without signal to be sent\n");
+ printf("We expect two SIGTRAP events, for child %d (TRAP_CHLD, "
+ "pe_report_event=PTRACE_FORK, state.pe_other_pid=child2) and "
+ "for child2 (TRAP_CHLD, pe_report_event=PTRACE_FORK, "
+ "state.pe_other_pid=child)\n", child);
ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1);
printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child);