You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regrtest should re-run failed tests in subprocesses #108834
Buildbots and GitHub Actions run the Python test suite with --verbose2 option to re-run failed tests in verbose mode. The current regrtest implementation is the re-run tests in the main process. It is not reliable: if a test crash or timeout, the main process cannot get back the control since the process is killed. Usually, there is no final report after the test is re-run, and the output is just "truncated".
I propose to re-run failed tests in subprocesses to make them more reliable:
Each test file is run in a fresh process and so does not inherit the state of previously executed tests. It runs in a known and reproducible state: threads, signals, etc.
The main process can kill the worker process if it hangs.
If faulthandler kills a worker process on a timeout, the main control detects it and continues its regular work.
Same if a worker process is killed because of a fatal error: Python Fatal Error, segmentation fault, etc.
Regular regrtest features can be re-used, like detection of leaking temporary files.
Activity
pythongh-108834: regrtest reruns failed tests in subprocesses
pythongh-108834: regrtest reruns failed tests in subprocesses
pythongh-108834: regrtest reruns failed tests in subprocesses
pythongh-108834: regrtest reruns failed tests in subprocesses
pythongh-108834: regrtest reruns failed tests in subprocesses
pythongh-108834: regrtest reruns failed tests in subprocesses
gh-108834: regrtest reruns failed tests in subprocesses (#108839)
pythongh-108834: Cleanup libregrtest
pythongh-108834: regrtest --fail-rerun exits with code 5
pythongh-108834: regrtest --fail-rerun exits with code 5
gh-108834: regrtest --fail-rerun exits with code 5 (#108896)
pythongh-108834: Cleanup libregrtest
pythongh-108834: Cleanup libregrtest
pythongh-108834: regrtest reruns failed tests in subprocesses (python…
pythongh-108834: regrtest --fail-rerun exits with code 5 (python#108896)
pythongh-108834: Cleanup libregrtest
[3.12] gh-108834: Sync libregrtest with the main branch (#108966)
pythongh-108834: Refactor Regrtest.main()
pythongh-108834: Refactor Regrtest.main()