Repository navigation
[release/11.0] Fix FileSystemWatcher multi-move test event ordering - #137686
Merged
lewing merged 1 commit intoNov 17, 2026
Merged
Conversation
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: 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. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-io |
steveisok
approved these changes
Nov 16, 2026
This was referenced Nov 17, 2026
Open
Member
|
/ba-g only known failures |
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.
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 releasesucceeded 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 --checkpassed.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.