Message303259
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. |
|
Date |
User |
Action |
Args |
2017-09-28 16:02:16 | Cornelius Diekmann | set | recipients:
+ Cornelius Diekmann, vstinner, xdegaye, martin.panter, cstratak |
2017-09-28 16:02:16 | Cornelius Diekmann | set | messageid: <1506614536.66.0.466225441844.issue31158@psf.upfronthosting.co.za> |
2017-09-28 16:02:16 | Cornelius Diekmann | link | issue31158 messages |
2017-09-28 16:02:16 | Cornelius Diekmann | create | |
|