From 1f6df07fbc79dc7e7100330abcff523672ca3547 Mon Sep 17 00:00:00 2001 From: Pranav Senthilnathan Date: Tue, 6 May 2025 09:34:47 -0700 Subject: [PATCH] Remove OOM test --- .../SlhDsa/SlhDsaContractTests.cs | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs index 33c22de91afbc0..5b1eb6b41969bc 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaContractTests.cs @@ -605,30 +605,6 @@ public static void ExportPkcs8PrivateKey_Resizes(SlhDsaAlgorithm algorithm) AssertExtensions.SequenceEqual(pkcs8.PrivateKey.Span, exportedPkcs8.PrivateKey.Span); } - [Theory] - [MemberData(nameof(SlhDsaTestData.AlgorithmsData), MemberType = typeof(SlhDsaTestData))] - public static void ExportPkcs8PrivateKey_ResizeTerminates(SlhDsaAlgorithm algorithm) - { - using SlhDsaMockImplementation slhDsa = SlhDsaMockImplementation.Create(algorithm); - - int previousSize = -1; - slhDsa.TryExportPkcs8PrivateKeyCoreHook = (Span destination, out int bytesWritten) => - { - // Return false to force a resize - bool ret = false; - - AssertExtensions.GreaterThan(destination.Length, previousSize); - previousSize = destination.Length; - bytesWritten = 0; - - return ret; - }; - - // The loop should terminate with an OverflowException or OutOfMemoryException - AssertExtensions.ThrowsAny(() => slhDsa.ExportPkcs8PrivateKey()); - AssertExtensions.GreaterThan(slhDsa.TryExportPkcs8PrivateKeyCoreCallCount, 0); - } - [Theory] [MemberData(nameof(SlhDsaTestData.AlgorithmsData), MemberType = typeof(SlhDsaTestData))] public static void ExportPkcs8PrivateKey_IgnoreReturnValue(SlhDsaAlgorithm algorithm)