Skip to content

Conversation

@csa7mdm
Copy link

@csa7mdm csa7mdm commented Dec 15, 2025

Fixes #120526

Description

This PR addresses failing UDP SendTo tests on Android arm/arm64 and other restricted environments where missing default routes cause NetworkUnreachable errors, preventing implicit binds.

Changes:

  • Datagram_UDP_ShouldImplicitlyBindLocalEndpoint: Updated to use a loopback UDP endpoint (via new helper CreateLoopbackUdpEndpoint). This ensures the test is self-contained and deterministic, avoiding dependency on external routing.
  • Datagram_UDP_AccessDenied_Throws_DoesNotBind: Updated to accept SocketError.NetworkUnreachable or SocketError.HostUnreachable on Android, iOS, tvOS, and MacCatalyst. These platforms may fail with unreachable errors before AccessDenied when the network is restricted, while still satisfying the test's core requirement that the socket remains unbound.

Verification

Ahmed Mustafa added 5 commits December 9, 2025 19:52
This change implements a peephole optimization in Lowering::LowerShift to combine consecutive right shifts (RSH/RSZ) with constant amounts. It specifically addresses cases where division optimization introduces redundant shifts, such as (x / c1) / c2.
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 15, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[android][arm64] System.Net.Sockets.Tests.SendTo_SyncForceNonBlocking.Datagram_UDP_ShouldImplicitlyBindLocalEndpoint fails with NetworkUnreachable

1 participant