Skip to content
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

regrtest: python -m test -j1 --verbose3 should not replace sys.stdout #110367

Closed
vstinner opened this issue Oct 4, 2023 · 0 comments
Closed

regrtest: python -m test -j1 --verbose3 should not replace sys.stdout #110367

vstinner opened this issue Oct 4, 2023 · 0 comments

Comments

@vstinner
Copy link
Member

vstinner commented Oct 4, 2023

Currently, when a test does crash, its output is lost. It gives bug reports like issue gh-110364 which contains no output, just an exit code :-( The problem is that run_single_test() replaces sys.stdout when --verbose3 option is used. If Python runs normally, the output is ignored on success, or display on error.

When we run a worker process, we can make this decision in the main process: ignore the output on error, or display the output on error.

Linked PRs

vstinner added a commit to vstinner/cpython that referenced this issue Oct 4, 2023
When using worker processes (-jN), regrtest no longer replaces
sys.stdout in the worker process when running run_single_test().
Instead, RunWorkers only shows the worker stdout if the test result
is not a success.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 4, 2023
When using worker processes (-jN) with --verbose3 option, regrtest
can now display the worker output even if a worker process does
crash.  Previously, sys.stdout and sys.stderr were replaced and so
the worker output was lost on a crash.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 4, 2023
When using worker processes (-jN) with --verbose3 option, regrtest
can now display the worker output even if a worker process does
crash.  Previously, sys.stdout and sys.stderr were replaced and so
the worker output was lost on a crash.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 4, 2023
When using worker processes (-jN) with --verbose3 option, regrtest
can now display the worker output even if a worker process does
crash.  Previously, sys.stdout and sys.stderr were replaced and so
the worker output was lost on a crash.
vstinner added a commit that referenced this issue Oct 5, 2023
When using worker processes (-jN) with --verbose3 option, regrtest
can now display the worker output even if a worker process does
crash.  Previously, sys.stdout and sys.stderr were replaced and so
the worker output was lost on a crash.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 5, 2023
… build

Set ASAN_OPTIONS="handle_segv=0" env var to run the test.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 5, 2023
… build

Set ASAN_OPTIONS="handle_segv=0" env var to run the test.
vstinner added a commit that referenced this issue Oct 5, 2023
…#110387)

Set ASAN_OPTIONS="handle_segv=0" env var to run the test.
@vstinner vstinner closed this as completed Oct 5, 2023
vstinner added a commit to vstinner/cpython that referenced this issue Oct 31, 2023
…s -jN

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 31, 2023
…s -jN

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 31, 2023
…s -jN

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
vstinner added a commit to vstinner/cpython that referenced this issue Nov 1, 2023
…s -jN

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
vstinner added a commit that referenced this issue Nov 1, 2023
…111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 1, 2023
…s -jN (pythonGH-111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
(cherry picked from commit d9a5530)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 1, 2023
…s -jN (pythonGH-111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
(cherry picked from commit d9a5530)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this issue Nov 1, 2023
…ks -jN (GH-111577) (#111589)

gh-110367: Make regrtest --verbose3 compatible with --huntrleaks -jN (GH-111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
(cherry picked from commit d9a5530)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this issue Nov 1, 2023
…ks -jN (GH-111577) (#111590)

gh-110367: Make regrtest --verbose3 compatible with --huntrleaks -jN (GH-111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
(cherry picked from commit d9a5530)

Co-authored-by: Victor Stinner <vstinner@python.org>
FullteaR pushed a commit to FullteaR/cpython that referenced this issue Nov 3, 2023
…s -jN (python#111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…s -jN (python#111577)

"./python -m test -j1 -R 3:3 --verbose3" now works as expected, since
run_single_test() does not replace sys.stdout with StringIO in this
case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant