Skip to content

gh-83994, gh-132843: Fix and improve test_ioctl#132848

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:test-ioctl3
Apr 23, 2025
Merged

gh-83994, gh-132843: Fix and improve test_ioctl#132848
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:test-ioctl3

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member
  • 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
@miss-islington-app

Copy link
Copy Markdown

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
Copy Markdown

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

bedevere-app Bot commented Apr 23, 2025

Copy link
Copy Markdown

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

vstinner commented Apr 24, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

Should be fixed in #132878.

@serhiy-storchaka serhiy-storchaka removed their assignment Jul 15, 2026
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