1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Commit Graph

811 Commits

Author SHA1 Message Date
Ilija Tovilo
fc88f155be Add zend_alloc XLEAK support
In the future we may want to use a different exit code to warn for tests that
didn't leak.

Closes GH-10999
2023-04-03 12:55:26 +02:00
Ilija Tovilo
50f58c8923 Add ASAN XLEAK support
Only disable LSAN instead of skipping the test. This way we can still detect
memory issues which is arguably more important anyway.

Closes GH-10996
2023-04-03 08:02:19 +02:00
Ilija Tovilo
ed0b773cb9 [skip ci] Avoid infinite loop in differ
TBH I don't understand why this can happen here but not in sebastian/diff. I'll
have to take a closer look.
2023-04-01 15:44:46 +02:00
Ilija Tovilo
b9f8b696c4 Fix one more differ direct comparison (through in_array) 2023-03-27 17:39:52 +02:00
Ilija Tovilo
c58c2666a1 Fix direct comparison in run-tests.php differ 2023-03-23 16:07:59 +01:00
Ilija Tovilo
d854492655 [skip ci] Fix var_dump statement in run-tests.php 2023-03-23 11:23:17 +01:00
Ilija Tovilo
ac961bbb1d Implement better diff for run-tests.php
Borrow sebastianbergmann/diff with
MemoryEfficientLongestCommonSubsequenceCalculator

Fixes GH-10806
Closes GH-10875
2023-03-22 20:02:41 +01:00
Ilija Tovilo
5ef46020b6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Another attempt to fix MSAN nightly on master
2023-03-15 23:38:22 +01:00
Ilija Tovilo
6343975f34 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Another attempt to fix MSAN nightly on master
2023-03-15 23:38:09 +01:00
Ilija Tovilo
471105abd7 Another attempt to fix MSAN nightly on master 2023-03-15 23:37:36 +01:00
Ilija Tovilo
a5da519d59 Merge branch 'PHP-8.2'
* PHP-8.2:
  use_tls=0 on MSAN
2023-03-14 17:43:12 +01:00
Ilija Tovilo
ca7c7e9c05 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  use_tls=0 on MSAN
2023-03-14 17:43:02 +01:00
Ilija Tovilo
63525ee600 use_tls=0 on MSAN
Attempt to fix MSAN failure in CI

