Cornelius Diekmann <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31158>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com