-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-36719: regrtest -jN no longer stops on crash #13231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Previously, when a test crashed, Python exited immediately. But I prefer to see all errors, to have more info about the bug. For example, if test_asyncio does crash, I would like to know if other tests passed or not. Currently, all following tests are omitted. |
@pablogsal: Do you have an opinion on continuing the execution after a worker crashed? A crash means process killed by a signal, process killed by faulthandler watchdog timeout, etc. |
Maybe run a new worker on demand? |
regrtest main process has a pool of thread. Each test file is run in a different thread. When a test file crash, the thread is still consistent and fine. Only the exited process was sick. So I'm not sure of what you mean by "running a new worker". The question is more if we should stop as soon as possible when a test file crash, or if we want to continue. Right now, we stop as soon as possible. I propose to always run the whole test suite. I don't see any technical reason which prevents that, nor why it would be a bad idea. |
There is the "failfast" option. I think that if it is set, we should stop as soon as possible. Otherwise we should run a new subprocess instead of the crashed one and continue. |
I think is a good idea as long as there is a way to opt-out of that behaviour, like the "failfast" option that Serhiy mentions. |
--failfast only impacts a single test file. But even if the whole test file fails, regrtest continues the execution. I modified my PR so --failfast now fails as soon as a test file fails. |
"python3 -m test -jN ..." now continues the execution of next tests when a worker process crash (CHILD_ERROR state). Previously, the test suite stopped immediately. Use --failfast to stop at the first error. Moreover, --forever now also implies --failfast.
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
"python3 -m test -jN ..." now continues the execution of next tests when a worker process crash (CHILD_ERROR state). Previously, the test suite stopped immediately. Use --failfast to stop at the first error. Moreover, --forever now also implies --failfast. (cherry picked from commit b0917df) Co-authored-by: Victor Stinner <[email protected]>
GH-13291 is a backport of this pull request to the 3.7 branch. |
"python3 -m test -jN ..." now continues the execution of next tests when a worker process crash (CHILD_ERROR state). Previously, the test suite stopped immediately. Use --failfast to stop at the first error. Moreover, --forever now also implies --failfast. (cherry picked from commit b0917df) Co-authored-by: Victor Stinner <[email protected]>
|
"python3 -m test -jN ..." now continue the execution of next tests
when a worker process crash (CHILD_ERROR state). Previously, the test
suite stopped immediately. Use --failfast to stop at the first error.
https://bugs.python.org/issue36719