Add tar tests for >8GB file entries using simulated streams#123091
Merged
Add tar tests for >8GB file entries using simulated streams#123091
Conversation
Co-authored-by: rzikm <32671551+rzikm@users.noreply.github.com>
Co-authored-by: rzikm <32671551+rzikm@users.noreply.github.com>
Co-authored-by: rzikm <32671551+rzikm@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add tar test for custom stream simulating large file entry
Add tar tests for >8GB file entries using simulated streams
Jan 12, 2026
3 tasks
Member
|
@copilot The two tests look almost identical, can you deduplicate them using additional |
Member
|
@copilot can you try again? |
Copilot stopped work on behalf of
rzikm due to an error
January 14, 2026 11:14
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds automated test coverage for tar archives containing file entries larger than 8GB, addressing a gap identified in PR #88280. The tests use SimulatedDataStream and ConnectedStreams to validate large file handling without requiring significant disk space or memory resources.
Changes:
- Adds comprehensive test class with parallel writer/reader pattern for testing >8GB tar entries
- Tests cover PAX and GNU formats (which support unlimited file sizes) with both sync and async APIs
- Includes necessary dependencies for
ConnectedStreamsinfrastructure in project file
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| TarWriter.WriteEntry.LargeFiles.Tests.cs | New test class implementing parallel streaming tests for large file entries using simulated streams |
| System.Formats.Tar.Tests.csproj | Adds references to ConnectedStreams and supporting buffer utilities (ArrayBuffer, MultiArrayBuffer, StreamBuffer) |
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Show resolved
Hide resolved
src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.LargeFiles.Tests.cs
Outdated
Show resolved
Hide resolved
Member
|
@copilot address code review comments |
Copilot stopped work on behalf of
rzikm due to an error
January 14, 2026 18:32
Member
|
/ba-g failing test is #123216 |
alinpahontu2912
approved these changes
Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds automated tests for tar archives with >8GB file entries using
SimulatedDataStreamandConnectedStreamsto avoid materializing large data. Previous manual tests required actual disk space and were unsuitable for CI.Tests use parallel writer/reader pattern where:
SimulatedDataStream(generates dummy data pattern without allocation)ConnectedStreams.CreateUnidirectional()(in-memory pipe with bounded buffer)Covers PAX and GNU formats at
LegacyMaxFileSize + 1(8GB + 1) testing both sync and async APIs.Customer Impact
N/A - test infrastructure only. Enables CI validation of >8GB tar entry handling without resource constraints.
Regression
No - this adds test coverage for existing functionality fixed in PR #88280.
Testing
8 tests added (4 scenarios × 2 sync/async variants), all passing in ~68 seconds with no disk/memory overhead.
Risk
Very low - test-only changes with no production code modifications. Added dependencies (
ArrayBuffer,MultiArrayBuffer,StreamBuffer) are existing, stable utilities used byConnectedStreams.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.