php / php/php-src

Test parallellization uses a stupid strategy

Open
#20,980 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Category: Tests Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

When running ./run-test.php with the -j argument, all the tests are scheduled to the workers before even running them. This means that if you have a worker which finishes all its tests quickly it'll sit idle even if there are many more other tests to run. One can observe this often because at the end of a test run the number of concurrent working test runners drops quickly.

PHP Version
8.4+
Operating System

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ./run-test.php and trace the -j option into the test scheduling and worker-dispatch logic. Confirm how tests are assigned before execution, then make the scheduling keep available workers supplied until no tests remain; verify that parallel runs no longer leave workers idle while work is pending.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.