Skip to content

Require hardlink support for tar symlink containment test - #136469

Merged
rzikm merged 1 commit into
dotnet:mainfrom
rzikm:rzikm/android-tar-extraction-regression
Oct 27, 2026
Merged

rzikm merged 1 commit into
dotnet:mainfrom
rzikm:rzikm/android-tar-extraction-regression

Conversation

@rzikm

@rzikm rzikm commented Oct 26, 2026

Copy link
Copy Markdown
Member

ExtractToDirectory_HardlinkToSymlink_DoesNotEscape, added in #135748, fails on Android because hardlink creation is denied before extraction reaches c/d. Require the existing hardlink-capability check alongside the symlink check, matching neighboring hardlink tests, rather than broadening the expected exception.

Keep the exact IOException assertion on supported filesystems and check that neither the actual outside target (root/d) nor dest/d is created. No product behavior changes.

Validation:

  • .\build.cmd clr+libs -rc release via subst R:: passed, zero warnings or errors.
  • .\dotnet.cmd build src\libraries\System.Formats.Tar\tests\System.Formats.Tar.Tests.csproj /t:Test /p:RuntimeConfiguration=Release: passed, 7,102 tests, zero failures or skips; the affected test executed and passed.

Android/NativeAOT was not run locally.

Note

This pull request was generated by GitHub Copilot.

Preserve the exact IOException expectation on capable filesystems and assert that extraction does not create the file outside the destination.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

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

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@rzikm
rzikm merged commit 57caa14 into dotnet:main Oct 27, 2026
85 of 87 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants