Commit 0f4c6ff1c4f for php.net
commit 0f4c6ff1c4f85440f6670fdea922379d7736532d
Author: Weilin Du <weilindu@php.net>
Date: Wed Aug 19 00:06:08 2026 +0800
ext/snmp: Put XFAILs under SKIPIF section in tests (#23237)
So SNMP tests can work on other platforms, except Windows.
diff --git a/ext/snmp/tests/bug64124.phpt b/ext/snmp/tests/bug64124.phpt
index 5e2c43dc6ad..e2b70f42d24 100644
--- a/ext/snmp/tests/bug64124.phpt
+++ b/ext/snmp/tests/bug64124.phpt
@@ -12,9 +12,8 @@
if (@inet_ntop($packed) === false) {
die("skip no IPv6 support");
}
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/bug64159.phpt b/ext/snmp/tests/bug64159.phpt
index 1df12b70887..ccb310f7524 100644
--- a/ext/snmp/tests/bug64159.phpt
+++ b/ext/snmp/tests/bug64159.phpt
@@ -7,11 +7,10 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
--ENV--
MIBS=noneXistent
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/generic_timeout_error.phpt b/ext/snmp/tests/generic_timeout_error.phpt
index db0b4c52b89..eaf81058fb8 100644
--- a/ext/snmp/tests/generic_timeout_error.phpt
+++ b/ext/snmp/tests/generic_timeout_error.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/ipv6.phpt b/ext/snmp/tests/ipv6.phpt
index 2664660fdd7..e92bb6e4c16 100644
--- a/ext/snmp/tests/ipv6.phpt
+++ b/ext/snmp/tests/ipv6.phpt
@@ -12,9 +12,8 @@
if (@inet_ntop($packed) === false) {
die("skip no IPv6 support");
}
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp-object-errno-errstr.phpt b/ext/snmp/tests/snmp-object-errno-errstr.phpt
index ae279cd4e65..1585f5f25fb 100644
--- a/ext/snmp/tests/snmp-object-errno-errstr.phpt
+++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp-object.phpt b/ext/snmp/tests/snmp-object.phpt
index 1a9ce63fc6c..01d137e38d2 100644
--- a/ext/snmp/tests/snmp-object.phpt
+++ b/ext/snmp/tests/snmp-object.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp2_get.phpt b/ext/snmp/tests/snmp2_get.phpt
index 15457d34ab1..c20947f9048 100644
--- a/ext/snmp/tests/snmp2_get.phpt
+++ b/ext/snmp/tests/snmp2_get.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp2_getnext.phpt b/ext/snmp/tests/snmp2_getnext.phpt
index ea73c52f77b..9e6a281b571 100644
--- a/ext/snmp/tests/snmp2_getnext.phpt
+++ b/ext/snmp/tests/snmp2_getnext.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp2_real_walk.phpt b/ext/snmp/tests/snmp2_real_walk.phpt
index 32c72ea3f92..55360b86906 100644
--- a/ext/snmp/tests/snmp2_real_walk.phpt
+++ b/ext/snmp/tests/snmp2_real_walk.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp2_set-nomib.phpt b/ext/snmp/tests/snmp2_set-nomib.phpt
index 171c2f2a50e..24da8b45fcf 100644
--- a/ext/snmp/tests/snmp2_set-nomib.phpt
+++ b/ext/snmp/tests/snmp2_set-nomib.phpt
@@ -8,11 +8,10 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
--ENV--
MIBS=
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp2_set.phpt b/ext/snmp/tests/snmp2_set.phpt
index 832c05cb990..ff1b65aae47 100644
--- a/ext/snmp/tests/snmp2_set.phpt
+++ b/ext/snmp/tests/snmp2_set.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp2_walk.phpt b/ext/snmp/tests/snmp2_walk.phpt
index 362db1fa3cb..8ac00ed7417 100644
--- a/ext/snmp/tests/snmp2_walk.phpt
+++ b/ext/snmp/tests/snmp2_walk.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp3-error.phpt b/ext/snmp/tests/snmp3-error.phpt
index 6463af87a3b..5f39f88ffe1 100644
--- a/ext/snmp/tests/snmp3-error.phpt
+++ b/ext/snmp/tests/snmp3-error.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp3.phpt b/ext/snmp/tests/snmp3.phpt
index c689865bf05..14e011577dd 100644
--- a/ext/snmp/tests/snmp3.phpt
+++ b/ext/snmp/tests/snmp3.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmp_getvalue.phpt b/ext/snmp/tests/snmp_getvalue.phpt
index 2c3bac57232..f2ff6918600 100644
--- a/ext/snmp/tests/snmp_getvalue.phpt
+++ b/ext/snmp/tests/snmp_getvalue.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === "Windows") die("xfail fails on Windows for unknown reasons");
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmpget.phpt b/ext/snmp/tests/snmpget.phpt
index 9e0d3854159..44400f7edda 100644
--- a/ext/snmp/tests/snmpget.phpt
+++ b/ext/snmp/tests/snmpget.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmpgetnext.phpt b/ext/snmp/tests/snmpgetnext.phpt
index a02dfcc7b55..510960e3808 100644
--- a/ext/snmp/tests/snmpgetnext.phpt
+++ b/ext/snmp/tests/snmpgetnext.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmprealwalk.phpt b/ext/snmp/tests/snmprealwalk.phpt
index 0ccaf3635c4..e0128c010d5 100644
--- a/ext/snmp/tests/snmprealwalk.phpt
+++ b/ext/snmp/tests/snmprealwalk.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmpset-nomib.phpt b/ext/snmp/tests/snmpset-nomib.phpt
index 9a2c64a9aa0..b932c99ffa4 100644
--- a/ext/snmp/tests/snmpset-nomib.phpt
+++ b/ext/snmp/tests/snmpset-nomib.phpt
@@ -8,11 +8,10 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
--ENV--
MIBS=
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmpset.phpt b/ext/snmp/tests/snmpset.phpt
index 890ee569f10..8474ea59ab3 100644
--- a/ext/snmp/tests/snmpset.phpt
+++ b/ext/snmp/tests/snmpset.phpt
@@ -7,9 +7,8 @@
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');
diff --git a/ext/snmp/tests/snmpwalk.phpt b/ext/snmp/tests/snmpwalk.phpt
index bc1e4c37385..97735638eeb 100644
--- a/ext/snmp/tests/snmpwalk.phpt
+++ b/ext/snmp/tests/snmpwalk.phpt
@@ -8,9 +8,8 @@
<?php
require_once(__DIR__.'/skipif.inc');
if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
+if (PHP_OS_FAMILY === 'Windows') die('xfail SNMP tests might possibly fail on Windows');
?>
---XFAIL--
-SNMP tests might possibly fail on Windows
--FILE--
<?php
require_once(__DIR__.'/snmp_include.inc');