From 6b33766a9cbb1c3070f253538b32eb67d09fd617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 3 Apr 2026 21:31:03 +0900 Subject: [PATCH 1/3] Fix SkipOnCoreClr generating unreachable test code in standalone runner SkipOnCoreClrAttribute handling in XUnitWrapperGenerator initialized skippedTestPlatforms, skippedConfigurations, and skippedTestModes to their respective .Any values. When the attribute only specified one dimension (e.g., RuntimeTestModes.InterpreterActive), the others remained at Any. This caused DecorateWithSkipOnCoreClrConfiguration to compute targetPlatform & ~Any = 0, which produced a literal (false) platform condition, making the test body unreachable dead code. The standalone runner would return 100 (pass) without ever executing the test. Fix by initializing the defaults to 0 (meaning 'not specified'), and updating the 'no args given' check accordingly. Now unspecified dimensions correctly mean 'don't skip'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../XUnitWrapperGenerator/XUnitWrapperGenerator.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs b/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs index 42f35185e43a28..6ff36425de25b7 100644 --- a/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs +++ b/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs @@ -843,9 +843,9 @@ private static IEnumerable GetTestMethodInfosForMethod(IMethodSymbol continue; } - Xunit.TestPlatforms skippedTestPlatforms = Xunit.TestPlatforms.Any; - Xunit.RuntimeConfiguration skippedConfigurations = Xunit.RuntimeConfiguration.Any; - Xunit.RuntimeTestModes skippedTestModes = Xunit.RuntimeTestModes.Any; + Xunit.TestPlatforms skippedTestPlatforms = 0; + Xunit.RuntimeConfiguration skippedConfigurations = 0; + Xunit.RuntimeTestModes skippedTestModes = 0; for (int i = 1; i < filterAttribute.ConstructorArguments.Length; i++) { @@ -871,9 +871,9 @@ void ReadSkippedInformationFromSkipOnCoreClrAttributeArgument(TypedConstant argu } } - if (skippedTestModes == Xunit.RuntimeTestModes.Any - && skippedConfigurations == Xunit.RuntimeConfiguration.Any - && skippedTestPlatforms == Xunit.TestPlatforms.Any) + if (skippedTestModes == 0 + && skippedConfigurations == 0 + && skippedTestPlatforms == 0) { testInfos = FilterForSkippedRuntime(testInfos, (int)Xunit.TestRuntimes.CoreCLR, options); } From 498b772da13b0e01cf811040cebc1f6d611a9d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Sun, 5 Apr 2026 21:30:40 -0700 Subject: [PATCH 2/3] Add ActiveIssue attribute to Validate_Managed_IMallocSpy test Mark test as active issue due to dependency on marshalled calli. --- src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs b/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs index 33f27f520d342a..0aa4edc382b4e1 100644 --- a/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs +++ b/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs @@ -42,6 +42,7 @@ public virtual void PostHeapMinimize() { } [Fact] [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/126567")] public static unsafe void Validate_Managed_IMallocSpy() { Console.WriteLine($"Running {nameof(Validate_Managed_IMallocSpy)}..."); From d0ac78cf41912bb79ad2aa676ae69f000e5361c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Sun, 5 Apr 2026 21:30:48 -0700 Subject: [PATCH 3/3] Add ActiveIssueAttribute for multithreading support --- src/tests/JIT/Methodical/tailcall_v4/hijacking.il | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tests/JIT/Methodical/tailcall_v4/hijacking.il b/src/tests/JIT/Methodical/tailcall_v4/hijacking.il index 481f9ea57a49cd..4a5cbf7fb926f5 100644 --- a/src/tests/JIT/Methodical/tailcall_v4/hijacking.il +++ b/src/tests/JIT/Methodical/tailcall_v4/hijacking.il @@ -282,6 +282,10 @@ string('needs triage') int32(0x11E) // AnyJitOptimizationStress } + .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.TestPlatforms) = { + string('System.Threading.Thread.ThrowIfMultithreadingIsNotSupported: PlatformNotSupportedException') + int32(0x400) // TestPlatforms.Browser + } .entrypoint // Code size 300 (0x12c) .maxstack 5