diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/CoreLibraryAssemblyAttributesAreKept.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/CoreLibraryAssemblyAttributesAreKept.cs index 3ed67c91b7dccd..bec0e8fb46c0f3 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/CoreLibraryAssemblyAttributesAreKept.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/CoreLibraryAssemblyAttributesAreKept.cs @@ -10,7 +10,7 @@ namespace Mono.Linker.Tests.Cases.Attributes [SetupLinkerTrimMode("link")] // System.dll referenced by a dynamically (for example in TypeConverterAttribute on IComponent) // has unresolved references. - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [KeptAttributeInAssembly(PlatformAssemblies.CoreLib, typeof(AssemblyDescriptionAttribute))] [KeptAttributeInAssembly(PlatformAssemblies.CoreLib, typeof(AssemblyCompanyAttribute))] #if !NET diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/IVTUsed.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/IVTUsed.cs index a1b140666ca65a..d12a6fea3c8ac0 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/IVTUsed.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/IVTUsed.cs @@ -13,7 +13,7 @@ namespace Mono.Linker.Tests.Cases.Attributes // This is a bit fragile but it's used to test that ITV attribute is marked correctly [SetupLinkerTrimMode("link")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [KeptTypeInAssembly(PlatformAssemblies.CoreLib, typeof(InternalsVisibleToAttribute))] class IVTUsed { diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs index c5f3850a7060cc..1d891f48a11520 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnGenericParameterIsRemoved.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerArgument("--used-attrs-only", "true")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/AssemblyWithUnusedAttributeOnGenericParameter.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs index 159f45ad6a4b73..b34d10704a6c02 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Attributes/OnlyKeepUsed/UnusedAttributeOnReturnTypeIsRemoved.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Attributes.OnlyKeepUsed { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerArgument("--used-attrs-only", "true")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/AssemblyWithUnusedAttributeOnReturnParameterDefinition.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/ComponentModel/CustomTypeConvertor.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/ComponentModel/CustomTypeConvertor.cs index 42b2b9dae029c2..7c83a99ffcca91 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/ComponentModel/CustomTypeConvertor.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/ComponentModel/CustomTypeConvertor.cs @@ -57,7 +57,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c [Reference("System.dll")] // System.dll referenced by a dynamically (for example in TypeConverterAttribute on IComponent) // has unresolved references. - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] public class CustomTypeConvertor { public static void Main() diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/CppCLIAssemblyIsAnalyzed.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/CppCLIAssemblyIsAnalyzed.cs index 3102e709e61a92..c260bf5c94f309 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/CppCLIAssemblyIsAnalyzed.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/CppCLIAssemblyIsAnalyzed.cs @@ -9,7 +9,7 @@ namespace Mono.Linker.Tests.Cases.CppCLI { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] [ReferenceDependency("Dependencies/TestLibrary.dll")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("ManagedSide.dll", new[] { "Dependencies/CallCppCLIFromManagedRef.cs" })] [SetupCompileAfter("ManagedSide.dll", new[] { "Dependencies/CallCppCLIFromManaged.cs" }, references: new[] { "TestLibrary.dll" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/NonCopyActionWarnOnCppCLI.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/NonCopyActionWarnOnCppCLI.cs index 10beb4fce9880e..a300d3b558c149 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/NonCopyActionWarnOnCppCLI.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/CppCLI/NonCopyActionWarnOnCppCLI.cs @@ -9,7 +9,7 @@ namespace Mono.Linker.Tests.Cases.CppCLI { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] [ReferenceDependency("Dependencies/TestLibrary.dll")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerDefaultAction("copy")] [SetupLinkerAction("copyused", "TestLibrary")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/UnresolvedMembers.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/UnresolvedMembers.cs index 5a6e995a483bd4..415cdd876aee9c 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/UnresolvedMembers.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/DataFlow/UnresolvedMembers.cs @@ -15,7 +15,7 @@ namespace Mono.Linker.Tests.Cases.DataFlow // it would fail to JIT/run anyway. [SkipILVerify] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("UnresolvedLibrary.dll", new[] { "Dependencies/UnresolvedLibrary.cs" }, removeFromLinkerInput: true)] [ExpectedNoWarnings] class UnresolvedMembers diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethodInAssembly.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethodInAssembly.cs index 45a54eebfb10dd..81ab0a28e2a41a 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethodInAssembly.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/DynamicDependencies/DynamicDependencyMethodInAssembly.cs @@ -7,7 +7,7 @@ namespace Mono.Linker.Tests.Cases.DynamicDependencies [KeptMemberInAssembly("library.dll", "Mono.Linker.Tests.Cases.DynamicDependencies.Dependencies.DynamicDependencyMethodInAssemblyLibrary", ".ctor()")] [KeptMemberInAssembly("library.dll", "Mono.Linker.Tests.Cases.DynamicDependencies.Dependencies.DynamicDependencyMethodInAssemblyLibrary", "privateField")] [SetupCompileBefore("library.dll", new[] { "Dependencies/DynamicDependencyMethodInAssemblyLibrary.cs" })] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] public class DynamicDependencyMethodInAssembly { public static void Main() diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DimProvidedByRecursiveInterface.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DimProvidedByRecursiveInterface.cs index ba43a9abdd2686..a369880d506de8 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DimProvidedByRecursiveInterface.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/DimProvidedByRecursiveInterface.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/DimProvidedByRecursiveInterface.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs index cb237acb8a4d55..8fb73b436b10bc 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/InterfaceWithAttributeOnImplementation.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/InterfaceWithAttributeOnImpl.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/MultipleDimsProvidedByRecursiveInterface.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/MultipleDimsProvidedByRecursiveInterface.cs index e6c2055b133160..d90ba8edbec36c 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/MultipleDimsProvidedByRecursiveInterface.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/MultipleDimsProvidedByRecursiveInterface.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/MultipleDimsProvidedByRecursiveInterface.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/StaticDimProvidedByUnreferencedIfaceInHierarchy.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/StaticDimProvidedByUnreferencedIfaceInHierarchy.cs index 7d894eb292d588..05ab22e5348ad6 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/StaticDimProvidedByUnreferencedIfaceInHierarchy.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/DefaultInterfaceMethods/StaticDimProvidedByUnreferencedIfaceInHierarchy.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.DefaultInterfaceMethods { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/StaticDimProvidedByUnreferencedIfaceInHierarchy.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/InterfaceImplementedThroughBaseInterface.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/InterfaceImplementedThroughBaseInterface.cs index 634bd6185bb338..2a0e0859397738 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/InterfaceImplementedThroughBaseInterface.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/InterfaceImplementedThroughBaseInterface.cs @@ -11,7 +11,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerArgument("-a", "test.exe", "library")] [SetupLinkerArgument("-a", "library.dll", "library")] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndAssemblyPreserveAll.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndAssemblyPreserveAll.cs index 25034c1d7d18f2..0122c7dc36ade7 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndAssemblyPreserveAll.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndAssemblyPreserveAll.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] [KeptInterfaceOnTypeInAssemblyAttribute("library", diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveAll.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveAll.cs index 391be2cb9b9b8a..13b040ab087853 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveAll.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveAll.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] [KeptInterfaceOnTypeInAssembly("library", "Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor.Dependencies.NoInstanceCtorAndAssemblyPreserveAll_Lib/A", diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFields.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFields.cs index 8f49371541dd99..15a3ad738526f1 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFields.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFields.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] // The interfaces should be removed because the interface types are not marked diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFieldsWithInterfacesMarked.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFieldsWithInterfacesMarked.cs index 19a80a761e0bce..162ac4c8dd0c5f 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFieldsWithInterfacesMarked.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveFieldsWithInterfacesMarked.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_COMPILED")] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethods.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethods.cs index d22ce3403f728a..c84d3edd03946e 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethods.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethods.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] // The interfaces should be removed because the interface types are not marked diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethodsWithInterfacesMarked.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethodsWithInterfacesMarked.cs index 88ea83bb4587d4..b176afa019111d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethodsWithInterfacesMarked.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveMethodsWithInterfacesMarked.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_COMPILED")] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveNone.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveNone.cs index 6cc8a09275dedf..29f32f3e72706a 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveNone.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/OnReferenceType/NoInstanceCtor/NoInstanceCtorAndTypePreserveNone.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("library.dll", new[] { "Dependencies/NoInstanceCtorAndAssemblyPreserveAll_Lib.il" })] [RemovedInterfaceOnTypeInAssembly("library", "Mono.Linker.Tests.Cases.Inheritance.Interfaces.OnReferenceType.NoInstanceCtor.Dependencies.NoInstanceCtorAndAssemblyPreserveAll_Lib/A", diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/GenericInterfaceImplementedRecursively.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/GenericInterfaceImplementedRecursively.cs index 17f21597136428..02fae46b57f980 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/GenericInterfaceImplementedRecursively.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/GenericInterfaceImplementedRecursively.cs @@ -11,7 +11,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.RecursiveInterfaces { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/GenericInterfaceImplementedRecursively.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/InterfaceImplementedRecursively.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/InterfaceImplementedRecursively.cs index 3be089bf915dc9..5cf960a423a707 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/InterfaceImplementedRecursively.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/InterfaceImplementedRecursively.cs @@ -11,7 +11,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.RecursiveInterfaces { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [TestCaseRequirements(TestRunCharacteristics.SupportsDefaultInterfaceMethods, "Requires support for default interface methods")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/InterfaceImplementedRecursively.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/OverrideOfRecursiveInterfaceIsRemoved.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/OverrideOfRecursiveInterfaceIsRemoved.cs index 55d16c74d0448b..4ffe30a2068bb6 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/OverrideOfRecursiveInterfaceIsRemoved.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/RecursiveInterfaces/OverrideOfRecursiveInterfaceIsRemoved.cs @@ -11,7 +11,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.RecursiveInterfaces { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new string[] { "Dependencies/OverrideOfRecursiveInterfaceIsRemoved.il" })] [Kept] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/InstanceMethodsWithOverridesSwept.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/InstanceMethodsWithOverridesSwept.cs index 79563e1391dfad..400c7c0bd58be1 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/InstanceMethodsWithOverridesSwept.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Inheritance.Interfaces/StaticInterfaceMethods/InstanceMethodsWithOverridesSwept.cs @@ -17,7 +17,7 @@ namespace Mono.Linker.Tests.Cases.Inheritance.Interfaces.StaticInterfaceMethods /// Currently, the linker will always mark the .override method for instance methods, so there is not much testing required here. /// However, if that were to change, this test should be updated to verify that the .override is removed if the .interfaceImpl is kept. /// - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new string[] { "Dependencies/InstanceMethods.il" })] [Kept] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Libraries/LibraryWithUnresolvedInterfaces.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Libraries/LibraryWithUnresolvedInterfaces.cs index 834ad6876aae47..baadc626c5ffec 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Libraries/LibraryWithUnresolvedInterfaces.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Libraries/LibraryWithUnresolvedInterfaces.cs @@ -10,7 +10,7 @@ namespace Mono.Linker.Tests.Cases.Libraries [IgnoreTestCase("NativeAOT doesn't implement library trimming the same way", IgnoredBy = Tool.NativeAot)] [KeptAttributeAttribute(typeof(IgnoreTestCaseAttribute), By = Tool.Trimmer)] [SetupCompileBefore("copylibrary.dll", new[] { "Dependencies/CopyLibrary.cs" }, removeFromLinkerInput: true)] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerArgument("-a", "test.exe", "library")] [SetupLinkerArgument("--enable-opt", "ipconstprop")] [VerifyMetadataNames] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkAttributeErrorCases.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkAttributeErrorCases.cs index ef4d9cebfc8d63..d5ec6c04f4b87d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkAttributeErrorCases.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkAttributeErrorCases.cs @@ -7,7 +7,7 @@ namespace Mono.Linker.Tests.Cases.LinkAttributes { [SetupLinkAttributesFile("LinkAttributeErrorCases.xml")] [IgnoreLinkAttributes(false)] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileBefore("library.dll", new string[] { "Dependencies/EmbeddedAttributeErrorCases.cs" }, resources: new object[] { new string[] { "Dependencies/EmbeddedAttributeErrorCases.xml", "ILLink.LinkAttributes.xml" } })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkXml/LinkXmlErrorCases.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkXml/LinkXmlErrorCases.cs index 68fa608cc831de..76cd08a3d50401 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkXml/LinkXmlErrorCases.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkXml/LinkXmlErrorCases.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.LinkXml { [SetupLinkerDescriptorFile("LinkXmlErrorCases.xml")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerArgument("--verbose")] [ExpectedWarning("IL2001", "TypeWithNoFields", FileName = "LinkXmlErrorCases.xml", SourceLine = 3, SourceColumn = 6)] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyErrorCases.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyErrorCases.cs index ebbedc9a8dbbe8..35fcb36e6b87c2 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyErrorCases.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/PreserveDependencies/PreserveDependencyErrorCases.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.PreserveDependencies { [SetupCompileBefore("FakeSystemAssembly.dll", new[] { "Dependencies/PreserveDependencyAttribute.cs" })] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] class PreserveDependencyErrorCases { public static void Main() diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/References/Individual/CanSkipUnresolved.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/References/Individual/CanSkipUnresolved.cs index 813e66cc61064e..d282cc723731c1 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/References/Individual/CanSkipUnresolved.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/References/Individual/CanSkipUnresolved.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.References.Individual { [SetupCompileBefore("library1.dll", new[] { "Dependencies/CanSkipUnresolved_Library.cs" })] [SetupCompileAfter("library1.dll", new[] { "Dependencies/CanSkipUnresolved_Library.cs" }, defines: new[] { "EXCLUDE_STUFF" })] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] public class CanSkipUnresolved { static void Main() diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUnusedCodePath.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUnusedCodePath.cs index 9bb9b87e3b8f5e..8728295568e176 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUnusedCodePath.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUnusedCodePath.cs @@ -11,7 +11,7 @@ namespace Mono.Linker.Tests.Cases.References; [NoLinkedOutput] [SetupCompileBefore("missing.dll", new[] { "Dependencies/MissingAssembly.cs" })] [DeleteBefore("missing.dll")] -[SetupLinkerArgument("--skip-unresolved", "false")] +[SkipUnresolved(false)] public class MissingReferenceInUnusedCodePath { public static void Main() diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUsedCodePath.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUsedCodePath.cs index 0f374b7aebaa8a..215b718ae4544e 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUsedCodePath.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/References/MissingReferenceInUsedCodePath.cs @@ -11,7 +11,7 @@ namespace Mono.Linker.Tests.Cases.References; [NoLinkedOutput] [SetupCompileBefore("missing.dll", new[] { "Dependencies/MissingAssembly.cs" })] [DeleteBefore("missing.dll")] -[SetupLinkerArgument("--skip-unresolved", "false")] +[SkipUnresolved(false)] public class MissingReferenceInUsedCodePath { public static void Main() diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdb.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdb.cs index 4de554b7d3c64c..d9ec69ed14979c 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdb.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdb.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")] [ReferenceDependency("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")] [SetupLinkerLinkSymbols("false")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyAction.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyAction.cs index d33a7c02101f85..339f261c7b99ba 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyAction.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbCopyAction.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")] [ReferenceDependency("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")] [SetupLinkerLinkSymbols("false")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteAction.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteAction.cs index 876114af08f005..8219ff8c6fc9db 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteAction.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteAction.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")] [ReferenceDependency("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")] [SetupLinkerLinkSymbols("false")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteActionAndSymbolLinkingEnabled.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteActionAndSymbolLinkingEnabled.cs index 7b3e1910eacd73..970950502d90a8 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteActionAndSymbolLinkingEnabled.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithMdbDeleteActionAndSymbolLinkingEnabled.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")] [ReferenceDependency("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")] [SetupLinkerLinkSymbols("true")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdb.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdb.cs index 351053b2da3248..6d59abdae4e46d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdb.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdb.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("false")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabled.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabled.cs index cfbcb5a42862ef..ef10e42cbed3a5 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabled.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabled.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("true")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndDeterministicMvid.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndDeterministicMvid.cs index a8f728356e097c..08dfcd4a087204 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndDeterministicMvid.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndDeterministicMvid.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("true")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndNewMvid.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndNewMvid.cs index 080629f410b6a7..336c1e27e58e68 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndNewMvid.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbAndSymbolLinkingEnabledAndNewMvid.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("true")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyAction.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyAction.cs index 2e95a751904ea1..38027a2aee19a8 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyAction.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbCopyAction.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("false")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteAction.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteAction.cs index a4b4d40fe9e234..5a033f660528ef 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteAction.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteAction.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("false")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteActionAndSymbolLinkingEnabled.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteActionAndSymbolLinkingEnabled.cs index 00fcc0443fcefa..57fb809a051224 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteActionAndSymbolLinkingEnabled.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferenceWithPdbDeleteActionAndSymbolLinkingEnabled.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] [SetupLinkerLinkSymbols("true")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypes.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypes.cs index 0f01dfbea9dab8..dd33a0ec0dab6a 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypes.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypes.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")] [ReferenceDependency("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs index 8efc716a413b8f..401ca7dfd22711 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesAndSymbolLinkingEnabled.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithPdb/LibraryWithPdb.dll")] [ReferenceDependency("Dependencies/LibraryWithPdb/LibraryWithPdb.pdb")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs index a01aa0e80981a0..f3b05283c83297 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/Symbols/ReferencesWithMixedSymbolTypesWithMdbAndSymbolLinkingEnabled.cs @@ -9,7 +9,7 @@ namespace Mono.Linker.Tests.Cases.Symbols { [IgnoreTestCase("Test relies on checked-in binaries: https://github.com/dotnet/runtime/issues/78344")] [TestCaseRequirements(TestRunCharacteristics.TargetingNetFramework, "mdb files are not supported with .NET Core")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Reference("Dependencies/LibraryWithMdb/LibraryWithMdb.dll")] [ReferenceDependency("Dependencies/LibraryWithMdb/LibraryWithMdb.dll.mdb")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileILAssembly.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileILAssembly.cs index 692dfdd5a98fd8..97af216f1f8569 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileILAssembly.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/CanCompileILAssembly.cs @@ -4,7 +4,7 @@ namespace Mono.Linker.Tests.Cases.TestFramework { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("ILAssembly.dll", new[] { "Dependencies/ILAssemblySample.il" })] [KeptMemberInAssembly("ILAssembly.dll", "Mono.Linker.Tests.Cases.TestFramework.Dependencies.ILAssemblySample", "GiveMeAValue()")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationErrorsCanBeIgnored.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationErrorsCanBeIgnored.cs index 7a882a8817f4e4..9b97ab35266370 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationErrorsCanBeIgnored.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationErrorsCanBeIgnored.cs @@ -8,7 +8,7 @@ namespace Mono.Linker.Tests.Cases.TestFramework; [DisableILVerifyDiffing] // Needed to produce an il failure [IgnoreILFailure("Mono.Linker.Tests.Cases.TestFramework.Dependencies.AssemblyWithInvalidIL.GiveMeAValue() - ReturnMissing: Return value missing on the stack. - Offset IL_0000")] -[SetupLinkerArgument("--skip-unresolved", "true")] // needed due to the mscorlib shim +[SkipUnresolved(true)] // needed due to the mscorlib shim [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("ILAssembly.dll", new[] { "Dependencies/AssemblyWithInvalidIL.il" })] [KeptMemberInAssembly("ILAssembly.dll", "Mono.Linker.Tests.Cases.TestFramework.Dependencies.AssemblyWithInvalidIL", "GiveMeAValue()")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationWorks.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationWorks.cs index ce7b12e782521d..b20c25b50d466c 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationWorks.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/TestFramework/ILVerificationWorks.cs @@ -10,7 +10,7 @@ namespace Mono.Linker.Tests.Cases.TestFramework; [ExpectILFailure("Mono.Linker.Tests.Cases.TestFramework.Dependencies.AssemblyWithInvalidIL.GiveMeAValue()", "ReturnMissing: Return value missing on the stack", "Offset IL_0000")] -[SetupLinkerArgument("--skip-unresolved", "true")] // needed due to the mscorlib shim +[SkipUnresolved(true)] // needed due to the mscorlib shim [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("ILAssembly.dll", new[] { "Dependencies/AssemblyWithInvalidIL.il" })] [KeptMemberInAssembly("ILAssembly.dll", "Mono.Linker.Tests.Cases.TestFramework.Dependencies.AssemblyWithInvalidIL", "GiveMeAValue()")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/SecurityAttributeScope.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/SecurityAttributeScope.cs index 7ffe36146161b0..0fc0f60b57416d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/SecurityAttributeScope.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/SecurityAttributeScope.cs @@ -12,7 +12,7 @@ namespace Mono.Linker.Tests.Cases.TypeForwarding /// /// In order words, until https://github.com/dotnet/linker/issues/1703 is addressed this test will pass with or without the fix to update the scope on security attributes /// - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupLinkerArgument("--strip-security", "false")] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupLinkerAction("copy", "Library")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersModifiers.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersModifiers.cs index 9a2c3efea03478..76714b23228676 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersModifiers.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersModifiers.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.TypeForwarding { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] // Actions: // link - This assembly, TypeForwarderModifiersLibDef.dll and TypeForwardersModifiersLib.dll [SetupLinkerDefaultAction("link")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersRewrite.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersRewrite.cs index 1dffb287e43a5e..0b32f639cfe6bb 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersRewrite.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/TypeForwarding/TypeForwardersRewrite.cs @@ -7,7 +7,7 @@ namespace Mono.Linker.Tests.Cases.TypeForwarding // Actions: // link - This assembly, Forwarder.dll and Implementation.dll - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [SetupCompileArgument("/unsafe")] [SetupCompileBefore("Forwarder.dll", new[] { "Dependencies/TypeForwardersRewriteLib.cs" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/EndScopeOnMethoEnd.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/EndScopeOnMethoEnd.cs index 37c21de319b250..44bef05d38df9d 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/EndScopeOnMethoEnd.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/EndScopeOnMethoEnd.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/EndScopeOnMethod.il" })] public class EndScopeOnMethoEnd diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs index 1d3363d46da65f..5ff203ca855a17 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBlock/UninitializedLocals.cs @@ -5,7 +5,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBlock { [SetupCSharpCompilerToUse("csc")] [SetupCompileArgument("/optimize+")] - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("IL_ASSEMBLY_AVAILABLE")] [SetupCompileBefore("library.dll", new[] { "Dependencies/LocalsWithoutStore.il" })] [SetupLinkerArgument("--enable-opt", "ipconstprop")] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/DoesNotApplyToCopiedAssembly2.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/DoesNotApplyToCopiedAssembly2.cs index 7144647a374e62..8d726ee9f80088 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/DoesNotApplyToCopiedAssembly2.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/DoesNotApplyToCopiedAssembly2.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBody { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("OTHER_INCLUDED")] [SetupLinkerAction("copy", "other")] [SetupCompileBefore("other.dll", new[] { "Dependencies/OtherAssemblyNoInstanceCtor.il" })] diff --git a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/LinkedOtherIncludedLibraryNoInstanceCtor.cs b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/LinkedOtherIncludedLibraryNoInstanceCtor.cs index 0a9af1a1a63e3c..bbfdfe0fc3dea5 100644 --- a/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/LinkedOtherIncludedLibraryNoInstanceCtor.cs +++ b/src/tools/illink/test/Mono.Linker.Tests.Cases/UnreachableBody/LinkedOtherIncludedLibraryNoInstanceCtor.cs @@ -3,7 +3,7 @@ namespace Mono.Linker.Tests.Cases.UnreachableBody { - [SetupLinkerArgument("--skip-unresolved", "true")] + [SkipUnresolved(true)] [Define("OTHER_INCLUDED")] #if NET [SetupLinkerArgument("-a", "other.dll", "visible")] diff --git a/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs b/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs index e8e4360312cb16..412c9fcc636ebd 100644 --- a/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs +++ b/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TestCaseMetadataProvider.cs @@ -31,7 +31,7 @@ public virtual TestCaseLinkerOptions GetLinkerOptions(NPath inputPath) LinkSymbols = GetOptionAttributeValue(nameof(SetupLinkerLinkSymbolsAttribute), string.Empty), TrimMode = GetOptionAttributeValue(nameof(SetupLinkerTrimModeAttribute), null), DefaultAssembliesAction = GetOptionAttributeValue(nameof(SetupLinkerDefaultActionAttribute), null), - SkipUnresolved = GetOptionAttributeValue(nameof(SkipUnresolvedAttribute), false), + SkipUnresolved = GetOptionAttributeValue(nameof(SkipUnresolvedAttribute), true), StripDescriptors = GetOptionAttributeValue(nameof(StripDescriptorsAttribute), true), StripSubstitutions = GetOptionAttributeValue(nameof(StripSubstitutionsAttribute), true), StripLinkAttributes = GetOptionAttributeValue(nameof(StripLinkAttributesAttribute), true), diff --git a/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs b/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs index fa425b330d3d08..b629358445f694 100644 --- a/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs +++ b/src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TrimmingArgumentBuilder.cs @@ -121,11 +121,8 @@ public virtual void AddAssemblyAction(string action, string assembly) public virtual void AddSkipUnresolved(bool skipUnresolved) { - if (skipUnresolved) - { - Append("--skip-unresolved"); - Append("true"); - } + Append("--skip-unresolved"); + Append(skipUnresolved.ToString()); } public virtual void AddStripDescriptors(bool stripDescriptors)