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

258 Commits

Author SHA1 Message Date
Jakub Zelenka ee8f2c75e0 Merge branch 'PHP-8.0' into PHP-8.1 2022-09-30 17:08:17 +01:00
Andy Postnikov c58241a003 Make socket path shorter for ext/sockets/tests/socket_cmsg_{rights|credentials}.phpt
When running in CI it fails when path/address is longer 108
2022-09-30 17:07:40 +01:00
Joe Watkins 938a81cf01 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  socket cmsg credential test fixes, "backporting" from the FreeBSD PR.
2021-12-21 07:28:09 +01:00
David Carlier 80b02275bb socket cmsg credential test fixes, "backporting" from the FreeBSD PR. 2021-12-21 07:27:59 +01:00
Nikita Popov e91a751e3d Use ephemeral port in test 2021-10-05 16:00:50 +02:00
Nikita Popov 624848f118 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Use ephemeral ports in socket test
2021-09-20 10:20:03 +02:00
Nikita Popov 07f6c61c8e Use ephemeral ports in socket test 2021-09-20 10:19:48 +02:00
Nikita Popov e539cb9ca0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix port clash in socket tests
2021-08-12 12:02:37 +02:00
Nikita Popov 77c1c42c66 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix port clash in socket tests
2021-08-12 12:02:27 +02:00
Nikita Popov 78cbe56e68 Fix port clash in socket tests
Use ephemeral port instead.
2021-08-12 12:02:05 +02:00
Patrick Allaert ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Nikita Popov 892421c9a8 Make some zend_test dependencies explicit
Rather than checking that specific functions exist.
2021-06-14 15:40:34 +02:00
Nikita Popov 6600ad6067 Add some missing EXTENSIONS sections to misc tests 2021-06-14 14:52:44 +02:00
David CARLIER ff23a34757 define SO_ACCEPTFILTER separately where supported (#7146) 2021-06-14 07:24:55 +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 fc147ed8db sockets exposing TC_DEFER_ACCEPT to optimise tcp exchanges. 2021-06-09 06:54:02 +02:00
David Carlier 95a9e558b6 Pull #6989 FreeBSD defines SO_ACCEPTFILTER 2021-05-31 11:40:20 +02:00
Nikita Popov 7bc8f2c83f Skip unsupported socket option test on FreeBSD 2021-05-19 09:48:22 +02:00
Nikita Popov b9fbbcc867 Use different error condition in socket test
The previously used error does not occur on FreeBSD and instead
causes the operation to time out.

Also clean up the test a bit. And make sure it actually tests
something -- the point is that socket_last_error() should be 0
after socket_clear_error(). It's kind of pointless if the test
uses a wildcard for the final result instead.
2021-05-19 09:48:17 +02:00
Nikita Popov 79c9028ca6 Relax error message expectation in socket test 2021-05-18 19:34:34 +02:00
Nikita Popov 4baf340c39 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove getservbyname() variation tests
  Use SOL_TCP instead of getprotobyname() in tests
2021-05-07 14:56:13 +02:00
Nikita Popov 0413cf3c20 Use SOL_TCP instead of getprotobyname() in tests
This is more idiomatic anyway, and works on msan, which misses
interceptors for getprotobyname().
2021-05-07 14:55:18 +02:00
Nikita Popov 1f04f162a6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80723
2021-02-16 12:34:00 +01:00
Nikita Popov cb9785add1 Fixed bug #80723
This fixes the issue just for the Socket class. Presumably we'll
want to do the same for other "resource" objects.
2021-02-16 12:33:50 +01:00
Nikita Popov b10416a652 Deprecate passing null to non-nullable arg of internal function
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.

This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)

RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

Closes GH-6475.
2021-02-11 21:46:13 +01:00
Nikita Popov bc0f78a2da Use ephemeral port in socket_create_listen_used.phpt
Avoid parallelism issues.
2021-01-12 10:09:30 +01:00
Nikita Popov e77ac88a44 Use ephemeral ports in mcast_ipv*_recv.phpt 2020-11-30 09:49:39 +01:00
Christoph M. Becker a08a2b48b4 Strip trailing line breaks and periods from Windows error messages
PHP error messages should not contain line breaks, so we remove these
from the Windows specific error messages.  We also remove trailing
periods for the same reason.

Closes GH-6423.
2020-11-12 16:42:28 +01:00
Nikita Popov 800cf5a20f Fix double free when socket_accept fails 2020-11-11 12:48:25 +01:00
Nikita Popov 79484b4f8a Update ext/sockets parameter names
Also change $max_length to $length in a number of filesystem APIs,
where our usage was inconsistent.

Closes GH-6276.
2020-10-06 12:12:43 +02:00
George Peter Banyard 189751cbeb Promote notice to ValueError for invalid hint key 2020-09-28 16:24:04 +01:00
Máté Kocsis e950ca13ea Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
2020-09-20 19:41:47 +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 9975986b7e Improve error messages mentioning parameters instead of arguments
Closes GH-5999
2020-09-09 10:47:43 +02:00
Nikita Popov eb17f996fb Merge branch 'PHP-7.4'
* PHP-7.4:
  Avoid socket path clash in test
2020-08-26 12:12:23 +02:00
Nikita Popov 0487bcfac7 Avoid socket path clash in test 2020-08-26 12:11:22 +02:00
Nikita Popov dad25538f6 Don't check specific message in socket_shutdown.phpt 2020-08-10 15:58:54 +02:00
Nikita Popov e4f5190942 Only test one error in socket_strerror() test
The messages differ by used libc and version, so let's not try to
do exhaustive testing here.
2020-08-10 15:58:38 +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 af64001dcb Normalize error message capitalization 2020-08-05 16:44:06 +02:00
Nikita Popov 25d849d40b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:42:55 +02:00
Nikita Popov 3b86be23e6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:42:13 +02:00
Nikita Popov 6a1bd57df5 Fix memory leak on socket_sendmsg() / socket_recvmsg() error 2020-08-05 16:41:40 +02:00
Nikita Popov 002908a5c5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Unset ai_canonname field in dump
2020-08-05 14:59:06 +02:00
Nikita Popov b69a98cfb3 Unset ai_canonname field in dump
Okay, looks like ai_canonname does not get set on macos even if
AI_CANONNAME is specified, so canonicalize this in the other
direction instead and unset ai_canonname if it is present.
2020-08-05 14:58:56 +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 741daa8605 Set AI_CANONNAME flag in socket_addrinfo test
Musl always populates ai_canonname. Set the flag to avoid output
discrepancies.
2020-08-05 12:10:12 +02:00
Nikita Popov 58ab49111e Add ipv6 skipif to test
This was done for the -unix variant, but not the (formerly
windows-only?) main test.
2020-08-05 12:09:54 +02:00
Máté Kocsis ae34a6539f Fix Socket related tests on Windows 2020-08-04 09:25:41 +02:00
Máté Kocsis 77172c220a Convert resources to objects in ext/sockets
Closes GH-5900.
2020-08-03 23:26:38 +02:00