From f64e6453e1f78cc68b94d8949e1fb3088a299e60 Mon Sep 17 00:00:00 2001 From: mdh1418 Date: Thu, 6 Oct 2022 17:33:23 -0400 Subject: [PATCH 1/2] [test][tvos] Disable InvalidIVSizes overflow case for tvos --- .../AlgorithmImplementations/AES/AesContractTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs index 1b4f6032248356..829685f43e5212 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs @@ -161,7 +161,7 @@ public static void ValidCFBFeedbackSizes(int feedbackSize) } } - [Theory] + [ConditionalTheory] [InlineData(64, false)] // smaller than default BlockSize [InlineData(129, false)] // larger than default BlockSize // Skip on .NET Framework because change is not ported https://github.com/dotnet/runtime/issues/21236 @@ -171,6 +171,9 @@ public static void InvalidIVSizes(int invalidIvSize, bool skipOnNetfx) if (skipOnNetfx && PlatformDetection.IsNetFramework) return; + if (PlatformDetection.IstvOS && invalidIvSize == 536870928) + throw new SkipTestException($"This test case flakily crashes tvOS arm64"); + using (Aes aes = AesFactory.Create()) { aes.GenerateKey(); From 40ab399dc3290059f1069f3217493917325a7977 Mon Sep 17 00:00:00 2001 From: mdh1418 Date: Thu, 6 Oct 2022 18:26:40 -0400 Subject: [PATCH 2/2] Attach issue and import XUnitExtensions to skip test --- .../AlgorithmImplementations/AES/AesContractTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs index 829685f43e5212..682a2d673c34e5 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using Test.Cryptography; +using Microsoft.DotNet.XUnitExtensions; using Xunit; namespace System.Security.Cryptography.Encryption.Aes.Tests @@ -172,7 +173,7 @@ public static void InvalidIVSizes(int invalidIvSize, bool skipOnNetfx) return; if (PlatformDetection.IstvOS && invalidIvSize == 536870928) - throw new SkipTestException($"This test case flakily crashes tvOS arm64"); + throw new SkipTestException($"https://github.com/dotnet/runtime/issues/76728 This test case flakily crashes tvOS arm64"); using (Aes aes = AesFactory.Create()) {