Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class Directory_Changed_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class Directory_Create_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class Directory_Delete_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class Directory_Move_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public partial class Directory_NotifyFilter_Tests : FileSystemWatcherTest
{
[LibraryImport("advapi32.dll", EntryPoint = "SetNamedSecurityInfoW", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class File_Changed_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class File_Create_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class File_Delete_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class File_Move_Tests : FileSystemWatcherTest
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public partial class File_NotifyFilter_Tests : FileSystemWatcherTest
{
[LibraryImport("advapi32.dll", EntryPoint = "SetNamedSecurityInfoW", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace System.IO.Tests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public class InternalBufferSizeTests : FileSystemWatcherTest
{
// FSW works by calling ReadDirectoryChanges asynchronously, processing the changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void FileSystemWatcher_DirectorySymbolicLink_TargetsSelf_Fails()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/53366", TestPlatforms.Windows)]
public void FileSystemWatcher_SymbolicLink_TargetsDirectory_Create()
{
// Arrange
Expand Down Expand Up @@ -123,7 +123,7 @@ public void FileSystemWatcher_SymbolicLink_TargetsDirectory_Create_IncludeSubdir

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/70450", TestPlatforms.OSX)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/53366", TestPlatforms.Windows)]
public void FileSystemWatcher_SymbolicLink_IncludeSubdirectories_DoNotDereferenceChildLink()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ public void BeginInit_PausesEnableRaisingEvents()
[Theory]
[InlineData(true)]
[InlineData(false)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void EndInit_ResumesPausedEnableRaisingEvents(bool setBeforeBeginInit)
{
FileSystemWatcherTest.Execute(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ public void FileSystemWatcher_IncludeSubdirectories()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_InternalBufferSize()
{
FileSystemWatcher watcher = new FileSystemWatcher();
Expand Down Expand Up @@ -363,7 +362,6 @@ public void FileSystemWatcher_OnCreated()

[Fact]
[PlatformSpecific(TestPlatforms.OSX | TestPlatforms.Windows)] // Casing matters on Linux
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_OnCreatedWithMismatchedCasingGivesExpectedFullPath()
{
using (var fsw = new FileSystemWatcher(TestDirectory))
Expand Down Expand Up @@ -456,7 +454,6 @@ public void FileSystemWatcher_OnRenamed()

[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Unix FSW don't trigger on a file rename.
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_Windows_OnRenameGivesExpectedFullPath()
{
string file = CreateTestFile(TestDirectory, "file");
Expand Down Expand Up @@ -570,7 +567,6 @@ public void FileSystemWatcher_StopCalledOnBackgroundThreadDoesNotDeadlock()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_WatchingAliasedFolderResolvesToRealPathWhenWatching()
{
string dir = CreateTestDirectory(TestDirectory, "dir");
Expand Down Expand Up @@ -934,7 +930,6 @@ public void SetAndGetFiltersProperty()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_File_Delete_MultipleFilters()
{
// Check delete events against multiple filters
Expand All @@ -959,7 +954,6 @@ public void FileSystemWatcher_File_Delete_MultipleFilters()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_Directory_Create_MultipleFilters()
{
FileSystemWatcherTest.Execute(() =>
Expand All @@ -976,15 +970,14 @@ public void FileSystemWatcher_Directory_Create_MultipleFilters()
watcher.Filters.Add(Path.GetFileName(directoryOne));
watcher.Filters.Add(Path.GetFileName(directoryTwo));

ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: () => { if (Directory.Exists(directoryOne)) Directory.Delete(directoryOne); }, expectedPath: directoryOne);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: () => { if (Directory.Exists(directoryTwo)) Directory.Delete(directoryTwo); }, expectedPath: directoryTwo);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: () => { if (Directory.Exists(directoryThree)) Directory.Delete(directoryThree); }, expectedPath: directoryThree);
}
}, maxAttempts: DefaultAttemptsForExpectedEvent, backoffFunc: (iteration) => RetryDelayMilliseconds, retryWhen: e => e is XunitException);
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_Directory_Create_Filter_Ctor()
{
FileSystemWatcherTest.Execute(() =>
Expand All @@ -1000,15 +993,14 @@ public void FileSystemWatcher_Directory_Create_Filter_Ctor()
{
watcher.Filters.Add(Path.GetFileName(directoryTwo));

ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: null, expectedPath: directoryOne);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: null, expectedPath: directoryTwo);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: null, expectedPath: directoryThree);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryOne), cleanup: () => { if (Directory.Exists(directoryOne)) Directory.Delete(directoryOne); }, expectedPath: directoryOne);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryTwo), cleanup: () => { if (Directory.Exists(directoryTwo)) Directory.Delete(directoryTwo); }, expectedPath: directoryTwo);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => Directory.CreateDirectory(directoryThree), cleanup: () => { if (Directory.Exists(directoryThree)) Directory.Delete(directoryThree); }, expectedPath: directoryThree);
}
}, maxAttempts: DefaultAttemptsForExpectedEvent, backoffFunc: (iteration) => RetryDelayMilliseconds, retryWhen: e => e is XunitException);
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_Directory_Delete_MultipleFilters()
{
using var tempDir = new TempDirectory();
Expand All @@ -1028,7 +1020,6 @@ public void FileSystemWatcher_Directory_Delete_MultipleFilters()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_File_Create_MultipleFilters()
{
FileSystemWatcherTest.Execute(() =>
Expand All @@ -1043,15 +1034,14 @@ public void FileSystemWatcher_File_Create_MultipleFilters()
watcher.Filters.Add(fileOne.Name);
watcher.Filters.Add(fileTwo.Name);

ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: () => fileOne.Delete(), expectedPath: fileOne.FullName);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: () => fileTwo.Delete(), expectedPath: fileTwo.FullName);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: () => fileThree.Delete(), expectedPath: fileThree.FullName);
}
}, maxAttempts: DefaultAttemptsForExpectedEvent, backoffFunc: (iteration) => RetryDelayMilliseconds, retryWhen: e => e is XunitException);
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsMultithreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_ModifyFiltersConcurrentWithEvents()
{
FileSystemWatcherTest.Execute(() =>
Expand Down Expand Up @@ -1079,9 +1069,9 @@ public void FileSystemWatcher_ModifyFiltersConcurrentWithEvents()
thread.IsBackground = true;
thread.Start();

ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: null, expectedPath: fileOne.FullName);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: null, expectedPath: fileTwo.FullName);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: null, expectedPath: fileThree.FullName);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileOne.Create().Dispose(), cleanup: () => fileOne.Delete(), expectedPath: fileOne.FullName);
ExpectEvent(watcher, WatcherChangeTypes.Created, () => fileTwo.Create().Dispose(), cleanup: () => fileTwo.Delete(), expectedPath: fileTwo.FullName);
ExpectNoEvent(watcher, WatcherChangeTypes.Created, () => fileThree.Create().Dispose(), cleanup: () => fileThree.Delete(), expectedPath: fileThree.FullName);

cts.Cancel();
waitForThread();
Expand All @@ -1103,7 +1093,6 @@ public DangerousFileSystemWatcherTests(ITestOutputHelper output)
[PlatformSpecific(TestPlatforms.Linux)] // Reads MaxUsersWatches from Linux OS files
[OuterLoop("This test will use all available watchers and can cause failures in other concurrent tests or system processes.")]
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103584", TestPlatforms.Windows)]
public void FileSystemWatcher_CreateManyConcurrentWatches()
{
int maxUserWatches = int.Parse(File.ReadAllText("/proc/sys/fs/inotify/max_user_watches"));
Expand Down
Loading