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 1b4f603224835..682a2d673c34e 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 @@ -161,7 +162,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 +172,9 @@ public static void InvalidIVSizes(int invalidIvSize, bool skipOnNetfx) if (skipOnNetfx && PlatformDetection.IsNetFramework) return; + if (PlatformDetection.IstvOS && invalidIvSize == 536870928) + throw new SkipTestException($"https://github.com/dotnet/runtime/issues/76728 This test case flakily crashes tvOS arm64"); + using (Aes aes = AesFactory.Create()) { aes.GenerateKey();