* 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
* 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
The test is causing intermittent failures in other tests and is also intermittently failing itself. Without modifying system resources we can't make this test trustworthy, so it's better to remove it for the sake of stability.
Commit migrated from https://github.com/dotnet/corefx/commit/2dab1441d118a81cda174a18b884aa3e1c627cd2
The latest Windows 10 preview builds contain enough functionality in Ubuntu/Bash on Windows (a.k.a. Windows Subsystem for Linux, or WSL) that .NET Core mostly works now. With the fix for dotnet/corefx#11058, we can even build/test the CoreFx tree in this environment. Currently there are a few test failures; I've been working on identifying the causes of these, and filing bugs in the appropriate repos.
This change implements workarounds for all of the current known issues in the "inner loop" tests. Mostly, I've just conditionally disabled tests when running in the WSL environment.
There is still an issue, under investigation, causing non-deterministic failures in the System.Net.Http tests (Microsoft/BashOnWindowsdotnet/corefx#1068). And I haven't tried OuterLoop runs of anything but the networking tests.
Commit migrated from https://github.com/dotnet/corefx/commit/d9aa92f6616d851256339318aadb89a6737e6d13
All of the FSW tests are potentially subject to intermittent failures because of the inherint flakiness of the underlying OS file system watching APIs. Although we do some manual stuff to get around that flakiness (e.g. retries, long timeouts), some scenarios aren't reliable enough to make it through. This commit moves those to Outerloop so they don't get in the way of our gated check in tests.
Commit migrated from https://github.com/dotnet/corefx/commit/c827a452b599d67fe68773b96b4da75044452446
Reworks the FSW tests to be 100% passing.
- Adds path validation to most tests.
- Adds a Retry mechanism to handle expected intermittent failures due to untrustworthy underlying API calls.
- Adds more test cases to NotifyFilter and splits existing tests into separate dir/file tests to cover either behavior.
- Enable test parallelization
Commit migrated from https://github.com/dotnet/corefx/commit/28d10fa256f40c3d37a8cb82d96a1e5520df03d2
- Add Common TempDirectory class for short-term temporary directories that are easy to create and destroy
- Put all FSW tests into the System.IO.Tests namespace
- Modify all FSW tests to use the common TempFile/TempDirectory classes instead of their own custom one
- Modify all FSW tests to watch for events in a temporary directory. There shouldn't be any more new items being created or watched in the runtime folder.
- Fix the SymLink tests to use the ConditionalFact attribute similar to how the FileSystem tests function.
- Remove the unnecessary symlink print statements being outputted by the FileSystem CreateSymbolicLink function.
Commit migrated from https://github.com/dotnet/corefx/commit/65356f9471850b796d01f63536c3ba36e504f8e1
- On Linux, FileSystemWatcher is built on top of inotify, which has various limits configured in the system for how many instances and watches can be created. When these limits are hit, exceptions are generated, but the Linux-provided error messages are cryptic about what the problem is. This change adds better error messages for those cases. It also ensures that errors regarding watch limits always come out of OnError rather than sometimes being thrown synchronously from EnableRaisingEvents and other times coming out asynchronously.
- As part of fixing that, I noticed that we had some reliability issues around marking the instance as enabled. I fixed this up to ensure that we only mark the instance as enabled when we've created everything we need to successfully launch it.
- While doing that, I noticed that on OS X, if we restart an FSW, we were unnecessarily re-creating a delegate. I changed it to avoid the unnecessary allocation.
- And while doing that, I also noticed that we we had a bad exception message when constructing an FSW with something other than a directory. I fixed the error message.
- I added tests for all these things.
Commit migrated from https://github.com/dotnet/corefx/commit/57cf111281a22feafb83854789680680da3cab50
The FSW tests still take ~10 seconds on my machine, most of which is spent waiting for events to not fire. This change just separates the tests out so that they're not all on the same class, letting xunit parallelize them. They now take ~3.5 seconds on my machine.
Commit migrated from https://github.com/dotnet/corefx/commit/2fbabe417accb662a6ed63a40506dea0268cf8e2
This commit fixes issues highlighted when running the System.IO.FileSystem.Watcher tests on Linux. There are 49 tests that pass on Windows; after these product and test fixes, only 7 of those fail on Linux, all due to Windows-specific tests that will need to be tweaked based on target system or disabled entirely on Linux:
- 2 are P/Invoking to Win32 functions related to security
- 3 are trying to overflow the event buffer but not doing so on Linux
- 2 are expecting case-insensitive file paths
Commit migrated from https://github.com/dotnet/corefx/commit/7176a0dc531a1a9c9032c36330bbf92e7ca57f65