Skip to content

test_ioctl skipped -- Unable to open /dev/tty #83994

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

Closed
Marco-Sulla mannequin opened this issue Mar 1, 2020 · 4 comments · Fixed by #132848
Closed

test_ioctl skipped -- Unable to open /dev/tty #83994

Marco-Sulla mannequin opened this issue Mar 1, 2020 · 4 comments · Fixed by #132848
Labels
3.9 only security fixes build The build process and cross-build tests Tests in the Lib/test dir

Comments

@Marco-Sulla
Copy link
Mannequin

Marco-Sulla mannequin commented Mar 1, 2020

BPO 39813
Nosy @ericvsmith, @Marco-Sulla

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 2020-03-01.14:29:15.207>
labels = ['build', 'tests', '3.9']
title = 'test_ioctl skipped -- Unable to open /dev/tty'
updated_at = <Date 2020-03-01.19:26:27.067>
user = 'https://github.com/Marco-Sulla'

bugs.python.org fields:

activity = <Date 2020-03-01.19:26:27.067>
actor = 'Marco Sulla'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Tests']
creation = <Date 2020-03-01.14:29:15.207>
creator = 'Marco Sulla'
dependencies = []
files = []
hgrepos = []
issue_num = 39813
keywords = []
message_count = 3.0
messages = ['363063', '363070', '363081']
nosy_count = 2.0
nosy_names = ['eric.smith', 'Marco Sulla']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue39813'
versions = ['Python 3.9']

Linked PRs

@Marco-Sulla
Copy link
Mannequin Author

Marco-Sulla mannequin commented Mar 1, 2020

During make test, I get the error in the title.

(venv_3_9) marco@buzz:~/sources/cpython_test$ ll /dev/tty
crw-rw-rw- 1 root tty 5, 0 Mar 1 15:24 /dev/tty

@Marco-Sulla Marco-Sulla mannequin added 3.9 only security fixes tests Tests in the Lib/test dir build The build process and cross-build labels Mar 1, 2020
@ericvsmith
Copy link
Member

Can you give us some information about your operating system? Did you build this version of python yourself? Assuming so, how did you build it? Please show us the header you see when starting this version of python. How are you invoking this test?

@Marco-Sulla
Copy link
Mannequin Author

Marco-Sulla mannequin commented Mar 1, 2020

OS: Lubuntu 18.04.4

Steps to reproduce:

sudo apt-get install git libbz2-dev liblzma-dev uuid-dev libffi-dev libsqlite3-dev libreadline-dev libssl-dev libgdbm-dev libgdbm-compat-dev tk-dev libncurses5-dev
git clone https://github.com/python/cpython.git
cd cpython
CC=gcc-9 CXX=g++-9 ./configure --enable-optimizations --with-lto
make -j 4
make test

marco@buzz:~/sources/cpython_test$ python3.9
Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01)
[GCC 9.2.1 20190909] on linux

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue 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.
@serhiy-storchaka serhiy-storchaka linked a pull request Apr 23, 2025 that will close this issue
@serhiy-storchaka
Copy link
Member

You can reproduce this on Linux by running tests with setsid.

It seems that the tests were always skipped on CI and buildbots because /dev/tty was not available or not attached to the process. But one test (test_ioctl_set_window_size) did not depend on this and could be run. #132848 makes only tests that depend on /dev/tty be skipped.

serhiy-storchaka added a commit that referenced this issue 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.
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue 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>
serhiy-storchaka added a commit that referenced this issue 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.9 only security fixes build The build process and cross-build tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants