From e9613954fd94bf3ef2f79745975cc3e8c9c46873 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Mon, 9 Aug 2021 19:28:52 -0600 Subject: [PATCH 1/2] Disable 2 Array tests on 2 distros --- .../System.Runtime/tests/System/ArrayTests.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime/tests/System/ArrayTests.cs b/src/libraries/System.Runtime/tests/System/ArrayTests.cs index a8930703a02d6..09e0f07a32573 100644 --- a/src/libraries/System.Runtime/tests/System/ArrayTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArrayTests.cs @@ -4746,7 +4746,14 @@ public static void Copy_LargeMultiDimensionalArray() // If this test is run in a 32-bit process, the large allocation will fail. if (IntPtr.Size != sizeof(long)) { - return; + throw new SkipTestException("Unable to allocate enough memory"); + } + + if (PlatformDetection.IsUbuntu1804 || PlatformDetection.IsSLES) + { + // On these platforms, occasionally the OOM Killer will terminate the + // tests when they're using ~1GB, before they complete. + throw new SkipTestException("Unable to allocate enough memory"); } short[,] a = AllocateLargeMDArray(2, 2_000_000_000); @@ -4765,7 +4772,14 @@ public static void Clear_LargeMultiDimensionalArray() // If this test is run in a 32-bit process, the large allocation will fail. if (IntPtr.Size != sizeof(long)) { - return; + throw new SkipTestException("Unable to allocate enough memory"); + } + + if (PlatformDetection.IsUbuntu1804 || PlatformDetection.IsSLES) + { + // On these platforms, occasionally the OOM Killer will terminate the + // tests when they're using ~1GB, before they complete. + throw new SkipTestException("Unable to allocate enough memory"); } short[,] a = AllocateLargeMDArray(2, 2_000_000_000); From 962ceaa8626352ea1d7289a5ed0959f3f8e62b72 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Tue, 10 Aug 2021 09:36:06 -0600 Subject: [PATCH 2/2] Update string --- src/libraries/System.Runtime/tests/System/ArrayTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime/tests/System/ArrayTests.cs b/src/libraries/System.Runtime/tests/System/ArrayTests.cs index 09e0f07a32573..b7bdc5fab3583 100644 --- a/src/libraries/System.Runtime/tests/System/ArrayTests.cs +++ b/src/libraries/System.Runtime/tests/System/ArrayTests.cs @@ -4753,7 +4753,7 @@ public static void Copy_LargeMultiDimensionalArray() { // On these platforms, occasionally the OOM Killer will terminate the // tests when they're using ~1GB, before they complete. - throw new SkipTestException("Unable to allocate enough memory"); + throw new SkipTestException("Prone to OOM killer"); } short[,] a = AllocateLargeMDArray(2, 2_000_000_000); @@ -4779,7 +4779,7 @@ public static void Clear_LargeMultiDimensionalArray() { // On these platforms, occasionally the OOM Killer will terminate the // tests when they're using ~1GB, before they complete. - throw new SkipTestException("Unable to allocate enough memory"); + throw new SkipTestException("Prone to OOM killer"); } short[,] a = AllocateLargeMDArray(2, 2_000_000_000);