Commit a0bd27f
test(profiling): detect uWSGI worker crashes (#19405)
## Description
Strengthens the existing uWSGI `--lazy-apps` test without `--master` by checking the PID returned from `waitpid()` and rejecting signal-based termination.
This closes a test blind spot where the process could crash during shutdown while the test continued to validate generated profile samples. The sibling worker is cleaned up before the captured exit status is asserted, including on the failure path. The change is extracted from #18724 because it is independent of the CPU timer profiler.
## Testing
- `scripts/run-tests --venv 1ef9287 -- -s -- -k test_uwsgi_threads_processes_no_primary_lazy_apps`
- `1 passed, 12 deselected` on Python 3.13.13 with `uwsgi<2.0.30`
- `scripts/lint fmt -- tests/profiling/test_uwsgi.py`
- `scripts/lint checks`
- `git diff --check`
## Risks
None. This only makes an existing test detect process crashes that it previously overlooked.
## Additional Notes
No release note is needed because this is a test-only change.
Co-authored-by: taegyun.kim <taegyun.kim@datadoghq.com>1 parent 2d85a68 commit a0bd27f
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
| |||
0 commit comments