This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Cornelius Diekmann
Recipients Cornelius Diekmann, cstratak, martin.panter, vstinner, xdegaye
Date 2017-09-28.16:02:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506614536.66.0.466225441844.issue31158@psf.upfronthosting.co.za>
In-reply-to
Content
Oh, one more thing, since it is unclear whether read or write is causing the error. I replaced
os.write(slave_fd, TEST_STRING_1)
by
pty._writen(slave_fd, TEST_STRING_1)
which makes sure all bytes are written.
After some time, when the load gets high and the machine gets noisy, I get the same error:

0:01:09 load avg: 6.17 [597/1] test_pty failed
test test_pty failed -- Traceback (most recent call last):
  File "XXX/cpython/Lib/test/test_pty.py", line 99, in test_basic
    normalize_output(s1))
AssertionError: b'I wish to buy a fish license.\n' != b'I wish to buy a fish license.'

So the main problem is a nondeterministic read. But I'm only testing on Linux. Other systems with different kernel may behave differently. And the documentation allows a kernel to make both short reads and writes.
History
Date User Action Args
2017-09-28 16:02:16Cornelius Diekmannsetrecipients: + Cornelius Diekmann, vstinner, xdegaye, martin.panter, cstratak
2017-09-28 16:02:16Cornelius Diekmannsetmessageid: <1506614536.66.0.466225441844.issue31158@psf.upfronthosting.co.za>
2017-09-28 16:02:16Cornelius Diekmannlinkissue31158 messages
2017-09-28 16:02:16Cornelius Diekmanncreate