Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 4bd63d9

Browse files
shiftylogicdanmoseley
authored andcommitted
Disable large memory Span::Clear test on Linux (for 2.0) (#20736)
* Disable large memory Span::Clear test on Linux * Patching the comment for this location
1 parent 029cf57 commit 4bd63d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/System.Memory/tests/Span/Clear.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,13 @@ public static void ClearValueTypeWithReferences()
226226
Assert.Equal<TestValueTypeWithReference>(expected, actual);
227227
}
228228

229+
// NOTE: ClearLongerThanUintMaxValueBytes test is constrained to run on Windows and MacOSX because it causes
230+
// problems on Linux due to the way deferred memory allocation works. On Linux, the allocation can
231+
// succeed even if there is not enough memory but then the test may get killed by the OOM killer at the
232+
// time the memory is accessed which triggers the full memory allocation.
229233
[Fact]
230234
[OuterLoop]
235+
[PlatformSpecific(TestPlatforms.Windows | TestPlatforms.OSX)]
231236
unsafe static void ClearLongerThanUintMaxValueBytes()
232237
{
233238
if (sizeof(IntPtr) == sizeof(long))

0 commit comments

Comments
 (0)