Skip to content

Commit d9be719

Browse files
authored
Remove 2GB allocations from MemoryStream_SeekOverflow_Throws. (#118400)
This test was allocating arrays that were nearly 2GB in size in order to attempt to test an edge case around seek overflowing. These large allocations are very unable in CI and started failing for Android + CoreCLR. The test is already disabled for Linux, for iOS, for tvOS, and partially for Windows. Rather than disable it yet again, let's just not test the very large allocation sizes. At this point the test has been disabled on so many platforms for being problematic we aren't getting much value from the large allocations.
1 parent 0ce54a5 commit d9be719

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/libraries/System.Runtime/tests/System.IO.Tests/MemoryStream/MemoryStreamTests.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,11 @@ from bufferContext in
9595
(10, 0),
9696
(10, 5),
9797
(10, 10),
98-
(Array.MaxLength, 0),
99-
(Array.MaxLength, Array.MaxLength)
10098
}
10199
select new object[] {mode, bufferContext.bufferSize, bufferContext.origin};
102100

103-
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))]
101+
[Theory]
104102
[MemberData(nameof(MemoryStream_PositionOverflow_Throws_MemberData))]
105-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "https://github.com/dotnet/runtime/issues/92467")]
106-
[ActiveIssue("https://github.com/dotnet/runtime/issues/100225", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.IsX64Process))]
107-
[ActiveIssue("https://github.com/dotnet/runtime/issues/100558", TestPlatforms.Linux)]
108103
public void MemoryStream_SeekOverflow_Throws(SeekMode mode, int bufferSize, int origin)
109104
{
110105
byte[] buffer = new byte[bufferSize];

0 commit comments

Comments
 (0)