run-tests.php: Add a flag similar to --asan that skips tests when run under Valgrind
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
I just ran 11k tests under Valgrind to try and find issues with one of my big PRs, and any test excepting an OOM failure will either time out or use all the memory before being killed.
It would be great if those could be skipped and not accidentally triggered.
Some relevant tests:
ext/standard/tests/gh14643_longname.phptZend/tests/bug79836_4.phpttests/basic/bug67198.phpt(maybe)tests/basic/enable_post_data_reading_05.phpt(maybe)
Other tests are those opening PHP procs and timing out:
ext/standard/tests/file/proc_open01.phptext/standard/tests/http/gh11274.phptext/standard/tests/streams/bug64433.phptext/standard/tests/url/get_headers_error_003.phpt
And some tests seem to be bogus with Valgrind or an issue that we cannot fix:
ext/standard/tests/mail/mail_basic2.phptext/standard/tests/mail/mail_variation2.phpt
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in run-tests.php by reading how the existing --asan flag is parsed and applied. Run the listed .phpt tests under Valgrind to confirm the problematic cases, then verify that the new Valgrind-related flag skips the intended tests without affecting normal test runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100