[php-src] PHP-8.4: ext/snmp: Put XFAILs under SKIPIF section in tests (#23237)
Weilin Du via GitHub <[email protected]>
| Newsgroups | gmane.comp.php.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
Author: Weilin Du (LamentXU123)
Committer: GitHub (web-flow)
Pusher: LamentXU123
Date: 2026-08-19T00:06:08+08:00
Commit: https://github.com/php/php-src/commit/0f4c6ff1c4f85440f6670fdea922379d7736532d
Raw diff: https://github.com/php/php-src/commit/0f4c6ff1c4f85440f6670fdea922379d7736532d.diff
ext/snmp: Put XFAILs under SKIPIF section in tests (#23237)
So SNMP tests can work on other platforms, except Windows.
Changed paths:
M ext/snmp/tests/bug64124.phpt
M ext/snmp/tests/bug64159.phpt
M ext/snmp/tests/generic_timeout_error.phpt
M ext/snmp/tests/ipv6.phpt
M ext/snmp/tests/snmp-object-errno-errstr.phpt
M ext/snmp/tests/snmp-object.phpt
M ext/snmp/tests/snmp2_get.phpt
M ext/snmp/tests/snmp2_getnext.phpt
M ext/snmp/tests/snmp2_real_walk.phpt
M ext/snmp/tests/snmp2_set-nomib.phpt
M ext/snmp/tests/snmp2_set.phpt
M ext/snmp/tests/snmp2_walk.phpt
M ext/snmp/tests/snmp3-error.phpt
M ext/snmp/tests/snmp3.phpt
M ext/snmp/tests/snmp_getvalue.phpt
M ext/snmp/tests/snmpget.phpt
M ext/snmp/tests/snmpgetnext.phpt
M ext/snmp/tests/snmprealwalk.phpt
M ext/snmp/tests/snmpset-nomib.phpt
M ext/snmp/tests/snmpset.phpt
M ext/snmp/tests/snmpwalk.phpt
Diff:
diff --git a/ext/snmp/tests/bug64124.phpt b/ext/snmp/tests/bug64124.phpt
index 5e2c43dc6ada..e2b70f42d24d 100644
--- a/ext/snmp/tests/bug64124.phpt
+++ b/ext/snmp/tests/bug64124.phpt
@@ -12,9 +12,8 @@ $packed = str_repeat(chr(0), 15) . chr(1);
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 1df12b708875..ccb310f75245 100644
--- a/ext/snmp/tests/bug64159.phpt
+++ b/ext/snmp/tests/bug64159.phpt
@@ -7,11 +7,10 @@ snmp
--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 db0b4c52b89f..eaf81058fb89 100644
--- a/ext/snmp/tests/generic_timeout_error.phpt
+++ b/ext/snmp/tests/generic_timeout_error.phpt
@@ -7,9 +7,8 @@ snmp
--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 2664660fdd77..e92bb6e4c16e 100644
--- a/ext/snmp/tests/ipv6.phpt
+++ b/ext/snmp/tests/ipv6.phpt
@@ -12,9 +12,8 @@ $packed = str_repeat(chr(0), 15) . chr(1);
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 ae279cd4e652..1585f5f25fbf 100644
--- a/ext/snmp/tests/snmp-object-errno-errstr.phpt
+++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt
@@ -8,9 +8,8 @@ snmp
<?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 1a9ce63fc6c2..01d137e38d2f 100644
--- a/ext/snmp/tests/snmp-object.phpt
+++ b/ext/snmp/tests/snmp-object.phpt
@@ -7,9 +7,8 @@ snmp
--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 15457d34ab1a..c20947f90483 100644
--- a/ext/snmp/tests/snmp2_get.phpt
+++ b/ext/snmp/tests/snmp2_get.phpt
@@ -8,9 +8,8 @@ snmp
<?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 ea73c52f77b4..9e6a281b5717 100644
--- a/ext/snmp/tests/snmp2_getnext.phpt
+++ b/ext/snmp/tests/snmp2_getnext.phpt
@@ -7,9 +7,8 @@ snmp
--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 32c72ea3f924..55360b86906b 100644
--- a/ext/snmp/tests/snmp2_real_walk.phpt
+++ b/ext/snmp/tests/snmp2_real_walk.phpt
@@ -7,9 +7,8 @@ snmp
--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 171c2f2a50ef..24da8b45fcf1 100644
--- a/ext/snmp/tests/snmp2_set-nomib.phpt
+++ b/ext/snmp/tests/snmp2_set-nomib.phpt
@@ -8,11 +8,10 @@ snmp
<?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 832c05cb9909..ff1b65aae47c 100644
--- a/ext/snmp/tests/snmp2_set.phpt
+++ b/ext/snmp/tests/snmp2_set.phpt
@@ -7,9 +7,8 @@ snmp
--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 362db1fa3cbd..8ac00ed7417e 100644
--- a/ext/snmp/tests/snmp2_walk.phpt
+++ b/ext/snmp/tests/snmp2_walk.phpt
@@ -8,9 +8,8 @@ snmp
<?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 6463af87a3b9..5f39f88ffe14 100644
--- a/ext/snmp/tests/snmp3-error.phpt
+++ b/ext/snmp/tests/snmp3-error.phpt
@@ -8,9 +8,8 @@ snmp
<?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 c689865bf052..14e011577dd2 100644
--- a/ext/snmp/tests/snmp3.phpt
+++ b/ext/snmp/tests/snmp3.phpt
@@ -7,9 +7,8 @@ snmp
--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 2c3bac572325..f2ff6918600d 100644
--- a/ext/snmp/tests/snmp_getvalue.phpt
+++ b/ext/snmp/tests/snmp_getvalue.phpt
@@ -8,9 +8,8 @@ snmp
<?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 9e0d38541597..44400f7eddaa 100644
--- a/ext/snmp/tests/snmpget.phpt
+++ b/ext/snmp/tests/snmpget.phpt
@@ -8,9 +8,8 @@ snmp
<?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 a02dfcc7b55c..510960e3808b 100644
--- a/ext/snmp/tests/snmpgetnext.phpt
+++ b/ext/snmp/tests/snmpgetnext.phpt
@@ -7,9 +7,8 @@ snmp
--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 0ccaf3635c41..e0128c010d52 100644
--- a/ext/snmp/tests/snmprealwalk.phpt
+++ b/ext/snmp/tests/snmprealwalk.phpt
@@ -7,9 +7,8 @@ snmp
--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 9a2c64a9aa0c..b932c99ffa45 100644
--- a/ext/snmp/tests/snmpset-nomib.phpt
+++ b/ext/snmp/tests/snmpset-nomib.phpt
@@ -8,11 +8,10 @@ snmp
<?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 890ee569f10f..8474ea59ab32 100644
--- a/ext/snmp/tests/snmpset.phpt
+++ b/ext/snmp/tests/snmpset.phpt
@@ -7,9 +7,8 @@ snmp
--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 bc1e4c37385d..97735638eeb6 100644
--- a/ext/snmp/tests/snmpwalk.phpt
+++ b/ext/snmp/tests/snmpwalk.phpt
@@ -8,9 +8,8 @@ snmp
<?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');