diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-08-11 02:36:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 02:36:30 +0200 |
commit | bc69d00288a0b1f5ef49dcfd60a91c5e9b5b81ae (patch) | |
tree | 5c4a6f15ca98b77895fd4307b289aa1ef767772f /Tools/scripts/patchcheck.py | |
parent | 270c3c62edd81c14fcdb6a24b4b518a777ec6534 (diff) | |
download | cpython-git-bc69d00288a0b1f5ef49dcfd60a91c5e9b5b81ae.tar.gz |
bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3070)
The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.
Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
(cherry picked from commit 7b7c6dcfff6a35333988a3c74c895ed19dff2e09)
Diffstat (limited to 'Tools/scripts/patchcheck.py')
0 files changed, 0 insertions, 0 deletions