Commit 0ddabc30e82 for php
commit 0ddabc30e826393e5d9467bc77a479040be50ba7
Author: Jorg Sowa <jorg.sowa@gmail.com>
Date: Thu Oct 22 21:17:51 2026 +0200
ext/standard: Skip proc_open descriptor 0 tests without /proc/self/fd symlinks
On Solaris/illumos /proc/self/fd entries are not symlinks, so readlink()
fails with EINVAL.
Co-authored-by: David Carlier <devnexen@gmail.com>
Closes GH-24571.
diff --git a/ext/standard/tests/general_functions/proc_open_descriptor_0_setup_failure.phpt b/ext/standard/tests/general_functions/proc_open_descriptor_0_setup_failure.phpt
index ea654b0f497..0aca62b2903 100644
--- a/ext/standard/tests/general_functions/proc_open_descriptor_0_setup_failure.phpt
+++ b/ext/standard/tests/general_functions/proc_open_descriptor_0_setup_failure.phpt
@@ -5,8 +5,8 @@
if (!function_exists("proc_open")) {
die("skip proc_open() unavailable");
}
-if (!@is_dir("/proc/self/fd")) {
- die("skip requires /proc/self/fd");
+if (!@is_link("/proc/self/fd/1")) {
+ die("skip requires /proc/self/fd symlinks");
}
?>
--FILE--
diff --git a/ext/standard/tests/general_functions/proc_open_socket_descriptor_0_setup_failure.phpt b/ext/standard/tests/general_functions/proc_open_socket_descriptor_0_setup_failure.phpt
index 88e4eee1b20..f2b30c89309 100644
--- a/ext/standard/tests/general_functions/proc_open_socket_descriptor_0_setup_failure.phpt
+++ b/ext/standard/tests/general_functions/proc_open_socket_descriptor_0_setup_failure.phpt
@@ -5,8 +5,8 @@
if (!function_exists("proc_open")) {
die("skip proc_open() unavailable");
}
-if (!@is_dir("/proc/self/fd")) {
- die("skip requires /proc/self/fd");
+if (!@is_link("/proc/self/fd/1")) {
+ die("skip requires /proc/self/fd symlinks");
}
?>
--FILE--