Closes GH-10851
2023-03-14 17:42:23 +01:00
Ilija Tovilo
c0ee8e833c Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] Fix diff cmd env name in run-tests.php
2023-03-10 01:10:55 +01:00
Ilija Tovilo
d3c9585204 [skip ci] Fix diff cmd env name in run-tests.php 2023-03-10 01:10:25 +01:00
Ilija Tovilo
486fb80947 [skip ci] Remove accidental run-tests.php line 2023-03-06 15:05:11 +01:00
Ilija Tovilo
9944f58d3f Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10709: UAF in recursive AST evaluation
2023-03-06 15:03:19 +01:00
Danack
3e6d49e042 Fix warning in run-tests when PHP compiled without generating phpdbg support. (#10745) 2023-03-03 01:50:02 +00:00
Niels Dossche
dcc3255b18 Fix GH-10489: run-tests.php does not escape path when building cmd (#10560)
Multiple tests had to be changed to escape the arguments in shell
commands. Some tests are skipped because they behave differently with
spaces in the path versus without. One notable example of this is the
hashbang test which does not work because spaces in hashbangs paths are
not supported in Linux.

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2023-02-25 14:02:06 +00:00
Arnaud Le Blanc
9788244a42 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix run-tests.php hanging when a worker process dies without notice (#9931)
2023-01-13 18:07:58 +01:00
Arnaud Le Blanc
61048f984a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix run-tests.php hanging when a worker process dies without notice (#9931)
2023-01-13 18:07:45 +01:00
Arnaud Le Blanc
8c0698f66b Fix run-tests.php hanging when a worker process dies without notice (#9931)
run-tests.php with `-jN` can hang if a parallel worker dies without notice. This
can happen due to fatal errors in the worker, or if the worker is killed.

- run-tests.php (main process)
  \_ run-tests.php (worker #0) // main process hangs if this one crashes
     \_ test-001.php (test-001.phpt)
2023-01-13 17:43:17 +01:00
Ilija Tovilo
86af42be1b Merge branch 'PHP-8.2'
* PHP-8.2:
  Migrate i386 to GitHub actions
2022-11-03 14:40:35 +01:00
Ilija Tovilo
b08901b63f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Migrate i386 to GitHub actions
2022-11-03 14:37:59 +01:00
Ilija Tovilo
ed1e703716 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Migrate i386 to GitHub actions
2022-11-03 14:37:17 +01:00
Ilija Tovilo
75970077b0 Migrate i386 to GitHub actions
Closes GH-9856
2022-11-03 14:34:54 +01:00
Tyson Andre
d498908ec4 Make run-tests.php check for tcp fwrite edge cases (#9242)
When the recipient is busy or the payload is large, fwrite can block
or return a value smaller than the length of the stream.

workers in run-tests.php communicates over tcp sockets with the manager.

https://cirrus-ci.com/task/5315675320221696?logs=tests#L130
showed notices for fwrite/unserialize

This is a similar approach to the approach used in
https://github.com/phan/phan/blob/v5/src/Phan/LanguageServer/ProtocolStreamWriter.php
for the tcp language server writing.
2022-10-07 20:02:22 -04:00
Arnaud Le Blanc
722ed598d5 Do not require opcache.preload_user in cli SAPIs 2022-10-07 15:48:05 +02:00
Christoph M. Becker
4ed01e3296 Fix run-tests.php for explicitly given test cases
The recent improvement to list skipped extensions explicitly[1] missed
to properly initialize `$ignored_by_ext` for the case where an explicit
set of test cases are given; this was not a problem previously, since
the undefined *global* variable was coerced to int.  We fix this by
initializing the variable earlier.

[1] <baef47ef3e>

Closes GH-9617.
2022-09-27 15:13:13 +02:00
Michael Voříšek
baef47ef3e List skipped extensions explicitly
We also fix the summary alignment for 10k+ tests.

Closes GH-8363.
2022-09-26 11:15:33 +02:00
Derick Rethans
d7d6794f94 Use external diff tool if TEST_PHP_DIFF_CMD env var is set 2022-09-19 14:43:16 +01:00
Ilija Tovilo
c809a213f2 Fix run-tests.php --no-progress flag for non-parallel testing 2022-08-12 12:51:13 +02:00
Ilija Tovilo
0028c242f0 Add --[no-]progress option to run-tests.php (#9255)
Previously, adding the -g argument would disable progress, even locally.
Now it needs to be disabled explicitly.
2022-08-11 20:58:15 +02:00
Ilija Tovilo
53e7141515 Hide skipped tests in CI (#9163) 2022-07-31 20:47:15 +02:00
Bob Weinand
1c9a49e3f1 Add opcache.preload_user=root to run-tests.php if root
This prevents breaking the testsuite when running it as root.
2022-07-30 15:57:08 +00:00
George Peter Banyard
0490f082e9 [run-tests.php] echo call performance optimization 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
3483a1f170 [run-tests.php] Combine multiple str_replace calls to a single strtr call
Makes the replacement easier to see, neatly aligned, and only takes one function call.
This is safe because none of the combined replacement values contain tokens that would be recursively replaced.

This also improves the readability on how the regular expressions in `EXPECTF` matcher is constructed.

Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
c83a10d8db [run-tests.php] Replace backtick operator string literals with shell_exec() calls
The rationale is that `shell_exec()` is identical to the backtick operator (both of which are disabled when `shell_exec` function is disabled) makes it very clear that it is a shell execution, and eases security audits too.
2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
f958701dad [run-tests.php] Merge multiple unset() calls to a single call 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
056afc8daf [run-tests.php] Minor optimizations in if blocks by placing simple expressions first 2022-07-22 11:53:46 +01:00
Ayesh Karunaratne
51447fb47d [run-tests.php] Improve non-optimal nested if/elseif/else blocks with happy path optimizations
Simplifies and improves the readability of multiple `if`/`elseif`/`else` blocks by removing them when an earlier branch exists the execution flow by either returning or terminating the script.
2022-07-22 11:53:46 +01:00
Christoph M. Becker
de6d708f63 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix --CGI-- support of run-tests.php
2022-07-20 14:42:42 +02:00
Christoph M. Becker
d430652935 Fix --CGI-- support of run-tests.php
The `--CGI--` section is supposed to be just a marker, and to be empty
as such.  However, a previous refactoring[1] broke that.

[1] <9140c9038a>

Closes GH-9061.
2022-07-20 14:41:28 +02:00
Michael Voříšek
6cd5bd1bcd Fix "%f" regex in run-tests.php (#8965)
"-.0.0" and "0." is no longer matched wrongly
2022-07-10 15:33:10 +02:00
George Peter Banyard
306f8d282d Merge branch 'PHP-8.1' 2022-06-08 11:38:16 +01:00
George Peter Banyard
c05c96b3fe Fix GH-8691 Add required extensions for redirected tests 2022-06-08 11:37:07 +01:00
Rowan Tommins
ed6dab2040 Avoid accessing undefined variables in run-tests.php (#8669)
The $php_cgi and $phpdbg cases here are definitely real bugs, and
caused the script to bail out under certain ini settings.

The other paths may actually be unreachable in practice, but were
highlighted by PhpStorm.
2022-06-08 00:00:03 +01:00
George Peter Banyard
8e00e8209b [ci skip] Drop ability to send QA reports by email (#8657)
This fails regularly and on top of that we don't look at these reports.
2022-06-06 20:48:38 +01:00
Ilija Tovilo
9a90bd7054 Deprecate ${} string interpolation
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Remi Collet
a6d88d3b26 Merge branch 'PHP-8.1'
* PHP-8.1:
  typo
2022-03-29 10:20:53 +02:00