Disable localhost subdomain AddressFamily tests on Android#124752
Merged
rzikm merged 1 commit intodotnet:mainfrom Feb 23, 2026
Merged
Disable localhost subdomain AddressFamily tests on Android#124752rzikm merged 1 commit intodotnet:mainfrom
rzikm merged 1 commit intodotnet:mainfrom
Conversation
The DnsGetHostEntry_LocalhostSubdomain_RespectsAddressFamily and DnsGetHostAddresses_LocalhostSubdomain_RespectsAddressFamily tests fail on Android because getaddrinfo with a specific address family (AF_INET or AF_INET6) for 'localhost' may return EAI_NONAME, while AF_UNSPEC succeeds. The RFC 6761 fallback passes the address family through, causing both the initial and fallback resolution to fail. Fixes dotnet#124751 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @karelz, @dotnet/ncl |
ManickaP
approved these changes
Feb 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Disables two System.Net.NameResolution functional tests that validate *.localhost subdomain resolution with AddressFamily filtering on Android, due to consistent CI failures tied to Android resolver behavior.
Changes:
- Mark
DnsGetHostEntry_LocalhostSubdomain_RespectsAddressFamilyas skipped on Android via[ActiveIssue]. - Mark
DnsGetHostAddresses_LocalhostSubdomain_RespectsAddressFamilyas skipped on Android via[ActiveIssue].
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/libraries/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs | Adds [ActiveIssue(..., TestPlatforms.Android)] to disable the AddressFamily localhost-subdomain test on Android. |
| src/libraries/System.Net.NameResolution/tests/FunctionalTests/GetHostAddressesTest.cs | Adds [ActiveIssue(..., TestPlatforms.Android)] to disable the AddressFamily localhost-subdomain test on Android. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disables
DnsGetHostEntry_LocalhostSubdomain_RespectsAddressFamilyandDnsGetHostAddresses_LocalhostSubdomain_RespectsAddressFamilyon Android using[ActiveIssue].Problem
These tests (introduced in #123076 for RFC 6761 localhost subdomain handling) consistently fail on Android CI (
windows.11.amd64.android.open):The tests call e.g.
Dns.GetHostEntry("test.localhost", AddressFamily.InterNetwork). The RFC 6761 implementation tries the OS resolver for"test.localhost"first, then falls back to resolving"localhost"with the sameAddressFamily. On Android,getaddrinfo("localhost", ..., AF_INET/AF_INET6)may fail withEAI_NONAMEwhilegetaddrinfo("localhost", ..., AF_UNSPEC)succeeds — causing both the initial and fallback resolution to fail.Other localhost subdomain tests that use
AddressFamily.Unspecified(e.g.ReturnsLoopback) pass on Android.Example console log: https://helixr1107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-76f79e897d5246b58a/System.Net.NameResolution.Functional.Tests/1/console.858b3560.log?helixlogtype=result
Contributes to #124751