Skip to content

sapi/cli/tests/php_cli_server_ipv6_error_message.phpt: ignore warning#22015

Open
orlitzky wants to merge 1 commit into
php:PHP-8.4from
orlitzky:ipv6-test-can-print-a-warning
Open

sapi/cli/tests/php_cli_server_ipv6_error_message.phpt: ignore warning#22015
orlitzky wants to merge 1 commit into
php:PHP-8.4from
orlitzky:ipv6-test-can-print-a-warning

Conversation

@orlitzky
Copy link
Copy Markdown
Contributor

This test is checking for brackets around an ipv6 address. On some systems, a PHP warning is emitted before printing the expected output; for example,

[Fri May 8 17:24:55 2026] PHP Warning: Unknown: php_network_getaddresses: getaddrinfo for 2001:db8:: failed: Address family for hostname not supported in Unknown on line 0
[Fri May 8 17:24:55 2026] Failed to listen on [2001:db8::]:8080 (reason: php_network_getaddresses: getaddrinfo for 2001:db8:: failed: Address family for hostname not supported)

Only the second of these is expected by the test, causing it to fail on those systems. The warning does not seem harmful however, so with a small tweak to the expected output, we can ignore everything up to the bracketed ipv6 address. This is ultimately the purpose of the test, to ensure that the address prints with brackets.

CC: @alexandre-daubois

…ions

This test is checking for brackets around an ipv6 address. On some
systems, a PHP warning is emitted before printing the expected output;
for example,

  [Fri May 8 17:24:55 2026] PHP Warning: Unknown:
  php_network_getaddresses: getaddrinfo for 2001:db8:: failed: Address
  family for hostname not supported in Unknown on line 0
  [Fri May 8 17:24:55 2026] Failed to listen on [2001:db8::]:8080
  (reason: php_network_getaddresses: getaddrinfo for 2001:db8::
  failed: Address family for hostname not supported)

Only the second of these is expected by the test, causing it to fail
on those systems. The warning does not seem harmful however, so with a
small tweak to the expected output, we can ignore everything up to the
bracketed ipv6 address. This is ultimately the purpose of the test,
to ensure that the address prints with brackets.
@orlitzky
Copy link
Copy Markdown
Contributor Author

I'm not quite sure where the warning comes from. It isn't due to a lack of ipv6, and it only happens as part of our package test suite where internet access blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant