[php-src] PHP-8.4: ext/snmp: Add XFAIL on several tests (#22476) (#23231)

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-13T00:27:32+08:00

Commit: https://github.com/php/php-src/commit/e213e7f2668deb2b1440669e2c88107b526ce3bf
Raw diff: https://github.com/php/php-src/commit/e213e7f2668deb2b1440669e2c88107b526ce3bf.diff

ext/snmp: Add XFAIL on several tests (#22476) (#23231)

SNMP tests are likely to fail on Windows CI when network features are tested.
So I add all these XFAIL sections to those tests to make sure it don't bother
unrelated CI runs.

(cherry picked from commit f619e66781d85ad06cc847a0dd5776127a8359bc)

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 4fbf80f0400a..5e2c43dc6ada 100644
--- a/ext/snmp/tests/bug64124.phpt
+++ b/ext/snmp/tests/bug64124.phpt
@@ -13,6 +13,8 @@ if (@inet_ntop($packed) === false) {
     die("skip no IPv6 support");
 }
 ?>
+--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 622cb1ce019d..1df12b708875 100644
--- a/ext/snmp/tests/bug64159.phpt
+++ b/ext/snmp/tests/bug64159.phpt
@@ -10,6 +10,8 @@ require_once(__DIR__.'/skipif.inc');
 ?>
 --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 6cad7e9901cb..db0b4c52b89f 100644
--- a/ext/snmp/tests/generic_timeout_error.phpt
+++ b/ext/snmp/tests/generic_timeout_error.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 c305fb15d4b8..2664660fdd77 100644
--- a/ext/snmp/tests/ipv6.phpt
+++ b/ext/snmp/tests/ipv6.phpt
@@ -13,6 +13,8 @@ if (@inet_ntop($packed) === false) {
     die("skip no IPv6 support");
 }
 ?>
+--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 d6757111b020..ae279cd4e652 100644
--- a/ext/snmp/tests/snmp-object-errno-errstr.phpt
+++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt
@@ -9,6 +9,8 @@ snmp
 require_once(__DIR__.'/skipif.inc');
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--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 13461675cc80..1a9ce63fc6c2 100644
--- a/ext/snmp/tests/snmp-object.phpt
+++ b/ext/snmp/tests/snmp-object.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 30500eb5ca9b..15457d34ab1a 100644
--- a/ext/snmp/tests/snmp2_get.phpt
+++ b/ext/snmp/tests/snmp2_get.phpt
@@ -9,6 +9,8 @@ snmp
 require_once(__DIR__.'/skipif.inc');
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--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 c428783b79f7..ea73c52f77b4 100644
--- a/ext/snmp/tests/snmp2_getnext.phpt
+++ b/ext/snmp/tests/snmp2_getnext.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 91c337f6d67a..32c72ea3f924 100644
--- a/ext/snmp/tests/snmp2_real_walk.phpt
+++ b/ext/snmp/tests/snmp2_real_walk.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 4fbcc2098f73..171c2f2a50ef 100644
--- a/ext/snmp/tests/snmp2_set-nomib.phpt
+++ b/ext/snmp/tests/snmp2_set-nomib.phpt
@@ -11,6 +11,8 @@ if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
 --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 11b1d94419f5..832c05cb9909 100644
--- a/ext/snmp/tests/snmp2_set.phpt
+++ b/ext/snmp/tests/snmp2_set.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 fcf14424ca05..362db1fa3cbd 100644
--- a/ext/snmp/tests/snmp2_walk.phpt
+++ b/ext/snmp/tests/snmp2_walk.phpt
@@ -9,6 +9,8 @@ snmp
 require_once(__DIR__.'/skipif.inc');
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--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 27cba5b48416..6463af87a3b9 100644
--- a/ext/snmp/tests/snmp3-error.phpt
+++ b/ext/snmp/tests/snmp3-error.phpt
@@ -9,6 +9,8 @@ snmp
 require_once(__DIR__.'/skipif.inc');
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--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 1d12a84f4647..c689865bf052 100644
--- a/ext/snmp/tests/snmp3.phpt
+++ b/ext/snmp/tests/snmp3.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 6b9326fa0cca..2c3bac572325 100644
--- a/ext/snmp/tests/snmp_getvalue.phpt
+++ b/ext/snmp/tests/snmp_getvalue.phpt
@@ -7,9 +7,10 @@ snmp
 --SKIPIF--
 <?php
 require_once(__DIR__.'/skipif.inc');
-if (PHP_OS_FAMILY === "Windows") die("xfail fails on Windows for unknown reasons");
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--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 ea7924ed8e57..9e0d38541597 100644
--- a/ext/snmp/tests/snmpget.phpt
+++ b/ext/snmp/tests/snmpget.phpt
@@ -9,6 +9,8 @@ snmp
 require_once(__DIR__.'/skipif.inc');
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--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 995a4cc987f5..a02dfcc7b55c 100644
--- a/ext/snmp/tests/snmpgetnext.phpt
+++ b/ext/snmp/tests/snmpgetnext.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 66f458dadffa..0ccaf3635c41 100644
--- a/ext/snmp/tests/snmprealwalk.phpt
+++ b/ext/snmp/tests/snmprealwalk.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 e5b5bfb9f85a..9a2c64a9aa0c 100644
--- a/ext/snmp/tests/snmpset-nomib.phpt
+++ b/ext/snmp/tests/snmpset-nomib.phpt
@@ -11,6 +11,8 @@ if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
 --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 ca935cecf5ec..890ee569f10f 100644
--- a/ext/snmp/tests/snmpset.phpt
+++ b/ext/snmp/tests/snmpset.phpt
@@ -8,6 +8,8 @@ snmp
 <?php
 require_once(__DIR__.'/skipif.inc');
 ?>
+--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 61ef33a70a29..bc1e4c37385d 100644
--- a/ext/snmp/tests/snmpwalk.phpt
+++ b/ext/snmp/tests/snmpwalk.phpt
@@ -9,6 +9,8 @@ snmp
 require_once(__DIR__.'/skipif.inc');
 if (getenv('SKIP_ASAN')) die('skip Timeouts under ASAN');
 ?>
+--XFAIL--
+SNMP tests might possibly fail on Windows
 --FILE--
 <?php
 require_once(__DIR__.'/snmp_include.inc');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.