diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs index 8f0b7127038f14..409a052e672f8a 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallString.cs @@ -10,6 +10,8 @@ namespace Mono.Linker.Tests.Cases.Reflection [Reference ("System.Core.dll")] [ExpectedNoWarnings] [KeptPrivateImplementationDetails ("ThrowSwitchExpressionException")] + [KeptAttributeAttribute(typeof(UnconditionalSuppressMessageAttribute))] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class ExpressionCallString { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs index 12adc8f07bf3f9..6916935480fd1f 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Reflection/ExpressionCallStringAndLocals.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Cases.Expectations.Metadata; @@ -7,6 +8,8 @@ namespace Mono.Linker.Tests.Cases.Reflection { [Reference ("System.Core.dll")] [ExpectedNoWarnings] + [KeptAttributeAttribute (typeof (UnconditionalSuppressMessageAttribute))] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class ExpressionCallStringAndLocals { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs index dc0d349c3c9b80..fffc017345a6e6 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/AddSuppressionsBeforeAttributeRemoval.cs @@ -9,6 +9,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression [SetupLinkAttributesFile ("AddSuppressionsBeforeAttributeRemoval.xml")] [ExpectedNoWarnings] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class AddSuppressionsBeforeAttributeRemoval { [Kept] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs index a5cb25f761348f..c357ba3c17b2b5 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsFeatureSubstitutions.cs @@ -13,6 +13,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression [SetupLinkerArgument ("--feature", "Feature", "false")] [ExpectedNoWarnings] [SkipKeptItemsValidation] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class DetectRedundantSuppressionsFeatureSubstitutions { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs index 884ceb4a6c81b5..f507fdfc3372cc 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsInMembersAndTypes.cs @@ -10,6 +10,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { [ExpectedNoWarnings] [SkipKeptItemsValidation] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class DetectRedundantSuppressionsInMembersAndTypes { public static void Main () diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs index caaa05a6a0bce2..df1634b0cd1a4c 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/DetectRedundantSuppressionsTrimmedMembersTarget.cs @@ -23,6 +23,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression { [ExpectedNoWarnings] [SkipKeptItemsValidation] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] class DetectRedundantSuppressionsTrimmedMembersTarget { [ExpectedWarning ("IL2072")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs index d00ac7d68fb484..c0098d1d1ff59d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Warnings/WarningSuppression/SuppressWarningsInMembersAndTypesUsingTarget.cs @@ -17,6 +17,7 @@ namespace Mono.Linker.Tests.Cases.Warnings.WarningSuppression #endif [SkipKeptItemsValidation] [LogDoesNotContain ("TriggerUnrecognizedPattern()")] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class SuppressWarningsInMembersAndTypesUsingTarget { /// @@ -83,6 +84,7 @@ void Warning4 () } [ExpectedNoWarnings] + [UnconditionalSuppressMessage ("AOT", "IL3050", Justification = "These tests are not targeted at AOT scenarios")] public class WarningsInMembers { public void Method ()