Skip to content

[Android] Fix Android test asset extraction file handle leak - #138404

Open
simonrozsival wants to merge 1 commit into
mainfrom
simonrozsival-api24-xml-missing-fixtures
Open

simonrozsival wants to merge 1 commit into
mainfrom
simonrozsival-api24-xml-missing-fixtures

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: ef3612231ea58572ba0ea66a003a5ea1eb1314d2

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Full System.Private.Xml suite passed on Android arm64 API 24, 29 and 35; System.Numerics.Vectors passed on API 35.
↓ Android x64 and the extraction-error path were not directly tested.
Diagnosis confidence 9/10 ↑ The API 24 reproduction logged Too many open files during extraction; the previous code did not close output streams.
Evidence fit 8/10 ↑ The local reproduction had missing fixtures and 368 failures; the same suite passed after rebuilding with the fix.
↓ The reason the earlier API 29 and NativeAOT CI legs passed remains unverified.

Motivation

@matouskozak's earlier CI investigation surfaced Android API 24 library failures. Locally, asset extraction hit Too many open files, leaving XML fixtures missing and causing 368 test failures.

Changes

  • Close each extracted asset's output stream with try-with-resources.
  • Propagate extraction failures instead of logging them and continuing with incomplete assets.

Validation

  • ./build.sh tasks — passed.
  • ./dotnet.sh msbuild src/libraries/System.Private.Xml/tests/System.Private.Xml.Tests.csproj -target:Build -p:Configuration=Release -p:TargetOS=android -p:TargetArchitecture=arm64 -p:RuntimeFlavor=coreclr -p:TasksConfiguration=Release -nodeReuse:false — passed.
  • XHarness System.Private.Xml on Android arm64 API 24, 29 and 35 — each passed: 49,012 passed, 4 skipped, 0 failed.
  • XHarness System.Numerics.Vectors on Android arm64 API 35 — passed: 7,571 passed, 0 failed.

Note

This PR description was generated with GitHub Copilot.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@simonrozsival simonrozsival changed the title Fix Android test asset extraction file handle leak [Android] Fix Android test asset extraction file handle leak Nov 27, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-android': @vitek-karas, @simonrozsival, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant