Skip to content

Disable FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories#124849

Open
Copilot wants to merge 4 commits intomainfrom
copilot/fix-filesystemwatcher-symlink-test
Open

Disable FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories#124849
Copilot wants to merge 4 commits intomainfrom
copilot/fix-filesystemwatcher-symlink-test

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories consistently fails on macOS in crossgen2/ReadyToRun pipelines — ExpectNoEvent fires unexpectedly on all three retry attempts.

Changes

  • FileSystemWatcher.SymbolicLink.cs: Added [ActiveIssue("https://github.com/dotnet/runtime/issues/124847", typeof(PlatformDetection), nameof(PlatformDetection.IsOSX), nameof(PlatformDetection.IsReadyToRunCompiled))] to skip the test only when running on OSX with ReadyToRun compilation enabled, using the params constructor overload to combine conditions without adding a new property.
Original prompt

This section details on the original issue you should resolve

<issue_title>FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories failing on osx in crossgen outerloops</issue_title>
<issue_description>System.IO.Tests.SymbolicLink_Changed_Tests.FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories is failing in runtime-coreclr crossgen2 pipelines.

Running assembly:System.IO.FileSystem.Watcher.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
RetryHelper: retrying FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories 1th time of 3: got Expected Event occurred
RetryHelper: retrying FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories 2th time of 3: got Expected Event occurred
[FAIL] System.IO.Tests.SymbolicLink_Changed_Tests.FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories
System.AggregateException : One or more errors occurred. (Expected Event occurred) (Expected Event occurred) (Expected Event occurred)
---- Expected Event occurred
---- Expected Event occurred
---- Expected Event occurred
   at System.IO.Tests.FileSystemWatcherTest.Execute(Action test, Int32 maxAttempts, Func`2 backoffFunc, Predicate`1 retryWhen, String testName) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 247
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
----- Inner Stack Trace dotnet/runtime#1 (Xunit.Sdk.FalseException) -----
   at System.IO.Tests.FileSystemWatcherTest.ExpectNoEvent(FileSystemWatcher watcher, WatcherChangeTypes unExpectedEvents, Action action, Action cleanup, String expectedPath, Int32 timeout) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 277
   at System.IO.Tests.SymbolicLink_Changed_Tests.<FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories>b__5_0() in /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.SymbolicLink.cs:line 100
   at System.IO.Tests.FileSystemWatcherTest.Execute(Action test, Int32 maxAttempts, Func`2 backoffFunc, Predicate`1 retryWhen, String testName) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 238
----- Inner Stack Trace dotnet/runtime#2 (Xunit.Sdk.FalseException) -----
   at System.IO.Tests.FileSystemWatcherTest.ExpectNoEvent(FileSystemWatcher watcher, WatcherChangeTypes unExpectedEvents, Action action, Action cleanup, String expectedPath, Int32 timeout) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 277
   at System.IO.Tests.SymbolicLink_Changed_Tests.<FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories>b__5_0() in /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.SymbolicLink.cs:line 100
   at System.IO.Tests.FileSystemWatcherTest.Execute(Action test, Int32 maxAttempts, Func`2 backoffFunc, Predicate`1 retryWhen, String testName) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 238
----- Inner Stack Trace dotnet/runtime#3 (Xunit.Sdk.FalseException) -----
   at System.IO.Tests.FileSystemWatcherTest.ExpectNoEvent(FileSystemWatcher watcher, WatcherChangeTypes unExpectedEvents, Action action, Action cleanup, String expectedPath, Int32 timeout) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 277
   at System.IO.Tests.SymbolicLink_Changed_Tests.<FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories>b__5_0() in /_/src/libraries/System.IO.FileSystem.Watcher/tests/FileSystemWatcher.SymbolicLink.cs:line 100
   at System.IO.Tests.FileSystemWatcherTest.Execute(Action test, Int32 maxAttempts, Func`2 backoffFunc, Predicate`1 retryWhen, String testName) in /_/src/libraries/System.IO.FileSystem.Watcher/tests/Utility/FileSystemWatcherTest.cs:line 238
Finished System.IO.FileSystem.Watcher.Tests, Version=11.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

Tests run: 308, Errors: 0, Failures: 1, Skipped: 0. Time: 4.3316492s

See https://dev.azure.com/dnceng-public/public/_build/results?buildId=1307100&view=logs&j=ad7a14da-77b9-5cd1-338f-b9d2e5c2449a&t=7f54a548-17e8-5b9c-ff0f-ce59b9d44a9b</issue_description>

<agent_instructions>Disable the test only when running on osx with crossgen enabled. Make sure to add a link to this issue on the disabling attribute</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@dotnet-policy-service
Copy link
Contributor

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

…eSubdirectories on OSX with crossgen

Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix FileSystemWatcher symbolic link target directory test on OSX Disable FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories on OSX with crossgen Feb 25, 2026
Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
@jtschuster
Copy link
Member

/azp run runtime-coreclr crossgen2

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables a flaky FileSystemWatcher symbolic-link test specifically on macOS when running under ReadyToRun (crossgen2) test mode, aligning with the reported consistent failures in the crossgen2/ReadyToRun pipelines.

Changes:

  • Added an ActiveIssue skip condition for PlatformDetection.IsOSX && PlatformDetection.IsReadyToRunCompiled on the failing test, linked to #124847.

@jtschuster jtschuster changed the title Disable FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories on OSX with crossgen Disable FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdirectories Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants