diff options
author | jhb <jhb@FreeBSD.org> | 2015-09-09 23:39:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-09-09 23:39:30 +0000 |
commit | 4a069f68d730aa3275ae62ae00a0be4a5e6e464b (patch) | |
tree | 76e5aaf146ac3d3a13836825fb8ac24a7388921a /tests/sys/kern/Makefile | |
parent | a7e2ef65e32e8f7cba6dbe0690c663d63c1b4f73 (diff) | |
download | FreeBSD-src-4a069f68d730aa3275ae62ae00a0be4a5e6e464b.zip FreeBSD-src-4a069f68d730aa3275ae62ae00a0be4a5e6e464b.tar.gz |
MFC 283281,283282,283562,283647,283836,284000,286158:
Various fixes to orphan handling which also fix issues with following
forks.
283281:
Always set p_oppid when attaching to an existing process via procfs
tracing. This matches the behavior of ptrace(PT_ATTACH). Also,
the procfs detach request assumes p_oppid is always set.
283282:
Only reparent a traced process to its old parent if the tracing process is
not the old parent. Otherwise, proc_reap() will leave the zombie in place
resulting in the process' status being returned twice to its parent.
Add test cases for PT_TRACE_ME and PT_ATTACH which are fixed by
this change.
283562:
Do not allow a process to reap an orphan (a child currently being
traced by another process such as a debugger). The parent process does
need to check for matching orphan pids to avoid returning ECHILD if an
orphan has exited, but it should not return the exited status for the
child until after the debugger has detached from the orphan process
either explicitly or implicitly via wait().
Add two tests for for this case: one where the debugger is the direct
child (thus the parent has a non-empty children list) and one where
the debugger is not a direct child (so the only "child" of the parent
is the orphan).
283647:
Tweak the description of when waitpid() doesn't return any status for a
non-blocking wait to avoid the word "empty".
283836:
Consistently only use one end of the pipe in the parent and debugger
processes and do not rely on EOF due to a close() in the debugger.
284000:
Add a CHILD_REQUIRE macro similar to ATF_REQUIRE for use in child processes
of the main test process.
286158:
Clear P_TRACED before reparenting a detached process back to its
original parent. Otherwise the debugee will be set as an orphan of
the debugger.
Add tests for tracing forks via PT_FOLLOW_FORK.
Diffstat (limited to 'tests/sys/kern/Makefile')
-rw-r--r-- | tests/sys/kern/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d366aa1..bf6aa0d 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -3,6 +3,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_descrip_test +ATF_TESTS_C+= ptrace_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" |