Skip to content

[release/11.0] Fix FileSystemWatcher multi-move test event ordering - #137686

Merged
lewing merged 1 commit into
dotnet:release/11.0from
lewing:lewing-backport-137557-to-release-11-0
Nov 17, 2026
Merged

lewing merged 1 commit into
dotnet:release/11.0from
lewing:lewing-backport-137557-to-release-11-0

Conversation

@lewing

@lewing lewing commented Nov 16, 2026

Copy link
Copy Markdown
Member

Fixes Issue
Addresses the test failures tracked by #127651 and #137556 on release/11.0.

main PR
#137557

Description

Test-only, whole backport of b7bc828, applied without adaptation.

FileSystemWatcher events for different paths can arrive out of order on macOS, MacCatalyst, and OpenBSD. Add the shared platform predicate and event-comparison helper, and update the four multi-move test helpers to compare events as a multiset on those platforms, retaining duplicate counts. Preserve strict event ordering elsewhere, including Windows and Linux.

Re-enable the macOS directory multi-move test and the OpenBSD file multi-move test previously disabled for event ordering. All four source files are included; no product code changes.

Customer Impact

No product or public API impact. Without this fix, ordering-related test failures and disabled test coverage remain on the servicing branch.

Regression

Not a product regression fix. Corrects existing platform-specific test assumptions and restores test coverage.

Testing

  • On macOS arm64, ./build.sh clr+libs -rc release succeeded with 0 warnings and 0 errors.

  • Built and ran both affected move-test classes against the locally built release/11.0 runtime/libraries:

    ./dotnet.sh build src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj /t:Test -f net11.0-osx "/p:XUnitOptions=-class System.IO.Tests.File_Move_Tests -class System.IO.Tests.Directory_Move_Tests"
  • Passed: 28 tests, 0 failures, 0 skips, including all 12 multi-move cases and the re-enabled macOS directory test. Test-result XML confirms these counts.

  • The applied patch has the same stable patch ID as the source commit; no branch-specific adaptations. git diff --check passed.

  • Windows, Linux, MacCatalyst, and OpenBSD were not run locally, nor was the complete FileSystemWatcher suite. Event reordering is intermittent; one local pass does not prove the flake cannot recur.

Risk

Low risk: changes only tests and shared test utilities. Event types, paths, total counts, and duplicate multiplicities remain checked. Strict ordering is retained where the OS preserves it. No shipping binaries or public APIs are changed.

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: test-only change; no package authoring is required.

Note

This PR description was generated with the assistance of GitHub Copilot.

Backport b7bc828 (dotnet#137557) without changes. Preserve strict ordering on platforms that provide it and compare event multisets, including duplicate counts, elsewhere. Test-only; no product changes.

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-io
See info in area-owners.md if you want to be subscribed.

@lewing lewing added the test-bug Problem in test source code (most likely) label Nov 16, 2026
@steveisok steveisok added the Servicing-approved Approved for servicing release label Nov 16, 2026
@lewing
lewing enabled auto-merge (squash) November 16, 2026 21:20
@ViveliDuCh

Copy link
Copy Markdown
Member

/ba-g only known failures

@lewing
lewing merged commit 8db83b7 into dotnet:release/11.0 Nov 17, 2026
97 of 101 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.IO Servicing-approved Approved for servicing release test-bug Problem in test source code (most likely)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants