Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Haiku: Native support - #126805

Closed
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native
Closed

Haiku: Native support#126805
trungnt2910 wants to merge 2 commits into
dotnet:mainfrom
trungnt2910:dev/trungnt2910/haiku-misc-native

Conversation

@trungnt2910

@trungnt2910trungnt2910 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

This is the rest of the changes to the native code of .NET from the initial porting effort in 2023.

Part of #55803.

CopilotAI review requested due to automatic review settings April 12, 2026 06:30
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Apr 12, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Haiku-specific handling to ensure requests to load "libc" resolve to the correct system runtime library on Haiku.

Changes:

  • Map "libc" to "libroot.so" when building/running on Haiku in Mono’s dynamic loader shim.

Comment threadsrc/mono/mono/utils/mono-dl.c Outdated
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 3944abc to 646589bCompareApril 12, 2026 06:37
@am11

am11 commented Apr 12, 2026

Copy link
Copy Markdown
Member

Mono portion of this repo is only for mobile and browser/wasm platforms and it will eventually go away when CoreCLR replaces them, which is actively being worked on. For desktop platforms, CoreCLR and NativeAOT are the main focus going forward.

kotlarmilos pushed a commit that referenced this pull request Apr 27, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
kotlarmilos added a commit that referenced this pull request Apr 28, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
This is the rest of the changes to the native code of .NET from the
initial porting effort in 2023.
@trungnt2910
trungnt2910force-pushed the dev/trungnt2910/haiku-misc-native branch from 646589b to caef932CompareApril 29, 2026 13:44
CopilotAI review requested due to automatic review settings April 29, 2026 13:44

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

kotlarmilos added a commit that referenced this pull request May 5, 2026
## 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono` **Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1` **Work item**: System.Console.Tests **Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on mobile platforms (iOS, tvOS, Android,
MacCatalyst) because these platforms do not expose the underlying file
handles for standard streams.
The existing tests already had `[PlatformSpecific]` attributes excluding
iOS, tvOS, and Android, but **MacCatalyst was missing** from the
exclusion list. This is an oversight because MacCatalyst has the same
limitation as other Apple mobile platforms.
### Fix
Add `TestPlatforms.MacCatalyst` to the exclusion list (using `&
~TestPlatforms.MacCatalyst`) on all five tests that attempt to use these
APIs, and add it to the inclusion list on the three
"ThrowsOnUnsupportedPlatforms" tests that validate the exception is
thrown.
This makes the skip coverage consistent across all mobile platforms:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, matching the behavior on iOS,
tvOS, and Android.
---
> [!NOTE]
> This PR was created by GitHub Copilot after analyzing mobile platform
CI failures in the runtime-extra-platforms pipeline (build 1388505).
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](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: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- 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>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
> [!NOTE]
> This content was generated by GitHub Copilot.
## Summary
Fixes
`System.Net.NameResolution.Functional.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs`
test failure on Android by skipping the test on that platform.
## Background
The test assumes that resolving "localhost" returns only loopback IP
addresses (`127.0.0.1` and `::1`). However, on Android Helix machines
(emulators), the DNS resolution for "localhost" returns actual network
interfaces in addition to loopback addresses, causing the test to fail
with assertions like:
`````
Assert.All() Failure: 5 out of 6 items in the collection did not pass.
[1]: Item: fe80::e05a:f2ff:fee9:6ae6%47
Error: Not a loopback address: fe80::e05a:f2ff:fee9:6ae6%47
[2]: Item: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
Error: Not a loopback address: 2001:4898:502:2:e05a:f2ff:fee9:6ae6
[5]: Item: 10.64.32.211
Error: Not a loopback address: 10.64.32.211
````
## Changes
Added `[SkipOnPlatform(TestPlatforms.Android, ...)]` attribute to the
failing test, consistent with existing skips for iOS, tvOS, and
MacCatalyst on the same test (which have similar issues).
## Failure Details
**Build:**
https://dev.azure.com/dnceng-public/public/_build/results?buildId=1396313
**Job:** `android-arm64 Release AllSubsets_Mono`
**Helix Work Item:** System.Net.NameResolution.Functional.Tests
- Job ID: `93091357-214b-436d-a5c4-a31ee456a876`
- Console log:
https://helix.dot.net/api/2019-06-17/jobs/93091357-214b-436d-a5c4-a31ee456a876/workitems/System.Net.NameResolution.Functional.Tests/console
**Log excerpt (sanitized):**
````
04-25 00:03:35.029 DOTNET : [FAIL] System.Net.NameResolution.Tests.GetHostEntryTest.DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs(mode: 0)
04-25 00:03:35.029 DOTNET : Assert.All() Failure: 5 out of 6 items in the collection did not pass.
04-25 00:03:35.029 DOTNET : [5]: Item: 10.64.32.211
04-25 00:03:35.029 DOTNET : Error: Not a loopback address: 10.64.32.211
`````
## Related
- Existing skip on iOS/tvOS/MacCatalyst: #124079
- Similar Wasi skip: #107339
> [!NOTE]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#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/24929356562/agentic_workflow)
· ● 4.1M ·
[◷](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: 24929356562, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24929356562 -->
<!-- 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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kotlarmilos <11523312+kotlarmilos@users.noreply.github.com>
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
## 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>
@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_reviewed_commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "1547c9a611355b6ac0e958f5aa9299ed70e14665",
"last_recorded_worker_run_id": "29675346580",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "f8231a1b52eebfadb39ff4c7bba80459ea99c1fc",
"review_id": 4730522067
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: This PR continues the Haiku OS native porting effort for the Mono runtime (part of #55803). It adds the correct libc mapping for Haiku so that runtime code requesting "libc" resolves to Haiku's actual C library.

Approach: A single two-line addition to fix_libc_name in mono-dl.c adds an #elif defined (__HAIKU__) branch returning "libroot.so", inserted into the existing platform-specific ifdef chain before the generic LIBC_SO/libc.so fallbacks.

Summary: The change is correct, minimal, and well-scoped. On Haiku the standard C library is provided by libroot.so (Haiku bundles libc, libm, libpthread, etc. into libroot), so mapping the logical name libc to libroot.so is the right behavior. The placement is consistent with the surrounding OS-specific branches, and __HAIKU__ is the standard predefined macro for the Haiku toolchain. Since libroot.so is always present on Haiku, no additional error handling is needed. No functional, portability, or style concerns. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 31.5 AIC · ⌖ 10.1 AIC · ⊞ 10K

@am11am11 closed this Jul 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-meta-monocommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trungnt2910@am11@steveisok