- Replace bailout on OOM with UnwindExit
- Properly reset various globals that may be accessed during startup
Fix GHSA-w8hw-w9fx-j79w (CVE-2026-109618)
Fix GHSA-6wmf-4rv5-p3rp (CVE-2026-109619)
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: Jakub Zelenka <bukka@php.net>
Co-authored-by: Nora Dossche <7771979+ndossche@users.noreply.github.com>
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
Runs the test suite in parallel by default; automatically selects up to 10 workers. Explicit -j1 remains the opt-out to run tests serial. Smaller batches improve balancing.
Prevents unavailable optional test services from slowing the suite through repeated connection timeouts. PDO and SNMP availability probes cache the first failure for the duration of one test run, so later SKIPIF checks return immediately.
Only failures are cached; successful probes and test connections are unchanged. PDOs one second timeout applies only to the default availability probe. The caches are private, run-scoped and removed afterwards. A service becoming available mid run is detected on the next test-suite run.
* run-tests: Add `strace` sub command for generated test reproduction scripts
Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
* run-tests: Pass all provided arguments to `valgrind`
* run-tests: Pass all provided arguments to `gdb`
* run-tests: Pass all provided arguments to `lldb`
* run-tests: `exec` into test reproduction helpers
This avoids needlessly carrying around the shell and provides more direct
access to the running executable.
---------
Co-authored-by: Derick Rethans <github@derickrethans.nl>
* Fix run-tests.php --file-cache-prime with multiple workers
We want to remove the directory only before running tests, rather than for every
test. That causes races, but also defeats the purpose of priming the cache.
* Move opcache.opt_debug_level tests
These need to live in ext/opcache/tests to be skipped by run-tests.php for the
--file-cache-use tests, which won't compile the files and thus won't dump the
output.
* Mark preloading test as opcache.file_cache_only=0
Preloading requires shm.
`run-tests.php --file-cache-prime` sets opcache.file_cache to /tmp which makes it difficult to clear the cache.
Set opcache.file_cache to /tmp/php-run-tests-file-cache, and clear the directory when --file-cache-prime is specified.
Instead of hardcoding the file extensions for shared PHP extensions
(which in most cases are '.so', or '.dll'), this uses file extension for
the current PHP build as it was defined during the configure/build
phase. There can be systems where some other file extension is used for
shared modules.
- Remove unnedded putenv('NO_INTERACTION=1') when executing individual tests.
- Fix undefined variable errors when executing individual tests.
- Fix -s when NO_INTERACTION=1 is set, given we don't need to prompt anyway.
Fixes GH-20961
Closes GH-20970
When a test has an --STDIN-- or --PHPDBG-- section, save the section's content into a file, like we do for the other sections.
This makes it bit easier to reproduce these tests outside of run-tests.php.
This doesn't update the .sh file to pass the file as stdin to the program, yet.
When using gdb, we can pass the file as stdin like this:
gdb --args php
(gdb) r test.php < test.stdin
Even when tests are not run in parallel, shuffling can help discover tests that
unintentionally depend on other tests being run before them.
Closes GH-17149.
We don't show succeeding tests in the summary, and for all intents and purposes,
these tests have succeeded, in that they behave as expected. I've seen the
output confuse people on multiple occasions, for example GH-17105.
Closes GH-17109