◐ Shell
clean mode source ↗

bpo-37531: Fix regrtest timeout for subprocesses by nanjekyejoannah · Pull Request #14679 · python/cpython

Overall, the change is great and seems to work as expected, but I tested it and it doesn't work as I expected:

  • it doesn't report stdout/stderr on timeout
  • regression: it ignores stdout/stderr on "CHILD_ERROR" whereas it was properly passed to the main process previously
  • faulthandler and Popen.communicate() use the same timeout, so it's unclear which one which trigger first: I tuned timeouts to give more time to faulthandler. I prefer faulthandler since it dumps the traceback where Python was stuck, whereas Popen.communicate() timeout only returns "truncated" output with no traceback
  • the timeout is reported as an exception, not as as "result"

I tried to add a commit to this PR but I wasn't allowed, so I forked this PR and created PR #15072 to add my changes on top of it.