Skip to content

[release/9.0-staging] Backport test-only fixes for Process MainWindow and NFloat tensor tests - #137308

Merged
lewing merged 2 commits into
release/9.0-stagingfrom
lewing-backport-test-fixes-9-0
Nov 11, 2026
Merged

lewing merged 2 commits into
release/9.0-stagingfrom
lewing-backport-test-fixes-9-0

Conversation

@lewing

@lewing lewing commented Nov 10, 2026

Copy link
Copy Markdown
Member

Fixes Issue N/A (CI test reliability)

main PR #125907, #127868 (partial; see below)

Description

Backports two test-only fixes from main for tests that fail in release/9.0 rolling CI but not on main.

  1. Fix flaky MainWindow tests by replacing notepad.exe with a deterministic RemoteExecutor helper #125907 (main a4bfa0d): Fix flaky MainWindow tests by replacing notepad.exe with a deterministic RemoteExecutor helper. It replaces ProcessTests.MainWindowHandle_GetWithGui_ShouldRefresh_Windows and MainWindowTitle_GetWithGui_ShouldRefresh_Windows, which launch notepad.exe and poll for a window, with a single MainWindowHandle_And_Title_GetWithGui_ShouldRefresh_Windows. That test shows a MessageBoxW in a RemoteExecutor child and waits for a "ready" signal. It is cherry-picked as-is; the only conflict was the using block in ProcessTests.Windows.cs.
  2. Fix tensor EqualWithTolerance test helper #127868 (main 7aa830a): Fix tensor EqualWithTolerance test helper. This is a minimal backport. Only the Helpers.DetermineTolerance NFloat change is taken: use NFloat.Size and return floatTolerance instead of doubleTolerance in the 4-byte case. Before this change, on 32-bit platforms doubleTolerance is null there, so casting it to NFloat throws InvalidOperationException: Nullable object must have a value in every NFloatGenericTensorPrimitives test that uses the default tolerance. The rest of Fix tensor EqualWithTolerance test helper #127868 is not taken: the AssertEqualWithTolerance rewrite, the new AssertExtensions.Equal(NFloat, ...) overloads and the call-site changes. It conflicts on this branch, touches shared TestUtilities, and tightens NaN, ±inf and ±0 comparisons for all types, which could expose new, unrelated mismatches on 9.0.

Evidence

Source: Kusto engsrvprod/engineeringdata AzureDevOpsTests, non-PR CI, last 21 days. Neither test fails on main.

  • ProcessTests.MainWindowTitle_GetWithGui_ShouldRefresh_Windows and MainWindowHandle_GetWithGui_ShouldRefresh_Windows fail on Windows.11.Amd64.Client.Open with an empty title or handle, on 10.0, 9.0 and 8.0.
  • NFloatGenericTensorPrimitives.* fail on 32-bit (x86, arm32) with Nullable object must have a value on 10.0 and 9.0.

Customer Impact

None; this changes test code only. It reduces noise in release/9.0 CI.

Regression

No. These are pre-existing test bugs and flakiness.

Testing

  • Not built locally. No baseline build was run because disk space is tight, so CI on this PR is the validation.
  • I checked that both target tests exist on release/9.0-staging, that ProcessTests.Windows.cs is compiled only for the -windows TFM, and that ProcessTestBase.CreateProcess(Func<int>) exists on this branch.
  • The Process test is [OuterLoop] and runs on Windows; the NFloat fix only takes effect on 32-bit platforms.

Risk

Low. The change is limited to two test projects. The Process change matches main. The tensor change is a 3-line fix to how the default tolerance is chosen for NFloat on 32-bit; 64-bit behavior is unchanged.

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.

Note

This PR was AI-generated (GitHub Copilot) and reviewed by the submitter.

Copilot AI and others added 2 commits November 10, 2026 17:00
…tic RemoteExecutor helper (#125907)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: danmoseley <[email protected]>
Co-authored-by: adamsitnik <[email protected]>
(cherry picked from commit a4bfa0d)
Minimal backport of the DetermineTolerance fix from #127868: use NFloat.Size
and return floatTolerance (not doubleTolerance, which is null) when NFloat
is 4 bytes.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@lewing

lewing commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

/ba-g mono device crashes are known

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — f838617c Deployed Nov 11, 2026 by lewing via conclusion #12260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure Servicing-approved Approved for servicing release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants