Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_spawn_doesnt_hang (test.test_pty.PtyTest) fails when stdin isn't readable #89386

Open
kanavin mannequin opened this issue Sep 16, 2021 · 1 comment
Open

test_spawn_doesnt_hang (test.test_pty.PtyTest) fails when stdin isn't readable #89386

kanavin mannequin opened this issue Sep 16, 2021 · 1 comment
Labels
tests Tests in the Lib/test dir

Comments

@kanavin
Copy link
Mannequin

kanavin mannequin commented Sep 16, 2021

BPO 45223
Nosy @kanavin
PRs
  • bpo-45223: Lib/pty.py: handle stdin I/O errors same way as master I/O errors #28388
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-09-16.15:38:35.345>
    labels = []
    title = "test_spawn_doesnt_hang (test.test_pty.PtyTest) fails when stdin isn't readable"
    updated_at = <Date 2021-09-16.15:39:19.258>
    user = 'https://github.com/kanavin'

    bugs.python.org fields:

    activity = <Date 2021-09-16.15:39:19.258>
    actor = 'python-dev'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2021-09-16.15:38:35.345>
    creator = 'Alexander Kanavin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45223
    keywords = ['patch']
    message_count = 1.0
    messages = ['401961']
    nosy_count = 2.0
    nosy_names = ['python-dev', 'Alexander Kanavin']
    pr_nums = ['28388']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45223'
    versions = []

    @kanavin
    Copy link
    Mannequin Author

    kanavin mannequin commented Sep 16, 2021

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @iritkatriel iritkatriel added the tests Tests in the Lib/test dir label Nov 27, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant