mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-119273: Don't run test_ioctl in a process group (#119275)
Python test runner no longer runs tests using TTY (ex: test_ioctl) in a process group (using setsid()). Previously, tests using TTY were skipped.
This commit is contained in:
parent
055c739536
commit
1f481fd327
3 changed files with 18 additions and 3 deletions
|
@ -14,6 +14,9 @@ from .utils import (
|
|||
|
||||
|
||||
USE_PROCESS_GROUP = (hasattr(os, "setsid") and hasattr(os, "killpg"))
|
||||
NEED_TTY = set('''
|
||||
test_ioctl
|
||||
'''.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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue