Commit Graph
426 Commits
Author SHA1 Message Date
David Shulman 2dcbe7344d Disable some FileSystemWatcher tests on MacOS (dotnet/corefx#42346)
Contributes to dotnet/corefx#42344

Commit migrated from https://github.com/dotnet/corefx/commit/15e7e1569a8c3a5502c476c31b60e06d633b3efa
2019-11-03 21:17:05 -08:00
Stephen Toub 136f249bc7 Don't root FileSystemWatcher unnecessarily (dotnet/corefx#41872)
We already try to do this on Unix, though it seems we don't currently have tests for it, but we don't on Windows.

Commit migrated from https://github.com/dotnet/corefx/commit/776aae562a1e65e80db00d83669b59802cf153cb
2019-10-21 13:46:01 -04:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Sylvain 10d02ead0e FileSystem.Unix.File.Move uses "rename" in more cases (dotnet/corefx#40611)
* FileSystem.Unix.File.Move use rename in more cases, avoid link/copy when possible, improve performance on file systems that do not support hard links, such as FAT

* Adapt Unit Tests for accounting FileSystemWatcher events fired by FileSystem.Unix.File.Move implementation that use rename in more cases, avoiding link/copy when possible


Commit migrated from https://github.com/dotnet/corefx/commit/89b087ba5548338bb604db4e1cca0e42f8273e2b
2019-10-07 13:50:47 -07:00
Tomas Weinfurt 10becfb62b improve stability of FileSystemWatcher tests (dotnet/corefx#40543)
* improve stability of watcher tests

* feedback from review

* more feedback

* disable parallelization for dangerous tests

* enable FileSystemWatcher_File_Create_ForceLoopRestart  again

* feedback from review


Commit migrated from https://github.com/dotnet/corefx/commit/e8fd8931d488d2e06a25a49c0d722b67f35e10fa
2019-09-25 14:30:10 -07:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Stephen Toub 13fae6f232 Disable FileSystemWatcher_File_Create_ForceLoopRestart test (dotnet/corefx#40804)
Commit migrated from https://github.com/dotnet/corefx/commit/aea8a56edf54228029b0f9ddf369e4d4f82f4446
2019-09-04 10:33:35 -04:00
madmir 018e1b82e8 Re-enable xunit warning 2017 (dotnet/corefx#40467)
* Re-enable xunit warning 2017

Use specialized assertions for checking for elements in collections.

* Revert Re-enable xunit warning 2017, revert some test changes

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/2fc48e13e87a4e68576d7df7af420ac2874e929e
2019-08-22 10:17:26 -04:00
buyaa-n 09b8b78516 Disabling test failing in Mac OSX 10.15 (dotnet/corefx#40332)
* Disabling test failing in Mac OSX 10.15

* Using active issue annotation

* Checking OS version instead of disabling test for any Mac

* Formatting update


Commit migrated from https://github.com/dotnet/corefx/commit/df3837cbced3fdcaab22464c18f0ce20b4aadfc7
2019-08-16 11:50:56 -04:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Stephen Toub 13fc8895db Re-enable xunit warning 1010 (dotnet/corefx#39846)
Commit migrated from https://github.com/dotnet/corefx/commit/e36291288fc182e94a919f45e61a8924f953c3cd
2019-07-28 22:34:44 -04:00
Stephen Toub bf9054c38c Re-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)
Commit migrated from https://github.com/dotnet/corefx/commit/47d96f89df41ce18d3ba77b38007ec68f7f66fc6
2019-07-25 10:45:20 +02:00
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04:00
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00
Viktor Hofer f8a8530d0f Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files

* Remove obsolete Project attributes

* Remove xml header and remove DefaultTargets


Commit migrated from https://github.com/dotnet/corefx/commit/c390ce7df50252e11f5d322276e9d19e046d1332
2019-03-03 18:55:25 +01:00
Ben Adams e950a40bd6 remove extra watcher
Commit migrated from https://github.com/dotnet/corefx/commit/b20a4917f19243a6ec2b12ae420736ac83cb05a0
2019-01-08 23:27:08 +00:00
Ben Adams f3bdf9ab31 Feedback
Commit migrated from https://github.com/dotnet/corefx/commit/08fa194915024438cf1bbdf47ccd4f45f5f42ec7
2019-01-08 23:24:09 +00:00
Ben Adams dea02ab16d Add Test
Commit migrated from https://github.com/dotnet/corefx/commit/c3ccfe22c1ec06d2b158697f765d4d456e348c71
2019-01-08 22:28:18 +00:00
Maxim Lipnin d87c9338f5 Share CFRunLoop for FSEventStreams in FileSystemWatcher on OSX (dotnet/corefx#33865)
* 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
2018-12-19 20:59:39 -05:00
Stephen Toub 997c81264f Disable FileSystemWatcher test on netfx (dotnet/corefx#34111)
* Disable FileSystemWatcher test on netfx

* Update FileSystemWatcher.File.Create.cs


Commit migrated from https://github.com/dotnet/corefx/commit/e2d3858a042f179d2082579414deaa963773bbf8
2018-12-15 12:03:36 -05:00
Stephen Toub 4c9bf7bede Tweak test to avoid default value
Commit migrated from https://github.com/dotnet/corefx/commit/eb068ffb575e7fc561bac65b236dbbb739e4e0c7
2018-12-12 18:12:00 -05:00
Stephen Toub af60d4a06b Add a FileSystemWatcher test for ExecutionContext (dotnet/corefx#33903)
Make sure that a) ExecutionContext properly flows, and b) events from multiple FileSystemWatchers are raised on the right ExecutionContext.

Commit migrated from https://github.com/dotnet/corefx/commit/81c6ce11a40df6d93de97ffc11408569befba727
2018-12-09 08:56:55 -05:00
Stephen Toub c12684b3c8 Fix concurrent modifcation of FileSystemWatcher.Filters
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
2018-12-02 22:41:10 -05:00
Eric Erhardt 779486884e Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ec546de620c5248f3662d6aaca989ed382b86b6b
2018-06-28 21:28:41 -05:00
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
Eric Erhardt 2053139c9a merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/1c91f96ec67a78a33268181d99a73a736b48c13e
2018-06-15 22:24:40 -05:00
Viktor Hofer 23f979bc4c Cleanup BinaryFormatterHelpers usage (dotnet/corefx#30439)
Commit migrated from https://github.com/dotnet/corefx/commit/03d643220955f86ef63c71d3bdd4cae05af1f586
2018-06-15 21:46:15 -04:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Anirudh Agnihotry 46c3899a36 Added Filters Property to FileSystemWatcher class (dotnet/corefx#29315)
* 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
2018-05-15 01:03:38 +05:30
Jeremy Kuhne 383d9ef979 Cut string allocations for filtered watcher files (dotnet/corefx#29227)
* 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
2018-04-20 18:36:12 -07:00
Jeremy Kuhne 7b52244b37 Use FileSystemName in FileSystemWatcher (dotnet/corefx#28220)
* 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
2018-03-20 21:43:47 -07:00
Marco Rossignoli 10a39d487c Improve InvalidDirectory error in FileSystemWatcher (dotnet/corefx#25485)
Another place where message could be more precise on FileSystemWatcher.
Fixes dotnet/corefx#24817

Commit migrated from https://github.com/dotnet/corefx/commit/771136cc013f8ac833f005e7193428e71966c5fe
2017-11-27 11:15:00 -08:00
Marco Rossignoli b95aec5c1a Fix misleading exception message, cleanup code (dotnet/corefx#25211)
* Fix misleading exception message, cleanup code dotnet/corefx#24817

* Fix misleading exception message, cleanup code dotnet/corefx#24817

* Fix misleading exception message, cleanup code dotnet/corefx#24817

* Fix misleading exception message, cleanup code dotnet/corefx#24817

* Fix misleading exception message, cleanup code dotnet/corefx#24817

* Revert "Fix misleading exception message, cleanup code dotnet/corefx#24817"

This reverts commit dotnet/corefx@87e87a1e34.

* Revert "Fix misleading exception message, cleanup code dotnet/corefx#24817"

This reverts commit dotnet/corefx@05f4a5a627.

* Revert "Revert "Fix misleading exception message, cleanup code dotnet/corefx#24817""

This reverts commit dotnet/corefx@4e3516910a.

* Fix misleading exception message, cleanup code. fixes dotnet/corefx#24817

* Fix misleading exception message, cleanup code. fixes dotnet/corefx#24817

* Fix misleading exception message, cleanup code. fixes dotnet/corefx#24817

* Fix misleading exception message, cleanup code. fixes dotnet/corefx#24817

* Fix misleading exception message, cleanup code. fixes dotnet/corefx#24817

* Fix misleading exception message, cleanup code dotnet/corefx#25211


Commit migrated from https://github.com/dotnet/corefx/commit/421306d0aa0f3aaa53c22188e7fedec6d7125e98
2017-11-19 05:54:45 +00:00
Kasper Fabæch Brandt 58ea9bfc83 Make FileSystemWatcher tests tolerant of spurious/extra events on all platforms. Fixes dotnet/coreclrdotnet/corefx#14154. (dotnet/corefx#24406)
Commit migrated from https://github.com/dotnet/corefx/commit/8665e8bbd98cc47bf4bcfdc7c2939c477953d85c
2017-10-03 14:38:04 -07:00
Paulo Janotti 6dca35f789 active supress coreclr dotnet/corefx#14154 (dotnet/corefx#24305)
Commit migrated from https://github.com/dotnet/corefx/commit/9c18f4b74d61fd86dd1f01f5d512474a08adee99
2017-09-28 10:10:01 -07:00
Dan Moseley b27ba97af5 Rename IsWinRT to IsInAppContainer (dotnet/corefx#23935)
* Rename IsWinRT to IsInAppContainer

* Grep error


Commit migrated from https://github.com/dotnet/corefx/commit/8d51233795da222041c23d33b1eb44bbe458d0eb
2017-09-11 02:57:28 -04:00
Brian Chavez 232a1dfac0 Grammar check - "a [a,e]" rule. (dotnet/corefx#23697)
* Grammar check - "a [a,e]" rule.

* Corrected "a attributes" to "an attribute"


Commit migrated from https://github.com/dotnet/corefx/commit/be75987c628347e1d44bba15c5272ade3dcfa65c
2017-08-31 09:29:39 -04:00
Tarek Mahmoud Sayed 3765a6069b Moving PlatformDetection to Corefx.Private.TestUtilities assembly (dotnet/corefx#23109)
* 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
2017-08-10 22:37:36 -07:00
Ian Hays ebd5caab49 Add FSW tests for two set NotifyFilters
Commit migrated from https://github.com/dotnet/corefx/commit/77883e33b94164a318eb128605340dc2e61cd358
2017-08-07 16:43:18 -07:00
Ian Hays af8f8840b0 Add FSW file/directory event filtering to Linux
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
2017-08-04 14:23:19 -07:00
Hugh Bellamy 98b18432b7 Move AssertExtensions to Corefx.Private.TestUtilities (dotnet/corefx#21799)
* Move AssertExtensions to Corefx.Private.TestUtilities

* Update csprojs

* Fix Linq.Expressions uapaot build


Commit migrated from https://github.com/dotnet/corefx/commit/7e3b0db2892c56a431f8e99af9cd9381adec385a
2017-07-03 09:27:30 -07:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
Jose Perez Rodriguez fb0f360046 Disabling FileSystemWatcher test on uap
Commit migrated from https://github.com/dotnet/corefx/commit/5fe6b5a61d2ef5ec5b813683a6c91a874909c675
2017-06-15 16:51:56 -07:00
Tarek Mahmoud Sayed 8754550d62 Enable UAP Remote Execution for all tests (dotnet/corefx#21014)
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
2017-06-14 13:26:57 -07:00
Santiago Fernandez Madero e8c0db60b4 Update buildtools and extensions and do tests cleanup for new attributes behavior (dotnet/corefx#20333)
* Update buildtools and extensions and do tests cleanup for new attributes behavior


Commit migrated from https://github.com/dotnet/corefx/commit/bc73a9b7ca2a644efd9fc3cb51dde3bc3726ecd7
2017-05-26 02:13:52 -05:00
Morgan Brown 975ad3c685 Scale back [Serializable] CoreFX types (dotnet/corefx#19742)
* 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
2017-05-16 18:16:29 -04:00
FAREAST\v-lijiay 6b76c4a669 Disable failed test for issue 18308.
Commit migrated from https://github.com/dotnet/corefx/commit/ad0dd782ee220cca6637546f532e667dbf721063
2017-05-05 02:08:45 -07:00