[issue45223] test_spawn_doesnt_hang (test.test_pty.PtyTest) fails when stdin isn't readable

Alexander Kanavin report at bugs.python.org
Thu Sep 16 11:38:35 EDT 2021


New submission from Alexander Kanavin <alex.kanavin at gmail.com>:

I am observing the following under yocto's test harness:
    ======================================================================
    ERROR: test_spawn_doesnt_hang (test.test_pty.PtyTest)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/lib/python3.10/test/test_pty.py", line 316, in test_spawn_doesnt_hang
        pty.spawn([sys.executable, '-c', 'print("hi there")'])
      File "/usr/lib/python3.10/pty.py", line 181, in spawn
        _copy(master_fd, master_read, stdin_read)
      File "/usr/lib/python3.10/pty.py", line 157, in _copy
        data = stdin_read(STDIN_FILENO)
      File "/usr/lib/python3.10/pty.py", line 132, in _read
        return os.read(fd, 1024)
    OSError: [Errno 5] Input/output error


The same tests runs fine in a regular console.

----------
messages: 401961
nosy: Alexander Kanavin
priority: normal
severity: normal
status: open
title: test_spawn_doesnt_hang (test.test_pty.PtyTest) fails when stdin isn't readable

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45223>
_______________________________________


More information about the Python-bugs-list mailing list