Skip to content

ext/snmp: Add XFAIL on several tests - #22476

Merged
LamentXU123 merged 1 commit into
php:masterfrom
LamentXU123:fix-SNMP-CI
Jun 27, 2026
Merged

ext/snmp: Add XFAIL on several tests#22476
LamentXU123 merged 1 commit into
php:masterfrom
LamentXU123:fix-SNMP-CI

Conversation

@LamentXU123

Copy link
Copy Markdown
Member

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.

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can always add more if we missed some.

@LamentXU123
LamentXU123 merged commit f619e66 into php:master Jun 27, 2026
18 checks passed
@LamentXU123

Copy link
Copy Markdown
Member Author

@Girgias Should this be backported to 8.4 and 8.5?

adrian-enspired pushed a commit to adrian-enspired/php-src that referenced this pull request Aug 4, 2026
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.
LamentXU123 added a commit that referenced this pull request Aug 12, 2026
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 f619e66)
LamentXU123 added a commit that referenced this pull request Aug 12, 2026
* PHP-8.4:
  ext/snmp: Add XFAIL on several tests (#22476) (#23231)
LamentXU123 added a commit that referenced this pull request Aug 12, 2026
* PHP-8.5:
  ext/snmp: Add XFAIL on several tests (#22476) (#23231)
@iluuu1994

iluuu1994 commented Aug 12, 2026

Copy link
Copy Markdown
Member

This makes the tests fallible on all platforms, and hence effectively useless. We should either use the retry mechanism (see is_flaky_output() in run-tests.php), or if that's not reliable enough, use XFAIL just for Windows via SKIPIF.

@LamentXU123

LamentXU123 commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

I think using the retry function is sensible.
I don't think using retry function is sensible. The tests are failing because we failed to launch a local SNMP server for tests, so no matter how many times we retry the test itself it fails repeatedly.

Using XFAIL just for Windows via SKIPIF is a optimization. wdyt @Girgias @iluuu1994?

@iluuu1994

iluuu1994 commented Aug 12, 2026

Copy link
Copy Markdown
Member

The tests are failing because we failed to launch a local SNMP server for tests

Do you have a failed test run at hand? Does that mean all SNMP tests fail?

@LamentXU123

LamentXU123 commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Do you have a failed test run at hand? Does that mean all SNMP tests fail?

I have no way of reproducing the issue. But I guess it seems more than a timeout, since multiple tests fail when it happens.

Sadly, I can't reproduce any of the failure in my local Windows machine. The issue only occurs remotely.

@iluuu1994

Copy link
Copy Markdown
Member

Do you have an old link is what I meant?

@LamentXU123

Copy link
Copy Markdown
Member Author

Do you have an old link is what I meant?

Yes, for example: https://github.com/php/php-src/actions/runs/31586188059/job/94080512001

@iluuu1994

Copy link
Copy Markdown
Member

Only three tests failed, so it doesn't look like the server completely failed to start.

@LamentXU123

Copy link
Copy Markdown
Member Author

There are examples that all of them fails: https://github.com/php/php-src/actions/runs/31617658217/job/94184456225

I think it would be reasonable to do both. Since I don't see anything harmful in adding the retrying function and SKIPIF together.

@iluuu1994

Copy link
Copy Markdown
Member

There are examples that all of them fails: https://github.com/php/php-src/actions/runs/31617658217/job/94184456225

You're not looking at that right. They warn because they succeed and have XFAIL.

@LamentXU123

Copy link
Copy Markdown
Member Author

I've done adding SKIPIF. See #23237

@iluuu1994

Copy link
Copy Markdown
Member

I don't understand why we don't go for the repeat solution if only some tests fail. Otherwise we might as well remove SNMP from the Windows build.

@LamentXU123

Copy link
Copy Markdown
Member Author

I don't understand why we don't go for the repeat solution if only some tests fail. Otherwise we might as well remove SNMP from the Windows build.

Not sure if the repeat solution can solve the issue since we don't know the reason of the failure. But we can always revert it if failure is observed.

See #23237.

@LamentXU123

Copy link
Copy Markdown
Member Author

@iluuu1994 See https://github.com/php/php-src/actions/runs/31630685374/job/94245202431, there are still possible failures when we enables retrying.

pull Bot pushed a commit to KornaPhp/php-src that referenced this pull request Aug 12, 2026
* PHP-8.4:
  ext/gettext/tests: updates for musl-1.2.6
  ext/snmp: Add XFAIL on several tests (php#22476) (php#23231)
  ext/readline: Fix class constant completion in readline interactive shell (php#23218)
@iluuu1994

iluuu1994 commented Aug 12, 2026

Copy link
Copy Markdown
Member

@LamentXU123 This test was previously marked as XFAIL on Windows: f619e66#diff-8b5021284a991a7856e4bd8bd6cddc7b733237e2dcdfdb32f06e3bad10df27f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants