Skip to content

gh-139207: Pass regrtest worker configuration through a file - #159856

Open
limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-139207-worker-config-file
Open

limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-139207-worker-config-file

Conversation

@limadog9

@limadog9 limadog9 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Pass the regrtest worker configuration in a temporary file so a large --matchfile does not exceed the operating system's command-line size limit.

Keep the file for the worker's lifetime using the existing cleanup stack, close it before launching the worker so Windows can reopen it, and keep standard input available to tests. Add a regression that selects one test using a match file larger than Linux's per-argument limit.

For custom runners, create the configuration in the parent's test directory and pass its path relative to libregrtest. The worker resolves it against its own module location, allowing WASI runners to map the source tree to a different filesystem root.

Fixes #139207.

Validation:

  • The new regression reproduces OSError: [Errno 7] Argument list too long before the fix.
  • Full regrtest suite on a CPython debug build: 140 tests, 3 skipped.
  • A custom runner using a separate source path and working directory successfully loads its configuration and runs a test.
  • Mypy 2.3.1 under Python 3.15: no issues in 21 source files.
  • Ruff, NEWS lint, and patchcheck.

@picnixz

picnixz commented Oct 20, 2026

Copy link
Copy Markdown
Member

@limadog9 Please slow down on the number of PRs being opened especially since they are entirely automated AFAICT. We do not have enough bandwidth for reviewing all PRs and they will unfortunately sit down for a while.

@limadog9
limadog9 force-pushed the gh-139207-worker-config-file branch from 7d1ae8f to de195f9 Compare October 20, 2026 04:01
@aisk

aisk commented Oct 20, 2026

Copy link
Copy Markdown
Member

And if they are LLM generated, please make sure you've actually reviewed and understood these changes yourself, and that you're taking responsibility for them, as required by our AI guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

matchfile Worker bug argument list too long when using matchfile to run many tests

3 participants