Skip to content

[release/10.0] Enable class-level parallelism in Process tests - #135317

Open
steveisok wants to merge 1 commit into
dotnet:release/10.0from
steveisok:steveisok-backport-process-parallelism-release10
Open

steveisok wants to merge 1 commit into
dotnet:release/10.0from
steveisok:steveisok-backport-process-parallelism-release10

Conversation

@steveisok

Copy link
Copy Markdown
Member

Fixes Issue
N/A: test-only CI throughput and ambient-state isolation; no release timeout incidence has been established.

main PR
#135160, merged squash commit 780c55a27764cb5729babfcfef8de849cdf3fcaf.

Description

Backport the final merged approach to release/10.0, based on 4c61b1441b4b11274d6f8b4b3bebc1147e437e78. Release has the same assembly-wide collection and host environment/console/current-directory mutations. Isolating those mutations allows default per-class collections on Windows/Linux, improving throughput/headroom without increasing timeouts.

Desktop macOS retains the original assembly-wide serialization pending #135294; this does not fix or close that issue. The target-based guard applies to both Mono and CoreCLR. Browser's assembly skip and mobile behavior are unchanged.

Six test files only. Conflict resolutions preserve release tests/APIs and omit main-only context. The Windows first-chance-exception test hunk is omitted because that test does not exist on release. The Unix directory-collision test retains its platform/outer-loop traits and now intentionally requires RemoteExecutor.IsSupported, matching main.

Customer Impact

N/A: test-only CI efficiency/isolation. No shipped library binaries, product behavior, package versions, or pipeline changes. This does not establish that release CI is affected by #135001 or promise main's measured speedup on the smaller release suite.

Regression

No product regression addressed. The serialization pattern predates this backport.

Testing

Actual release-project MSBuild evaluation on Windows confirmed TARGET_OSX only for TargetOS=osx with the Unix framework, for Mono and CoreCLR. Windows, Linux, Android, MacCatalyst, Browser, and osx with a MacCatalyst framework do not enable the guard.

The documented targeted dotnet build /t:Test command was attempted for the four affected Windows tests but failed before Process-test compilation: eng/targetingpacks.targets:106 reports a missing built shared-framework targeting pack; CoreLib also reports a Runtime Task Host SDK-version metadata error. The manifest requests SDK 10.0.111; the readily installed SDK selected under its roll-forward policy is 10.0.400-preview.0.26312.103. These are local prerequisites/tooling blockers, not established regressions from this patch.

Bounded supplemental Roslyn compilation covered every evaluation-time Compile item in the Windows and Unix source sets, using installed .NET 10.0.8 references, restored release RemoteExecutor/xUnit dependencies, and .NET 10.0.12 for execution. The four affected Windows tests passed: 4 passed, 0 failed, 0 skipped, with real child/grandchild invocations. References to source-project products were supplied by installed/cached .NET 10 assemblies, not freshly built release binaries.

Actual xUnit discovery on Windows found 358 Windows cases in eight class collections; the Unix variants had 407 cases in eight collections for Linux and one shared collection with the macOS guard. Unix results are cross-target metadata checks, not native-platform execution or CI payload counts.

These supplemental checks do not cover the complete official generated entrypoint/assembly metadata, resource-generation, or analyzer pipeline. Repository build/test success and native Linux/macOS/Mono/NativeAOT execution remain unverified. No broad prerequisite build, manual CI/Helix jobs, reruns, or monitoring were started; automatic PR CI must provide full verification.

Risk

Low product risk: only tests change. Intentional Windows/Linux concurrency carries test-scheduling risk, mitigated by moving process-wide environment, console-code-page, and current-directory mutations out of the runner. The Windows child allocates a private console and reports native failures; fixture disposal retains child cleanup. macOS preserves its prior serial scheduling.

Area-owner review and the applicable servicing approval remain required; this PR does not assert either approval or green CI.

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.

N/A: this backport changes tests only.

Backport dotnet#135160's test-only ambient-state isolation and class-level
parallelism on Windows/Linux. Preserve assembly-wide serialization on
desktop macOS and the Browser assembly skip.

Resolve context conflicts without importing newer tests or APIs. Omit
the Windows first-chance-exception test change because that test does not
exist on release/10.0.

(cherry picked from commit 780c55a)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 77e3b81a-728c-456f-97c2-210c695c4446
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant