Page MenuHomeFreeBSD

ptrace: Add a test using PROC_REAP_KILL to kill a stopped debuggee
ClosedPublic

Authored by markj on Mar 30 2024, 2:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 7:39 AM
Unknown Object (File)
Fri, Apr 26, 11:32 PM
Unknown Object (File)
Fri, Apr 26, 4:35 AM
Unknown Object (File)
Fri, Apr 12, 3:14 PM
Unknown Object (File)
Thu, Apr 11, 3:14 AM
Unknown Object (File)
Wed, Apr 10, 10:39 PM
Unknown Object (File)
Tue, Apr 9, 12:37 PM
Unknown Object (File)
Tue, Apr 9, 12:12 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Mar 30 2024, 2:20 PM

Remove some leftover debugging cruft

Why do you need the killer child to kill the debuggee?

I suppose the test is run in dedicated process, so the debuggee is automatically detached, continued, and then the zombie is gathered either by init or the test process?

This revision is now accepted and ready to land.Mar 30 2024, 2:43 PM
In D44564#1016180, @kib wrote:

Why do you need the killer child to kill the debuggee?

It's not strictly needed I think. It just help exercise more code paths in reap_kill_subtree_once().

I suppose the test is run in dedicated process, so the debuggee is automatically detached, continued, and then the zombie is gathered either by init or the test process?

Yes, ATF tests always run in a dedicated process, so we can let init reap zombies.

Make the test case useful. reap_kill() will not single-thread an
already-stopped process.

This revision now requires review to proceed.Mar 31 2024, 2:56 PM
This revision is now accepted and ready to land.Mar 31 2024, 6:03 PM