Skip to content

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Apr 23, 2025

  • Skip test_ioctl_tcflush if termios.TCFLSH is not available.
  • Do not skip ALL ioctl() tests when /dev/tty is not available.

* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.
@serhiy-storchaka serhiy-storchaka merged commit 4b4b9fb into python:main Apr 23, 2025
38 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the test-ioctl3 branch April 23, 2025 18:46
@miss-islington-app
Copy link

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 4b4b9fbb06198f65424ed5be06c59f8b2801b99b 3.13

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 23, 2025
…ythonGH-132848)

* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.
(cherry picked from commit 4b4b9fb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Apr 23, 2025

GH-132850 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 23, 2025
serhiy-storchaka added a commit that referenced this pull request Apr 23, 2025
…H-132850)

* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.
(cherry picked from commit 4b4b9fb)
@vstinner
Copy link
Member

vstinner commented Apr 24, 2025

There are errors on Android on Python 3.13:

cc @serhiy-storchaka

ERROR: test_ioctl_signed_unsigned_code_param (test.test_ioctl.IoctlTestsPty.test_ioctl_signed_unsigned_code_param)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_ioctl.py", line 142, in setUp
    self.master_fd, self.slave_fd = pty.openpty()
                                    ~~~~~~~~~~~^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/pty.py", line 34, in openpty
    master_fd, slave_name = _open_terminal()
                            ~~~~~~~~~~~~~~^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/pty.py", line 67, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices
======================================================================
ERROR: test_ioctl_tcflush (test.test_ioctl.IoctlTestsPty.test_ioctl_tcflush)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_ioctl.py", line 142, in setUp
    self.master_fd, self.slave_fd = pty.openpty()
                                    ~~~~~~~~~~~^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/pty.py", line 34, in openpty
    master_fd, slave_name = _open_terminal()
                            ~~~~~~~~~~~~~~^^
  File "/data/user/0/org.python.testbed/files/python/lib/python3.13/pty.py", line 67, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices

@serhiy-storchaka
Copy link
Member Author

Should be fixed in #132878.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_ioctl failing on MacOS test_ioctl skipped -- Unable to open /dev/tty
2 participants