GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — gh-151496: Use process groups in test_dtrace by vstinner · Pull Request #151512 · python/cpython Conversation
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@stratakis: I addressed your review, thanks. Please review the updated PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Hum. test_socket failed with a strange error. I just re-ran the job. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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.
There was an error while loading. Please reload this page.
Oh, test_abc of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-151589 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
) gh-151496: Use process groups in test_dtrace (GH-151512) Create a new process group to run bpftrace commands, so it's possible to kill also child processes on timeout. (cherry picked from commit a064b32) Co-authored-by: Victor Stinner <[email protected]>
Create a new process group to run bpftrace commands, so it's possible to kill also child processes on timeout.
* gh-98894: Fix DTrace test_check_probes for shared builds (#151122) When building with --enable-shared, the SystemTap/DTrace notes live in libpython. Add detection logic to be used by readelf. Force the C locale on readelf output. (cherry picked from commit 3a08e93) * gh-151496: Use process groups in test_dtrace (#151512) Create a new process group to run bpftrace commands, so it's possible to kill also child processes on timeout. (cherry picked from commit a064b32) * gh-151496: Use process groups in TraceBackend in test_dtrace (#152039) Run the generic DTrace/SystemTap commands in a new process group and terminate the whole group on timeout. This prevents a forked tracer child from keeping stdout/stderr pipes open after the direct tracer process is killed. (cherry picked from commit 1785f4b) * gh-98894: Check readelf failures in test_dtrace (#152345) Report readelf command failures directly instead of later failing with missing-probe assertions. (cherry picked from commit d60a677) * gh-98894: Check tracer exit status in test_dtrace (#152893) Fail functional dtrace and SystemTap cases directly when the tracer exits non-zero. (cherry picked from commit 311e7e7) * gh-98894: Quote test_dtrace tracer subcommands (#152901) Use shlex.join() when building tracer -c command strings for avoiding issues with spaces. (cherry picked from commit a159c68) * gh-98894: Fix dtrace tests in shared builds (#153372) Generate SystemTap probe definitions targeting libpython for shared builds and use centralized USDT probe object discovery for readelf and BPFTrace. (cherry picked from commit 298bef3) * gh-156703: Set LD_LIBRARY_PATH in SystemTap trace commands (GH-156424) Prefix commands passed to stap -c with LD_LIBRARY_PATH via env, when probes reside in libpython. This allows the interpreter to find libpython when staprun does not preserve the loader path. (cherry picked from commit faf4e52) * gh-156722, test_dtrace: Terminate tracing processes gracefully on timeout (#156753) Send SIGTERM to the tracing process group before falling back to SIGKILL. (cherry picked from commit 55ecc0a) * gh-156701: Increase the SystemTap usability timeout (#156720) SystemTap may compile a kernel module during its usability check (if no cached module is available). We need to allow a larger timeout for that case. (cherry picked from commit e1be613) --------- Co-authored-by: stratakis <[email protected]> Co-authored-by: stratakis <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.