* Share CFRunLoop for FSEventStreams in FileSystemWatcher on OSX
* Address review comments
* Add execution context capturing
* Fix nits
* Add some tests to check multiple watchers
* Address review comments
* Update FileSystemWatcher tests
* Add timeout for non-expected events
* Wrap FileSystemWatcher_File_Create_EnablingDisablingNotAffectRaisingEvent test in ExecuteWithRetry helper method and mark it with Outerloop
* Wrap FileSystemWatcher_File_Create_WatchOwnPath test in ExecuteWithRetry helper method
* Move disposing FileSystemWatcher instances to a finally section in FileSystemWatcher_File_Create_ForceLoopRestart test
* Use null-conditional operator before disposing
Commit migrated from https://github.com/dotnet/corefx/commit/8a06434b29599950571aa7975458ae5b465d1a0d
Change the underlying list type to be one that supports concurrent enumeration and mutation. Since mutation of Filters should be rare, and since we want to optimize for events firing and being verified against the filters, we use an immutable data structure. This also has a side benefit that now enumeration is allocation-free, whereas previously we'd allocate an enumerator every time we tried to match the pattern against the collection.
Commit migrated from https://github.com/dotnet/corefx/commit/677d5aef0d5ff8e6e882d8104fb0b2d49eea8627
* Filters Property and tests added
* Tests fixed for osx
* Tests fixed for netfx and error message improved
* Tests fixed for netfx and error message improved
* Added tests for insert,contains ,removeat, index of , to string and gettype
* ToString removed and asser.equal corrected
* Comments and overload of epectevent added for netcoreapp
* Removed duplicate code
* setup and execution separated
* Expected patshs argument added
* ExpectNoEvent Added, negative added for all the test , expected path problem corrected
* handler
* Storing tuple and Unexpected Events
* name added to return values tuples
Commit migrated from https://github.com/dotnet/corefx/commit/9f2377fcd4e46f2c607d03672ed0bb92fe9cb68e
* Cut string allocations for filtered watcher files
This changes the Win32 watcher code to not allocate strings until after we've matched the name and know that we're going to actually fire an event.
Unix code can be changed to encode into a temporary buffer to get a similar reduction. I'll open an up-for-grabs issue on it.
Flip a test to have expected in the expected argument.
* Move loop inside fixed statement
* Move locals inside fixed block.
Commit migrated from https://github.com/dotnet/corefx/commit/11a12e6538a0a024c3adfb944c3983c0d66c3768
* Use FileSystemName in FileSystemWatcher
- Uses newer spanified version in FileSystemName
- Doesn't allow extended match chars `<`, `>`, `"` as these are legal in Unix
* Plumb through the case sensitivity
* Update tests
* Tweak test for netfx
* Tweak the comment to be a bit more readable
Commit migrated from https://github.com/dotnet/corefx/commit/fcfb556ebf99ed551c02d0146c805e792b264cf2
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly
The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.
* Fix Linux BB
* Update the xunit package reference
* Fix wrong condition on one of the tests
* Update the ConditionalFact/Theory to use Type as a parameter
Commit migrated from https://github.com/dotnet/corefx/commit/878e2fcf5a9f1068015e5fada9231088663e3490
Because we are using inotify as the underlying implemenation for FileSystemWatcher on Linux, we can not only raise events for files or only raise events for directories, so we have to allow events for both to be raised regardless of NotifyFilters.
However, inotify does tell us that if an event occurred on a directory or on a file after the event has been raised. Since this is after filtering has already been done, we forward that event regardless of the NotifyFilters. This commit passes NotifyFilters to the RunningInstance that forwards the events and adds in some manual filtering after the fact. It isn't quite the same as filtering through the native call, but it does bring us closer to the Windows behavior.
Commit migrated from https://github.com/dotnet/corefx/commit/541f8e1535466c94b798e4e0177b834d1c3210da
This change to enable remote execution of all corefx tests in UAP. Because the remote execution code for UAP is using WinRT APIs and to avoid forcing adding UAP configuration to all test projects, we factor the remote execution code into its own test library (called TestHelper) which is cross compiled.
Commit migrated from https://github.com/dotnet/corefx/commit/eb2f543b189e8f7f9ae4c31e832ac9d3c22bb41a
* Remove SerializableAttribute from many CoreFX types that will not be serializable.
* Removes serialization tests for types that are no longer serializable and fixes serializing a couple of types. Includes marking some internal serializable types as public so that they'll be reflectible with .NET Native.
* Remove unneeded pragmas
* Update based on review comments
Commit migrated from https://github.com/dotnet/corefx/commit/6dd451f51451a7d0ceea6104b51bd17005e9a0e6
* Fix 2 failing IO tests.
The MMF test is failing from a purposeful design change around the default FileShare being used in CreateFromFile. The FSW tests are failing intermittently from inconsistency so I'm reverting my recent change to move them to innerloop and reduce their wait time.
* Add issue number to Skip tag for MMF test
Commit migrated from https://github.com/dotnet/corefx/commit/9f35bcfb7728345151147e72b8264773085e56a0
* Add Retries to FSW WaitFor* Tests
These tests are intermittently failing on some platforms from events not being risen by the filesystem. It's causing a fair amount of churn, so I'm adding retries to them like we have for a lot of the other FSW tests that are succeptible to intermittent failures. Doing so also greatly reduces the runtime in the failure case, allowing us to move the tests back to innerloop.
* Make FSW tests try/catch retry errors
Commit migrated from https://github.com/dotnet/corefx/commit/078b0f49388f787037edb09aa0d994773e6de02f
* Fix some intermittently failing Desktop FSW tests
They're failing for misc reasons but mostly are plagued by timeouts. I excluded some actual failures and increased timeouts for the other ones so desktop FSW runs should be clean going forward.
* Make FSW_NotifyFilter test catch any ArgException
This is so it still runs on desktop and isn't just flat out excluded.
* Fix FSW StopCalledOnBackgroundThread test
* fix FSW test
Commit migrated from https://github.com/dotnet/corefx/commit/f548a49b0d40b90b45ef43ea27bd99e16c50676c