[php-src] master: Merge branch 'PHP-8.6'
| From: | Weilin Du | Date: | Mon, 28 Sep 2026 16:32:07 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-141633@lists.php.net to get a copy of this message | ||
Author: Weilin Du (LamentXU123)
Date: 2026-09-29T00:28:22+08:00
Commit: https://github.com/php/php-src/commit/18e83bdb1a4eb29c924c10db9869fdf24594d67d
Raw diff: https://github.com/php/php-src/commit/18e83bdb1a4eb29c924c10db9869fdf24594d67d.diff
Merge branch 'PHP-8.6'
* codex/pr23944-php86:
CI: Fix flacky ext\curl\tests\curl_setopt_ssl.phpt (#23944)
Changed paths:
M ext/curl/tests/curl_setopt_ssl.phpt
Diff:
diff --git a/ext/curl/tests/curl_setopt_ssl.phpt b/ext/curl/tests/curl_setopt_ssl.phpt
index f3b82e1756e3..80283b9d6ca0 100644
--- a/ext/curl/tests/curl_setopt_ssl.phpt
+++ b/ext/curl/tests/curl_setopt_ssl.phpt
@@ -73,8 +73,24 @@ if ($process === false) {
die('failed to start server');
}
try {
- // Give the server time to start
- sleep(1);
+ // Wait until OpenSSL is actually listening before making the first request.
+ $ready = false;
+ for ($i = 0; $i < 100; $i++) {
+ $connection = @stream_socket_client("tcp://127.0.0.1:$port", $errno, $errstr,
0.05);
+ if ($connection !== false) {
+ fclose($connection);
+ $ready = true;
+ break;
+ }
+ if (!proc_get_status($process)['running']) {
+ break;
+ }
+ usleep(50000);
+ }
+ if (!$ready) {
+ stream_set_blocking($pipes[2], false);
+ throw new RuntimeException('OpenSSL server did not start: ' .
trim(stream_get_contents($pipes[2])));
+ }
echo "case 1: client cert and key from string\n";
$ch = curl_init("https://127.0.0.1:$port/");