Commit 7b7c6dc
authored
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.
1 parent 3b0f620 commit 7b7c6dc
2 files changed
Lines changed: 44 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
2565 | 2570 | | |
2566 | 2571 | | |
2567 | 2572 | | |
2568 | | - | |
2569 | | - | |
2570 | | - | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
| 2576 | + | |
2571 | 2577 | | |
2572 | | - | |
2573 | | - | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
2580 | | - | |
2581 | | - | |
2582 | | - | |
2583 | | - | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
2588 | | - | |
2589 | | - | |
2590 | | - | |
2591 | | - | |
2592 | | - | |
2593 | | - | |
2594 | | - | |
2595 | | - | |
2596 | | - | |
2597 | | - | |
2598 | | - | |
2599 | | - | |
2600 | | - | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
2604 | 2591 | | |
2605 | 2592 | | |
2606 | 2593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
4272 | 4276 | | |
4273 | 4277 | | |
4274 | 4278 | | |
| 4279 | + | |
4275 | 4280 | | |
4276 | 4281 | | |
4277 | 4282 | | |
| |||
4280 | 4285 | | |
4281 | 4286 | | |
4282 | 4287 | | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
4283 | 4302 | | |
4284 | 4303 | | |
4285 | 4304 | | |
| |||
4493 | 4512 | | |
4494 | 4513 | | |
4495 | 4514 | | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
4496 | 4518 | | |
4497 | 4519 | | |
4498 | 4520 | | |
| |||
0 commit comments