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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add write_all() helper function to test_pty to raise an exception on short write: if os.writes() does not write all bytes. It should not happen for a PTY. Let's check if this assumption is correct.
The reason will be displayed to describe this comment to others. Learn more.
Oh. My first implementation (before I created this PR) actually implemented write_all(): retry os.write() until all bytes are written. But I was told that it must not happend, so I changed my PR to raise an exception instead.
I will remove the loop until buildbots complete, before merging this change.
At least, with this change, if the test hangs again, we will know for sure that no short write occurred.
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
(cherry picked from commit b4e8049)
Co-authored-by: Victor Stinner <vstinner@python.org>
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
(cherry picked from commit b4e8049)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-110673: test_pty raises on short write (GH-110677)
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
(cherry picked from commit b4e8049)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-110673: test_pty raises on short write (GH-110677)
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
(cherry picked from commit b4e8049)
Co-authored-by: Victor Stinner <vstinner@python.org>
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this pull request
Sep 2, 2024
Add write_all() helper function to test_pty to raise an exception on
short write: if os.writes() does not write all bytes. It should not
happen for a PTY.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add write_all() helper function to test_pty to raise an exception on short write: if os.writes() does not write all bytes. It should not happen for a PTY. Let's check if this assumption is correct.