1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 00:22:52 +02:00
Commit Graph

112 Commits

Author SHA1 Message Date
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
jcm
663b037c7b QA - pcntl - adjust tests set/get priority check env vars and root user 2022-08-09 21:16:21 +01:00
jcm
520bb2ec6c Fix get/set priority - error handling for MacOS and extra tests
Closes GH-9044.
2022-07-27 13:53:42 +02:00
Juan Morales
7b301e3a5e QA - pcntl_signal - error when handler is int and not SIG_DFL or SIG_IGN
Closes GH-9001.
2022-07-14 13:13:59 +02:00
Juan Morales
492f9c607a QA - pcntl_exec - check stringable parameters error
Closes GH-8990.
2022-07-13 18:29:15 +02:00
Juan Morales
23654a172e QA - Test Cov - ext:pcntl - pcntl_signal() - max signal allowed (#8956)
Co-authored-by: jcm <juan.carlos.morales@tradebyte.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-07-11 13:45:42 +01:00
Dmitry Stogov
47435d679c Merge branch 'PHP-8.1'
* PHP-8.1:
  Partially fix handling of exceptions thrown in interrupt handlers
2021-11-11 21:02:35 +03:00
Dmitry Stogov
271cbe527c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Partially fix handling of exceptions thrown in interrupt handlers
2021-11-11 21:01:40 +03:00
Dmitry Stogov
fa0b84a06b Partially fix handling of exceptions thrown in interrupt handlers 2021-11-11 20:59:56 +03:00
Kamil Tekiela
c3dda473cc Fix 'can not' in test data and in code comments 2021-10-05 09:51:58 +01:00
Patrick Allaert
ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Nikita Popov
6600ad6067 Add some missing EXTENSIONS sections to misc tests 2021-06-14 14:52:44 +02:00
Nikita Popov
7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
David Carlier
007046fdd0 pcntl_rfork: following-up suggestions.
removing RFMEM constant.
treating beforehand the only case where rfork would return EINVAL.
2021-06-03 15:13:12 +02:00
David Carlier
28382aa1ec pcntl: Adding pcntl_rfork support. 2021-05-31 09:19:15 +02:00
David CARLIER
90b843beb6 Add FreeBSD to CI (#6974)
This is using Cirrus, as none of the CI providers we already use support FreeBSD.
2021-05-21 12:00:46 +02:00
Matteo Beccati
be1fbdbb78 Merge branch 'PHP-8.0'
* PHP-8.0:
  Increased test compatibility
2021-04-11 17:32:22 +02:00
Matteo Beccati
7f4784c1c9 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Increased test compatibility
2021-04-11 17:32:13 +02:00
Matteo Beccati
da3a807f22 Increased test compatibility
The test expects no masked signals at the beginning, but when run as part
of a Bamboo build, SIGQUIT is already masked and the test fails.
2021-04-11 17:19:58 +02:00
Nikita Popov
1b3b430f47 Add --repeat testing mode
This testing mode executes the test multiple times in the same
process (but in different requests). It is primarily intended to
catch tracing JIT bugs, but also catches state leaks across
requests.

Closes GH-6365.
2020-10-30 17:29:33 +01:00
Nikita Popov
7a1dc180a6 Update ext/pcntl parameter names
Closes GH-6278.
2020-10-06 12:45:57 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Máté Kocsis
3df306de94 Promote warnings to exceptions in ext/pcntl
Closes GH-6004
2020-08-25 13:02:13 +02:00
Nikita Popov
217d05b18e Check permissions in pcntl_unshare_03.phpt 2020-08-10 15:59:02 +02:00
Máté Kocsis
7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Nikita Popov
74b285d78c Merge branch 'PHP-7.4'
* PHP-7.4:
  Check ps -p availability in process title test
  Add privilege check in pcntl_unshare test
2020-08-05 18:18:51 +02:00
Nikita Popov
8fd79d3574 Add privilege check in pcntl_unshare test
Privileges for CLONE_NEWPID were not checked.
2020-08-05 18:18:06 +02:00
Nikita Popov
7575340427 Merge branch 'PHP-7.4'
* PHP-7.4:
  Check ps -p availability in proc_nice test
  Set AI_CANONNAME flag in socket_addrinfo test
  Add ipv6 skipif to test
  Improve privilege check in pcntl_setpriority() test
2020-08-05 12:12:24 +02:00
Nikita Popov
34e7d78df7 Improve privilege check in pcntl_setpriority() test
We need CAP_SYS_NICE privileges, which might not be available
just because we're running as root (Docker...)
2020-08-05 12:09:10 +02:00
Nikita Popov
fcfa0a46c3 Suppress warning in pcntl_unshare skipif 2020-08-05 10:39:45 +02:00
Nikita Popov
36a1197f12 Suppress warning in pcntl_unshare skipif 2020-08-05 09:46:07 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Alex Dowad
555489dd83 Honor script time limit when calling shutdown functions
A time limit can be set on PHP script execution via `set_time_limit` (or .ini file).
When the time limit is reached, the OS will notify PHP and `timed_out` and `vm_interrupt`
flags are set. While these flags are regularly checked when executing PHP code, once the
end of the script is reached, they are not checked while invoking shutdown functions
(registered via `register_shutdown_function`).

Of course, if the shutdown functions are implemented *in* PHP, then the interrupt flag
will be checked while the VM is running PHP bytecode and the timeout will take effect.
But if the shutdown functions are built-in (implemented in C), it will not.

Since the shutdown functions are invoked through `zend_call_function`, add a check of the
`vm_interrupt` flag there. Then, the script time limit will be respected when *entering*
each shutdown function. The fact still remains that if a shutdown function is built-in and
runs for a long time, script execution will not time out until it finishes and the
interpreter tries to invoke the next one.

Still, the behavior of scripts with execution time limits will be more consistent after
this patch. To make the execution time-out feature work even more precisely, it would
be necessary to scrutinize all the built-in functions and add checks of the `vm_interrupt`
flag in any which can run for a long time. That might not be worth the effort, though.

It should be mentioned that this patch does not solely affect shutdown functions, neither
does it solely allow for interruption of running code due to script execution timeout.
Anything else which causes `vm_interrupt` to be set, such as the PHP interpreter receiving
a signal, will take effect when exiting from an internal function. And not just internal
functions which are called because they were registered to run at shutdown; there are
other cases where a series of internal functions might run in the midst of a script. In
all such cases, it will be possible to interrupt the interpreter now.

Closes GH-5543.
2020-05-13 12:47:12 +02:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
0b4778c377 Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Nikita Popov
d011f60eb1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78402: pcntl_signal() misleading error message
2019-12-20 11:03:15 +01:00
Nikita Popov
5155097431 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78402: pcntl_signal() misleading error message
2019-12-20 11:02:57 +01:00
SATO Kentaro
cbb0efaeeb Fix #78402: pcntl_signal() misleading error message
An error message can be misleading when a handler
passed to pcntl_signal() is not callable.
2019-12-20 11:02:20 +01:00
Nikita Popov
45deb01cc2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip large ftruncate test if large files not supported
  Don't test "blocks" in lstat_stat_variation7.phpt
  Increase FD used in php://fd test
  Use posix_getuid() to check for root in pcntl_setpriority() test
2019-10-24 14:47:15 +02:00
Nikita Popov
a3469146d4 Use posix_getuid() to check for root in pcntl_setpriority() test
Using SUDO_USER doesn't seem to work on Travis ARM CI -- I guess
that sudo might be in use without the target being root.
2019-10-24 14:46:25 +02:00
Nikita Popov
93f41d2aec Merge branch 'PHP-7.4' 2019-07-03 11:03:41 +02:00
Nikita Popov
aff0b77d15 Skip pcntl_sigwaitinfo() test under asan/msan
This test often fails under asan/msan with a timeout for unknown
reasons.
2019-07-03 11:03:27 +02:00
Nikita Popov
b98c148f78 Merge branch 'PHP-7.4' 2019-06-28 15:05:00 +02:00
Nikita Popov
54dd762f59 Set up asan+ubsan scheduled build on azure
Also adds an --asan flag to run-tests.php to setup all the necessary
environment variables. Some tests are marked as skipped because they
are incompatible with asan or too slow.

I'm basing this on the DEBUG_ZTS build, which seems to give us the
most mileage.
2019-06-28 15:00:54 +02:00
Joe Watkins
d7f3ef3396 Merge branch 'PHP-7.4'
* PHP-7.4:
  disable this test temporarily
2019-06-14 14:22:41 +02:00
Joe Watkins
8f4e24eeef disable this test temporarily 2019-06-14 14:22:25 +02:00
Joe Watkins
956db0cdc2 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix mac tests on azure
2019-06-14 12:58:13 +02:00
Joe Watkins
f16b012116 fix mac tests on azure 2019-06-14 12:55:00 +02:00