bpo-36719: regrtest -jN no longer stops on crash#13231
bpo-36719: regrtest -jN no longer stops on crash#13231vstinner merged 1 commit intopython:masterfrom vstinner:regrtest_crashed
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 <vstinner@redhat.com>
|
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 <vstinner@redhat.com>
|
"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