Repository navigation
[tests] Remove obsolete Ping regression test - #13702
Conversation
Context: #13642 Android apps cannot open raw ICMP sockets, so Ping.Send() runs /system/bin/ping and waits only `timeout` for the process to start, ping, and exit. With a 1000ms timeout, slow process launch on an overloaded emulator returns IPStatus.TimedOut without any ICMP loss. Use a 30s timeout: loopback replies immediately, so it only bounds the failure path. Keep asserting IPStatus.Success so the end-to-end Process.Start()/SystemNative coverage from #11530 is preserved, and report elapsed time on failure. Co-authored-by: Copilot App <[email protected]>
Context: #13642 The previous commit's comment overstated the cause. In the pinned runtime, Ping.SendWithPingUtility() calls Process.Start() before WaitForExit(timeout), so fork/exec is outside the wait; child startup, the ICMP round trip, exit, and SIGCHLD-driven reaping are inside it. Ping also reports TimedOut when ping exits 1 or 2 after `-W ceil(timeout/1s)`. All three CI failures were in the NativeAOT run; the cause remains unproven. Keep the end-to-end IPStatus.Success assertion with a 30s budget that only bounds the failure path, and add ProcessStartAndWaitForExit, which exercises the same Process.Start()/WaitForExit() path without ICMP so a future failure can be attributed to process handling or to ping. Co-authored-by: Copilot App <[email protected]>
Context: #13642 Context: #11531 Context: #11537 Context: #12010 PingLocalhost was added to catch a missing SystemNative entry in the CoreCLR precompiled P/Invoke table. BCL P/Invokes no longer use that table, and the table generator was subsequently removed, so the flaky ICMP-dependent test no longer guards that failure mode. Remove it and its explicit project inclusion; this also removes end-to-end Ping coverage from this suite. Validation: git diff --check and xmllint --noout on the test project passed. The Release SDK build was stopped when this became a test-only deletion; no device run was performed. Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for removing the obsolete ping regression test and its compile entry.
No open issues 🎉
What changed in this PR
Removes the flaky PingLocalhost device test from the .NET for Android test suite now that CoreCLR no longer uses the hand-maintained native-symbol table behind the original regression.
Changes:
- Deletes the loopback ping test and its explicit project compile entry.
- Intentionally removes end-to-end
Ping.Send()coverage without claiming to resolve the intermittent timeouts.
| File | Description |
|---|---|
| tests/Mono.Android-Tests/Mono.Android-Tests/System.Net.NetworkInformation/PingTest.cs | Deletes the obsolete ping regression test. |
| tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj | Removes the deleted test’s compile entry. |
Review effort: Balanced
|
/review |
|
✅ Android PR Reviewer completed successfully!
|
There was a problem hiding this comment.
Code assessment: no findings — 0 errors, 0 warnings, 0 suggestions.
The deletion is internally consistent: PingTest.cs and its explicit Compile entry are both removed, default compile items are disabled, and no remaining C# or project references to the fixture were found under src/ or tests/. The current CoreCLR resolver uses dlsym, consistent with retiring coverage for the hand-maintained P/Invoke table. The description appropriately acknowledges that this removes end-to-end Ping.Send() coverage rather than proving or fixing the timeout's cause. No production runtime behavior is changed.
CI verification is incomplete. All 39 head-commit GitHub checks report success, including the aggregate dotnet-android check for build 1693173. Direct Azure build verification was blocked by the CLI's authentication requirement; the timeline query also failed during CLI initialization. I therefore cannot independently confirm the Azure build result or non-gating device-test outcomes. Linked issue details were not independently available through the exposed GitHub tools. No local build or device tests were run for this review.
No inline comments were queued: the diff consists entirely of deletions, so there are no added or modified lines eligible under the requested commenting constraints. No code changes are requested.
Generated by Android PR Reviewer for #13702 · copilot · gpt61 · 17 AIC · ⌖ 4.89 AIC · ⊞ 21K
Comment /review to run again
Fixes: #13642
Context: #11530
PingTest.PingLocalhostwas added in #11531 afterPing.Send()crashed while starting a process because the hand-maintained CoreCLR BCL P/Invoke table lackedSystemNative_IsAtomicNonInheritablePipeCreationSupported(#11530).#11537 stopped serving BCL P/Invokes from that table, #12010 removed CoreCLR's table and generator, and #13116 later simplified the resolver to use dynamic symbol lookup. The test no longer guards against the original table-drift failure.
The test intermittently returned
TimedOutin NativeAOT device CI: 1682607, 1681205, and 1672500. Two passed on retry of the same commit; the cause remains unproven. Remove the test and its project entry instead of relying on the flaky loopback-ICMP assertion. This intentionally removes end-to-endPing.Send()coverage; it does not establish why ping timed out.Validation
git diff origin/main...HEAD --check— passed.xmllint --noout tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj— passed../dotnet-local.sh msbuild tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj -getItem:Compile -nologo -p:Configuration=Release -p:TargetFramework=net12.0-android— passed; the evaluated Compile items do not includePingTest.cs.make leeroy CONFIGURATION=Release— passed../dotnet-local.sh build tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj -c Release -v:minimal— passed with 78 warnings and no errors.