Repository navigation
[release/11.0] Enable class-level parallelism in Process tests - #135315
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
## Motivation Mitigate #135001's Process-suite execution-budget exhaustion by isolating ambient-state-sensitive tests and restoring default xUnit class-level parallelism on Windows/Linux. This follows the [review suggestion](#135160 (comment)) and replaces the previous sharding approach without rewriting history. **Desktop macOS retains the original assembly-wide serialization.** Recent Mono x64 and Checked CoreCLR arm64 runs timed out under class parallelism. This is a compatibility safeguard against the unresolved concurrency problem, not a root-cause fix or a claim that macOS CI is now green. ## Changes - Run the three parent-environment tests wholly inside `RemoteExecutor`, preserving nested child inheritance, overrides, null removal, and fixture disposal. Process exit handles environment cleanup. - Run the Windows encoding test inside a remote process that detaches from the inherited console and allocates a private console. Preserve native/code-page checks and the Unix/container UTF-8 path; process exit frees the private console. - Isolate the process-wide first-chance-exception counter with `RemoteExecutor`. - Use a unique directory and remote working directory for the Unix executable-resolution test. Its standard `RemoteExecutor.IsSupported` condition intentionally excludes that one outer-loop test when RemoteExecutor is unsupported; the bespoke single-file fallback stays removed. - Define `TARGET_OSX` only for `TargetOS=osx` with the Unix target framework, then apply the original `CollectionPerAssembly` attribute. This uses the actual test build target, not the build host, and applies to both Mono and CoreCLR. Windows/Linux keep class-level collections; Android, MacCatalyst, and Browser behavior is unchanged. The Browser assembly skip is preserved. The existing single project and packaging remain. No sharding, thread caps, timeout increases, product-code changes, or PR-specific CI gates. The macOS safeguard changes scheduling only, not test eligibility. ## Validation Supplemental compilation and actual xUnit discovery passed for eight target configurations using cached CI dependencies. The macOS Mono x64, CoreCLR arm64, and single-file source configurations each place all 765 locally discovered rows in **one shared collection**. Windows/Linux retain class collections; Android/MacCatalyst/Browser remain class-based. Cross-target evaluation on Windows verified that the gate follows `TargetOS`, and an `osx` build with a MacCatalyst target framework does not enable it. Local execution of two inexpensive tests from different classes confirmed one executed collection for the macOS-targeted assembly versus two for Windows/Linux. These are cached-runtime metadata/smoke checks, **not actual macOS or NativeAOT execution**; collection membership restores serialization even when the runner reports multiple available threads. The prior cleanup revision passed all four affected Windows tests and ten concurrent parent-state probe calls with zero violations across 3,747 samples. Supported discovery/traits remained 724 Windows rows and 765 Unix rows, with 689 ordinary Windows cases; the only unsupported-runner eligibility change was the accepted Unix outer-loop condition. Earlier local serial/parallel full-suite times were 763.201s and 311.975s on the same saved x86 Checked runtime. Both had the same job-breakaway access-denied failure. These measurements are indicative, not controlled performance proof or a promised CI speedup. The earlier [Windows Server 2016 experiment](https://helix.dot.net/Job/e2b3d201-2701-4bfa-98b4-c796b562836b), on test source `a083867ca24`, ran 691 cases: 687 passed, one job-breakaway failure, three skips; 518.706 test seconds and 586.995 full work-item seconds. All five isolation cases passed with four-thread class parallelism. It used the intact historical x86 Checked/Debug-libraries runtime from [build 1621730](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1621730), source `dda144147efa0a3669f11b283253da3ddf0bb9c1`, not a current-head runtime build. Its reporting script also encountered an XML naming collision. It was **not a green run**. ## Remaining limits The local repository build is blocked by the missing shared-framework targeting pack; actual NativeAOT evaluation is blocked by missing ILCompiler targets. Supplemental checks do not establish a successful repository, bundled single-file, or native-platform build. The macOS concurrency problem and Windows job-breakaway failure remain unresolved. This revision restores the old macOS scheduling only; passing macOS Mono/CoreCLR execution still needs confirmation from the new automatic CI run. No manual jobs, new baselines, reruns, or monitoring were started. > [!NOTE] > This pull request description and changes were generated with GitHub Copilot. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 44b18162-ee5a-4b48-8ce9-96ac2bb8dc5d
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
jkotas
approved these changes
Oct 6, 2026
This was referenced Oct 7, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #135160 to release/11.0
/cc @steveisok
Customer Impact
[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]
Regression
[If yes, specify when the regression was introduced. Provide the PR or commit if known.]
Testing
[How was the fix verified? How was the issue missed previously? What tests were added?]
Risk
[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]
IMPORTANT: If this backport is for a servicing release, please verify that:
release/X.0-staging, notrelease/X.0.release/X.0(no-stagingsuffix).Package authoring no longer needed in .NET 9
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.