Commit 578b4d2
[mobile] Skip failing Android localhost subdomain DNS tests (#127742)
## Summary
Fixes failing `System.Net.NameResolution` tests on Android by adding
`ActiveIssue` attributes to skip tests that expect localhost subdomain
resolution to return loopback addresses.
## Details
On Android, DNS resolution for `.localhost` subdomains (e.g.,
`foo.localhost`, `test.localhost`) returns link-local IPv6 addresses
(`fe80::/10`) instead of loopback addresses, causing test failures.
### Tests Fixed
- `DnsGetHostEntry_LocalhostSubdomain_ReturnsLoopback`
- `DnsGetHostAddresses_LocalhostSubdomain_ReturnsLoopback`
These tests are now skipped on Android with reference to existing issue
#124751, which already tracks the same underlying problem for the
`RespectsAddressFamily` variants of these tests.
### Build Information
- **Build**:
[1406427](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1406427)
- **Date**: 2026-05-03
- **Job**: android-arm Release AllSubsets_Mono
- **Helix Job**: 6255e58e-bf4f-4c25-ba48-27c957d4ea3e
- **Work Item**: System.Net.NameResolution.Functional.Tests
### Console Log Excerpt (sanitized)
```
[20:56:01] info: Instrumentation finished normally with exit code 1
[FAIL] System.Net.NameResolution.Tests.GetHostAddressesTest.DnsGetHostAddresses_LocalhostSubdomain_ReturnsLoopback(hostName: "foo.localhost")
Assert.All() Failure: 2 out of 3 items in the collection did not pass.
Error: Expected loopback address but got: fe80::cb7c:d6fd:eb1f:6f44%10
Error: Expected loopback address but got: fe80::b4f2:efff:fea1:dbef%3
[FAIL] System.Net.NameResolution.Tests.GetHostAddressesTest.DnsGetHostAddresses_LocalhostSubdomain_ReturnsLoopback(hostName: "test.localhost")
Assert.All() Failure: 2 out of 3 items in the collection did not pass.
Error: Expected loopback address but got: fe80::cb7c:d6fd:eb1f:6f44%10
Error: Expected loopback address but got: fe80::b4f2:efff:fea1:dbef%3
```
The tests receive link-local IPv6 addresses instead of the expected
loopback addresses (127.0.0.1 or ::1).
### Root Cause
Android's DNS resolver behavior for RFC 6761 localhost subdomains
differs from desktop platforms. When the OS resolver fallback tries to
resolve plain "localhost" with or without an address family filter,
Android may return the device's network interface addresses instead of
loopback addresses.
### Related Issue
Closes: #124751
> [!NOTE]
> This content was generated by GitHub Copilot and may contain
AI-generated content.
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 2 items</summary>
>
> The following items were blocked because they don't meet the GitHub
integrity level.
>
> - [#19443](#19443)
`search_issues`: has lower integrity than agent requires. The agent
cannot read data with integrity below "approved".
> - [#126805](#126805)
`search_pull_requests`: has lower integrity than agent requires. The
agent cannot read data with integrity below "approved".
>
> To allow these resources, lower `min-integrity` in your GitHub
frontmatter:
>
> ```yaml
> tools:
> github:
> min-integrity: approved # merged | approved | unapproved | none
> ```
>
> </details>
> Generated by [Mobile Platform Failure
Scanner](https://github.com/dotnet/runtime/actions/runs/25316071096/agentic_workflow)
· ● 3.6M ·
[◷](https://github.com/search?q=repo%3Adotnet%2Fruntime+%22gh-aw-workflow-id%3A+mobile-scan%22&type=pullrequests)
<!-- gh-aw-agentic-workflow: Mobile Platform Failure Scanner, engine:
copilot, model: claude-sonnet-4.5, id: 25316071096, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/25316071096 -->
<!-- gh-aw-workflow-id: mobile-scan -->
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent 7ab06a3 commit 578b4d2
2 files changed
Lines changed: 2 additions & 0 deletions
File tree
- src/libraries/System.Net.NameResolution/tests/FunctionalTests
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
| |||
0 commit comments