-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-119273: Don't run test_ioctl in a process group #119275
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
|
||
|
||
USE_PROCESS_GROUP = (hasattr(os, "setsid") and hasattr(os, "killpg")) | ||
NEED_TTY = set(''' | ||
test_ioctl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a couple of other tests that skip some of the test methods/classes when stdout is not a tty: test_builtin, test_curses, test_os, test_shutil at least, from a quick grep. I'm not sure it's going to be maintainable to keep a list like this up to date... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One option would be to move "tty" tests in separated test files and disable setsid() if the test name contains |
||
'''.split()) | ||
|
||
|
||
def create_worker_process(runtests: WorkerRunTests, output_fd: int, | ||
|
@@ -47,7 +50,10 @@ def create_worker_process(runtests: WorkerRunTests, output_fd: int, | |
close_fds=True, | ||
cwd=work_dir, | ||
) | ||
if USE_PROCESS_GROUP: | ||
|
||
# Don't use setsid() in tests using TTY | ||
test_name = runtests.tests[0] | ||
if USE_PROCESS_GROUP and test_name not in NEED_TTY: | ||
kwargs['start_new_session'] = True | ||
|
||
# Pass json_file to the worker process | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Python test runner no longer runs tests using TTY (ex: test_ioctl) in a | ||
process group (using ``setsid()``). Previously, tests using TTY were | ||
skipped. Patch by Victor Stinner. |
Uh oh!
There was an error while loading. Please reload this page.