From dda4c8abc3762d0b6389965e1dbeaf648fb58b0c Mon Sep 17 00:00:00 2001 From: Sjoerd Langkemper Date: Fri, 16 Oct 2026 15:02:53 +0000 Subject: [PATCH 1/2] Use FreeBSD 14.4 in GitHub actions FreeBSD 13 is no longer supported. --- .github/actions/freebsd/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/freebsd/action.yml b/.github/actions/freebsd/action.yml index 588cb1fc0137..3cfdae761afa 100644 --- a/.github/actions/freebsd/action.yml +++ b/.github/actions/freebsd/action.yml @@ -12,7 +12,7 @@ runs: - name: FreeBSD uses: vmactions/freebsd-vm@v1 with: - release: '13.5' + release: '14.4' usesh: true copyback: false disable-cache: true From 14f5d0bb28af79e2dac55b3c95bb1f758557edce Mon Sep 17 00:00:00 2001 From: Sjoerd Langkemper Date: Fri, 16 Oct 2026 15:26:14 +0000 Subject: [PATCH 2/2] Fix tests on FreeBSD Adjust tests that relied on behavior that changed on FreeBSD: - lstat_stat_variation18/19/20: rdev is reported as -1 (NODEV), so use %i instead of %d. - socket_tcp_congestion: set the currently active congestion algorithm instead of hard-coding newreno, which is no longer loaded by default. - socket_sentto_recvfrom_unix: don't expect a warning for an AF_UNIX datagram socket with an explicit protocol. - setlocale_variation2: skip, as locale -a lists locales that cannot be set. --- ext/sockets/tests/socket_sentto_recvfrom_unix.phpt | 5 +++-- ext/sockets/tests/socket_tcp_congestion.phpt | 11 +++++------ ext/standard/tests/file/lstat_stat_variation18.phpt | 4 ++-- ext/standard/tests/file/lstat_stat_variation19.phpt | 8 ++++---- ext/standard/tests/file/lstat_stat_variation20.phpt | 8 ++++---- ext/standard/tests/strings/setlocale_variation2.phpt | 3 +++ 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt index 90fcc9724ced..881d8f824656 100644 --- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt +++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt @@ -9,7 +9,9 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { } --FILE-- --EXPECTF-- -Warning: socket_create(): Unable to create socket [%d]: Protocol not supported in %s on line %d bool(false) bool(false) Received Ping! diff --git a/ext/sockets/tests/socket_tcp_congestion.phpt b/ext/sockets/tests/socket_tcp_congestion.phpt index 2dade02f3fbe..b58303b4fcc3 100644 --- a/ext/sockets/tests/socket_tcp_congestion.phpt +++ b/ext/sockets/tests/socket_tcp_congestion.phpt @@ -10,15 +10,14 @@ if (!defined('TCP_CONGESTION')) { --FILE-- int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -118,7 +118,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> diff --git a/ext/standard/tests/file/lstat_stat_variation19.phpt b/ext/standard/tests/file/lstat_stat_variation19.phpt index 18ad03e52d29..24af43599efa 100644 --- a/ext/standard/tests/file/lstat_stat_variation19.phpt +++ b/ext/standard/tests/file/lstat_stat_variation19.phpt @@ -63,7 +63,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -117,7 +117,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -173,7 +173,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -227,7 +227,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> diff --git a/ext/standard/tests/file/lstat_stat_variation20.phpt b/ext/standard/tests/file/lstat_stat_variation20.phpt index 5bff0456eba5..cfff4571ae16 100644 --- a/ext/standard/tests/file/lstat_stat_variation20.phpt +++ b/ext/standard/tests/file/lstat_stat_variation20.phpt @@ -72,7 +72,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -128,7 +128,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -182,7 +182,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> @@ -236,7 +236,7 @@ array(26) { [5]=> int(%d) [6]=> - int(%d) + int(%i) [7]=> int(%d) [8]=> diff --git a/ext/standard/tests/strings/setlocale_variation2.phpt b/ext/standard/tests/strings/setlocale_variation2.phpt index 6f62f71ac1f2..9c32e5ba82e2 100644 --- a/ext/standard/tests/strings/setlocale_variation2.phpt +++ b/ext/standard/tests/strings/setlocale_variation2.phpt @@ -5,6 +5,9 @@ Test setlocale() function : usage variations - Setting all available locales in if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not valid for windows'); } +if (PHP_OS === 'FreeBSD') { + die("skip Some locales listed by locale -a on FreeBSD (e.g. hr_HR.ISO8859-2) are incomplete, cannot test LC_ALL"); +} exec("locale -a", $output, $exit_code); if ($exit_code !== 0) { die("skip locale -a not available");