Skip to content

gh-109817: Do not copy all test cases into the worker process - #155713

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:regrtest-case-groups
Aug 13, 2026
Merged

gh-109817: Do not copy all test cases into the worker process#155713
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:regrtest-case-groups

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 13, 2026

Copy link
Copy Markdown
Member

With --single-process-per-case, tests and case_groups contain all test cases of the whole run. create_worker_runtests() copies them for every test case and serializes them as a single command line argument.

./python -m test --single-process-per-case test_asyncio failed with OSError: [Errno 7] Argument list too long. The copying is also slow and holds the GIL: with -j32, the number of test cases executed in 75 seconds increased from 1066 to 3214.

The worker runs the tests it is given, so it needs neither.

With --single-process-per-case, tests and case_groups contain all test
cases of the whole run.  Copying them for every test case was slow and
could produce a too long command line.  The worker needs neither.
@serhiy-storchaka serhiy-storchaka added skip news tests Tests in the Lib/test dir and removed skip news labels Aug 13, 2026
@serhiy-storchaka
serhiy-storchaka merged commit dd1194e into python:main Aug 13, 2026
63 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the regrtest-case-groups branch August 13, 2026 15:08
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.

1 participant