From c8c8b4207792546a6c153133cc332fc617699809 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Jul 2026 19:28:10 +0000 Subject: [PATCH 1/2] Initial plan From a1ee7d5ddd6deff295ebc0ae97a68a4aacee8459 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Jul 2026 19:35:27 +0000 Subject: [PATCH 2/2] Fix SuppressGCTransitionNegativeTest: use GCStressIncompatible instead of SkipOnCoreClr The test sets CLRTestExitCode to a crash exit code, so an XUnit-level skip (which returns 100) conflicts with the expected exit code. Use the process-level GCStressIncompatible mechanism instead. Also document this requirement in requiresprocessisolation.md. Fixes #131667 Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com> --- .../testing/coreclr/requiresprocessisolation.md | 11 +++++++++++ .../SuppressGCTransitionNegativeTest.cs | 1 - .../SuppressGCTransitionNegativeTest.csproj | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/workflow/testing/coreclr/requiresprocessisolation.md b/docs/workflow/testing/coreclr/requiresprocessisolation.md index 596af60acaf0db..249a141cfae70a 100644 --- a/docs/workflow/testing/coreclr/requiresprocessisolation.md +++ b/docs/workflow/testing/coreclr/requiresprocessisolation.md @@ -176,6 +176,16 @@ Tests that depend on the framework itself being compiled with non-default settin (e.g., `UseSystemResourceKeys`) must run in a process whose runtime matches those settings. +### 30. Project sets `` to a non-default value + +`CLRTestExitCode` is checked by the test wrapper script at the process level. Tests +that expect a specific non-default exit code (e.g., a crash exit code such as +`COR_E_EXECUTIONENGINE`) must not use XUnit-level skip attributes like +`[SkipOnCoreClr]` for any of their skip conditions, because an XUnit-level skip +returns exit code 100, which conflicts with the expected custom exit code. All skip +logic for such tests must use process-level mechanisms (e.g., `GCStressIncompatible`, +`JitOptimizationSensitive`). + ## Summary of Project-File-Based Triggers If the project file contains **any** of the following MSBuild properties or items, set @@ -202,6 +212,7 @@ If the project file contains **any** of the following MSBuild properties or item | `CrossGenTest` (set to `false`) | Crossgen skip needed | | `AppManifest` | Per-process manifest | | `IlcMultiModule` | Incompatible build mode | +| `CLRTestExitCode` (non-default value) | Custom exit code; XUnit-level skips return 100 and conflict with the expected code | ## Summary of Source-Code-Based Triggers diff --git a/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.cs b/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.cs index 09cdb8704c3ba8..d07366242b2135 100644 --- a/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.cs +++ b/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.cs @@ -150,7 +150,6 @@ private static int ILStubCache_GCTransition_NoGCTransition(int expected) return n + 1; } - [SkipOnCoreClr("This test is not compatible with GC stress.", RuntimeTestModes.AnyGCStress)] [Fact] [ActiveIssue("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/dotnet/runtime/issues/91388", typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.PlatformDoesNotSupportNativeTestAssets))] public static void TestEntryPoint() diff --git a/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.csproj b/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.csproj index 459bb5890304c5..df78ad883d49ec 100644 --- a/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.csproj +++ b/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionNegativeTest.csproj @@ -4,6 +4,7 @@ true True true + true 134 -2146233082