gh-151496: Use process groups in test_dtrace#151512
Conversation
Create a new process group to run bpftrace commands, so it's possible to kill also child processes on timeout.
Sorry, something went wrong.
|
@stratakis: I addressed your review, thanks. Please review the updated PR. |
Sorry, something went wrong.
Hum. test_socket failed with a strange error. I just re-ran the job. |
Sorry, something went wrong.
|
Nitpick: I'd change the helper name to something other as For testing the assert_usable() path (10s timeout): Fake bpftrace script: And adding it to the $PATH when running the tests: This hangs and also leaves leaked children: For testing the run_case() path (60s timeout): Fake bpftrace script: PATH="fake bpftrace path:$PATH" ./python -m unittest -v test.test_dtrace.BPFTraceNormalTests.test_gc After 60 secs it should failed and children are leaked: With the PR the assert_usable() path doesn't hang anymore and doesn't leak and the run_case() path still times outs but doesn't leak. |
Sorry, something went wrong.
Oh, test_abc of |
Sorry, something went wrong.
Oh thanks for testing manually! It's good that you managed to confirm that my fix works as expected :-)
Calling I prefer to keep "kill" in the function name, since it's the main action of the function. |
Sorry, something went wrong.
a064b32
into
python:main
Jun 17, 2026
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
Sorry, something went wrong.
Create a new process group to run bpftrace commands, so it's possible to kill also child processes on timeout.
test_dtracecan hang indefinitely when bpftrace usability check times out #151496