Commit Graph
80 Commits
Author SHA1 Message Date
stephentoub 9ecf277528 Update package versions to rc3-23727
Commit migrated from https://github.com/dotnet/corefx/commit/c442e611d1b4dddc12703b8b80bea9f3889f141d
2016-01-27 08:08:48 -08:00
Lakshmi Priya Sekar 1aa7a9ac09 Update packages version to 23726.
Commit migrated from https://github.com/dotnet/corefx/commit/213da430524eceb9e90883c3d08848f62c813a91
2016-01-26 16:30:20 -08:00
stephentoub fd5d04a4d4 Remove "workaround" P2P TODOs from .csproj files
In the past we've added some temporary P2P references to workaround lack of bug fixes in packages.  Removing them as they're no longer needed.


Commit migrated from https://github.com/dotnet/corefx/commit/ba939973c07af13b01fe3b4f34e0a31eac6f90c7
2016-01-25 14:41:34 -05:00
stephentoub 4ef1e70a8a Update package dependencies to rc3-23725
Commit migrated from https://github.com/dotnet/corefx/commit/fad28575225858febd3069d41582a1502c5dda07
2016-01-25 14:38:56 -05:00
stephentoub 6545572fb1 Upgrade packages to rc3-23722
Commit migrated from https://github.com/dotnet/corefx/commit/02ece5061a33a7c12113cc4a52b2321d9e6db185
2016-01-23 11:36:29 -05:00
Eric Erhardt 4d42d8879e Bump ExpectedPrerelease version to latest (rc2-23713)
Commit migrated from https://github.com/dotnet/corefx/commit/ea4b19c136f3fa6355fd307b38cbe605b519b5eb
2016-01-21 09:46:18 -06:00
Ian Hays e3311742d9 Bump ExpectedPrerelease version to latest (rc2-23712)
Commit migrated from https://github.com/dotnet/corefx/commit/01c61f62988e8abf39aecc64b0a97ea4e384de3f
2016-01-14 10:36:27 -08:00
dagood e401efd6af Add portable-net45+win8 import to tests.
Specifically, add the import to dnxcore50 frameworks entries where "xunit" is mentioned in the project.json.
This fixes `xunit.abstractions 2.0.0 is not compatible with DNXCore,Version=v5.0.`


Commit migrated from https://github.com/dotnet/corefx/commit/da2e8eb34efcaf70069223bc431d80909a2fc91d
2016-01-12 14:04:32 -06:00
Wes Haggard f27c7dc024 Update project files adding default configurations
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.

Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.

Removed OutputType=Library property as it isn't necessary.


Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
2016-01-02 23:50:21 -08:00
Pallavi Taneja 95a3b67166 Expose Assembly.GetEntryAssembly and TypeInfo.IsEquivalentTo()
Expose Assembly.GetEntryAssembly and TypeInfo.IsEquivalentTo() in System.Reflection.
Fixes issues dotnet/corefx#4146 , dotnet/corefx#2101


Commit migrated from https://github.com/dotnet/corefx/commit/e28fdbd9dd98810a81207c665fdc4e6b40b24e64
2015-12-21 14:56:26 -08:00
Pallavi Taneja 90c2d27bf1 Update Corefx Repo to depend on newer package versions
Disable failing tests with the tracking active issue


Commit migrated from https://github.com/dotnet/corefx/commit/98fdc29624cd791bba42ec1e0cd5c256f331adfe
2015-12-21 11:48:15 -08:00
stephentoub 77c4183d17 Update package validation to rc2-23610
Commit migrated from https://github.com/dotnet/corefx/commit/6f6303f0356be4d2dd4ac117373f1e37f8752248
2015-12-11 10:53:47 -05:00
dagood fbfb82cc8c Change all project.json files to validate. Remove lockfiles from source control and add to gitignore.
A few new references to pick up changes that happened over time.


Commit migrated from https://github.com/dotnet/corefx/commit/0d881222d8c3269157639e2e67056e5a83aad834
2015-12-09 16:25:26 -06:00
Eric Erhardt 5979598973 Merge pull request dotnet/corefx#4791 from eerhardt/ShimIntPtr
Shims should use intptr_t for file descriptors.

Commit migrated from https://github.com/dotnet/corefx/commit/37fb0e5887d3f9ed1356790b71b78610c0dd3ecb
2015-12-04 18:00:40 -06:00
Jonathan Miller 4306181d9b Refactoring the OS X FileSystemWatcher to more match the Linux implementation
by using an internal Instance class in order to allow each instance to clean
itself up without causing side effects to other instances during rapid
start-stop-start scenarios. This refactor fixes issue dotnet/corefx#4738

Fixing a couple broken UTs by preventing notifications from being sent out for
the watched folder. This fixes dotnet/corefx#4830, dotnet/corefx#4831, and parts of dotnet/corefx#2279


Commit migrated from https://github.com/dotnet/corefx/commit/be314721b0f787a18366d8e01ca677db9219e716
2015-12-04 11:03:18 -08:00
Eric Erhardt eb363c4e65 Workaround the way CI runs tests.
The current changes in FileSystem.Watcher and MemoryMappedFiles require the latest
System.IO.FileSystem in order for their tests to be passing.


Commit migrated from https://github.com/dotnet/corefx/commit/1921420a3fb6187ebdc7bf7fa64ddb76ed1537ed
2015-12-04 11:01:48 -06:00
Eric St. John 65210efd31 Update project.lock.json to latest and lock
Commit migrated from https://github.com/dotnet/corefx/commit/6aeea5eabf2aff3baf15f501cabd156dfc5b3f8f
2015-11-09 22:38:10 -08:00
Eric St. John cddddd29f5 Remove unused dependencies
Commit migrated from https://github.com/dotnet/corefx/commit/78fd45ec74afc507a40df519b4df650ac9bd4c42
2015-11-09 22:37:37 -08:00
Jon Miller d5b8abd1cf Moving some less-reliable FSW tests out to OuterLoop
Commit migrated from https://github.com/dotnet/corefx/commit/0da52d55f2ddd61daf95c5378f95a5003066e7b4
2015-10-30 14:21:32 -07:00
Eric St. John 8cc3c24b51 Update lock files that were missed in previous restore.
A change was made to DNX to no longer restore project.jsons
that are in nested folders.  This caused my batch update to miss
a number of tests and reference assembly projects.

This fixes the stale lock files, but restore is still broken.

[tfs-changeset: 1540448]


Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
2015-10-21 18:59:09 -07:00
Eric St. John 543808303a Update dnx to v1.0.0-rc1-15838, update dotnet projects to generations
We need a new DNX to understand the latest packages.

We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.

The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.

[tfs-changeset: 1540388]


Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
2015-10-21 17:03:48 -07:00
bartonjs a768025131 Update all project.lock.json files
Built Windows_NT, Linux, OSX with /p:LockDependencies=true.

CoreFX beta-* => 23419
xunit.netcore.extensions => 00107


Commit migrated from https://github.com/dotnet/corefx/commit/a14b22705df253508bd5f2dab0407bd2c7e4d639
2015-10-19 16:00:44 -07:00
Peter Jas a29604278c code: Fixes occurred spelling.
Fixes dotnet/corefx#3661.


Commit migrated from https://github.com/dotnet/corefx/commit/544a3885ff51e04db89b70e3f155be1a5c64f166
2015-10-06 15:27:09 +00:00
Ian Hays 0f8197a86c Update CoreFX to xunit 2.1.0
Commit migrated from https://github.com/dotnet/corefx/commit/87b48c58936d66fcb201b3a8ad0961fa055f23b9
2015-10-01 19:56:49 -07:00
bartonjs a52f41057c Update all CoreFx package references to 23328 build.
`build.cmd /p:LockDependencies=true` was the start of this change, but some errors with xunit build numbers led to all xunit upgrades being reset back to what they had in master.

project.json changes:
* System.Net.Security\src Switch off of explicit beta versioning, use the same baseline as everyone else.  The S.S.C.Algorithms explicit upgrade is no longer required.
* System.Net.Requests\tests didn't build.  Looking at the project.lock.json change, it appeared that a System.Net.Http reference was lost, restored it.
* System.Net.Http\tests didn't build. Looking at the project.lock.json change, it appeared that a System.IO.FileSystem reference was lost, restored it.
* System.Net.WebSockets.Client\src didn't build. Looking at the project.lock.json change, it appeared that a System.Collections (4.0.10) reference was lost, restored it.
* System.Diagnostics.TextWriterTraceListener\tests needed the runtime reference to load the correct System.Diagnostics.TraceSource binary.


Commit migrated from https://github.com/dotnet/corefx/commit/cec3a0f2db542bfa9d9c56bf988d966eacc35ad9
2015-09-29 11:40:37 -07:00
stephentoub df23122fde Fix case sensitivity in FSW Path and Filter tests
Changing to use PathInternal.IsCaseSensitive actually fixed a bug in
FSW.Path/Filter.  The tests were testing for the wrong thing on Linux.
This just fixes the tests.


Commit migrated from https://github.com/dotnet/corefx/commit/b24780dd017f9a6a86fd55531fd9410cab6eef8e
2015-09-22 20:16:17 -04:00
Alexander Köplinger 3e20a867b2 Update build to use DNX beta7 instead of beta5
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.

After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.

Fixes dotnet/corefx#3173


Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
2015-09-16 02:12:26 +02:00
stephentoub ecb42af61c Disable two FileSystemWatcher tests failing on OS X
Commit migrated from https://github.com/dotnet/corefx/commit/09c31449e82f89bcbe85bd21662692ba43ed6900
2015-09-12 21:41:30 -04:00
stephentoub 2dd748811e Address various issues in FileSystemWatcher
- 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
2015-09-02 16:51:12 -04:00
Eric St. John d7a0ae297b Update corefx packages to latest
Commit migrated from https://github.com/dotnet/corefx/commit/23f0b695bd162e0f665427c95180dc21931e5c70
2015-08-14 15:43:23 -07:00
stephentoub d0b4035923 Fix regression in FileSystemWatcher
As part of the bug fix in https://github.com/dotnet/corefx/commit/dotnet/corefx@f2720abb758b50a9debb5ec146939ef6f5cef82d , a regression was introduced, one that we didn't catch until recently due to not having a test that stressed stopping and quickly restarting an FSW doing monitoring.

At the time of that fix, the active asynchronous monitoring operation didn't have its own copy of the directory handle; instead, it just used the single field on the FSW instance.  As such, in a race condition between the asynchronous monitoring operation trying to use that instance and the main thread stopping the FSW and nulling out the field, the asynchronous monitoring operation could experience a NullReferenceException.  The fix was to stop nulling out the field and just rely on closing the handle being enough to signal that monitoring should stop.

However, this causes a problem in a particular race condition.  While a SafeHandle is in use by a P/Invoke operation, its reference count is temporarily incremented so as to prevent it from being closed while in use.  This means that if the directory handle is disposed of while it's being used by ReadDirectoryChangesW, the handle's IsClosed won't return true until after ReadDirectoryChangesW returns.  When the FSW is stopped, Dispose is called on the handle, and then when it's restarted, the handle's IsClosed is checked to see if there's currently an active monitoring operation, and if there is, the FSW assumes it doesn't need to restart anything.  But if the stop and the start both occur during the call to ReadDirectoryChangesW, then the start won't actually start anything.

My reliability/performance fixes in https://github.com/dotnet/corefx/commit/dotnet/corefx@b6c478ccc9729e22ac7b9bf2248b644b51883db2 eliminated the reliance on the shared directory handle field: the asynchronous monitoring operation has its own copy.  Thus, there's no longer a problem in nulling out the directory handle field.  The fix for the regression is simply to do so.

(Long explanation for a fix that's simply to null out a field :-)


Commit migrated from https://github.com/dotnet/corefx/commit/6568da5ad7b4e5d516613f6a80865d5e88d72b31
2015-08-13 10:09:40 -04:00
stephentoub a57990e935 Disable sporadically failing FSW test
Issue dotnet/corefx#2740


Commit migrated from https://github.com/dotnet/corefx/commit/1b2143576e06662f65bc5d870bd5a2845afce198
2015-08-12 13:53:55 -04:00
stephentoub 6c5af28f87 Change timeouts on FSW tests
When we're waiting for an event that we know will arrive, we can wait for a fairly long time, because if it doesn't arrive we're going to fail the tests anyway.  This changes makes all of the ExpectEvent calls use a long timeout, much longer than most were previously using.  In the process I removed all of the custom values being passed, as they were all the same or shorter than the new default.  This should help to minimize avoid false positive flakiness.


Commit migrated from https://github.com/dotnet/corefx/commit/81e84b7910244f2f72ba760c100b16c01a38877c
2015-08-11 19:36:20 -04:00
stephentoub a19ac60823 Disable parallelization of FSW tests
My previous change to rename FSW test classes led to FSW tests getting parallelized.  It turns out that some of the tests are not robust against this due to using file names that can end up conflicting with other tests.  Additionally, it appears that the waiting / timeouts used by the tests is very susceptible to failure when run in parallel due to reliance on the shared thread pool, causing more failures in CI.


Commit migrated from https://github.com/dotnet/corefx/commit/83decea6937e1296be20202ff2f8ace51339e958
2015-08-10 23:11:09 -04:00
stephentoub 8ce1a4b748 Allow FSW tests to be parallelized
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
2015-08-07 14:17:04 -04:00
stephentoub 06258604cd Remove unnecessarily long wait in FSW tests
One of the FSW tests is passing a 30 second timeout to an ExpectNoEvent, which means the test when correctly functioning will take at least 30 seconds.  I've removed the custom timeout to give the test the normal timeout period of half a second.


Commit migrated from https://github.com/dotnet/corefx/commit/d4d0d561a3978f43ccb2271e8dc417d6d3ffefc2
2015-08-07 14:14:58 -04:00
stephentoub 9b9d1a5566 Fix faulty FileSytemWatcher test
At least on Windows 10, writing to a file can cause directories in its parent directory structure to also be noted as modified, such that events will be raised for those directories.  This is causing the FileSystemWatcher_Changed_PreSeededNestedStructure test to consistently fail.  I've updated the test to instead look for and modify file attributes, instead.


Commit migrated from https://github.com/dotnet/corefx/commit/784403a8cb1afa56136cdc4abd79a5425653c7d8
2015-08-07 14:11:52 -04:00
Nick Guerrera 046e1595fa Fix FileSystemWatcher test race + wrong event name
On Linux, depending on the timing of events, we can sometimes generate
delete+create instead of rename. As such, we can't perform renames and
test that no create or delete is raised when we're running on Linux.

The issue had so far only arisen on the negative create test and not the
negative delete test, which turned out to be because the negative delete
test was using the wrong event name.


Commit migrated from https://github.com/dotnet/corefx/commit/56c279db8707bf9246109b1ff232925e0312b7f8
2015-08-06 12:55:23 -07:00
stephentoub d6467ac0af Use RuntimeInformation across corefx for platform detection
This commit deletes our temporary Interop.PlatformDetection.cs mechanism and replaces usage of it with usage of System.Runtime.InteropServices.RuntimeInformation.dll.


Commit migrated from https://github.com/dotnet/corefx/commit/6861b625b391566544be9a60356c8c03b15e5fb5
2015-08-06 10:25:17 -04:00
Jonathan Miller 1d2f6fe59e Adding new Unit Tests to validate the more complex FileSystemWatcher
scenarios: symlinks, deep directory structures, and preseeded directories.


Commit migrated from https://github.com/dotnet/corefx/commit/c41c161d721f16bc0c83fe7c1d77378c06f005c3
2015-08-05 14:30:54 -07:00
Ian Hays e6e252aabf Modified Unix File.Move to use link/unlink instead of rename
Changed the way the UnixFileSystem does File moving; it was previously implemented using the rename syscall but now uses a combination of link and unlink. The side effect of this change is that the FileSystemWatcher will now treat File.Move as a deletion.

- Resolves dotnet/corefx#2460
- Removed all tests from FileSystemWatcher that made calls to File.Move and consolidated them into a new file: FileSystemWatcher.MoveFile.cs. This new file separates tests into Windows and Unix categories and uses Theories to supply the input WatcherChangeType and whether a move should trigger an event for the given type. If we later decide to change the Unix behavior of MoveFile, changing the FileSystemWatcher tests will be a simple matter of flipping the boolean values for the affected tests.
- Fixed some comments in UnixFileSystem to be more specific to FileSystemWatcher
- Changed variable names for FSW Move tests to be more descriptive
- Modified FSW MoveFile and Utitlity helper classes to use guids so that they may be run concurrently.


Commit migrated from https://github.com/dotnet/corefx/commit/cae7c5116d46c0d98e6f0fb3526fa2a15945501a
2015-08-04 15:47:56 -07:00
Eric Mellino 66969e748b Re-lock dependencies with latest xunit
Commit migrated from https://github.com/dotnet/corefx/commit/795cbc75f8e167047a7c19cd7e21e99b9b9f4308
2015-08-03 16:40:33 -07:00
Eric Mellino 219af47e0c Update test dependencies
Fixes all test warnings about 'different versions of the same dependent
assembly'


Commit migrated from https://github.com/dotnet/corefx/commit/b84f53f744ba0418255cbe471b783dde2a700a8e
2015-08-03 13:44:34 -07:00
Eric Mellino c0015fc582 Move all tests to latest xunit beta
Commit migrated from https://github.com/dotnet/corefx/commit/7c12b0120834f92d5c591124f692ea1b64c6a877
2015-08-03 11:27:48 -07:00
Eric St. John 47aaf9fcf8 Use stable package dependencies and move our packages to post-stable versions
This change modifies the build to consume the stable version where available.

This disables building the dowlevel packages since we shipped them once as stable and we're done.
From here on out, we'll only build the latest version (except for a servicing event, which would
be handled by syncing to a hash).

I can't rev the package versions in the normal way yet (by modifying the assembly version of the contents)
because that turned out to be too big of a problem to tackle in this change. Instead I added a
parameter to the task that calculates package versions to do the rev for anything that was
stable, but only when building the package itself, not when calculating the dependencies.
This has the downside of not permitting a dependency on a incremented pre-release version if we've
shipped a stable version, but that is a small point in time problem until I can rev the assembly
versions.

[tfs-changeset: 1508664]


Commit migrated from https://github.com/dotnet/corefx/commit/ee1ec2891c7c65b46fa9dfb078636be503bb2a60
2015-07-31 15:47:51 -07:00
stephentoub 1e197b1e10 Remove extraneous ProjectTypeGuids causing load failures
Several projects are no longer loading correctly in VS for me.  It's happening for projects and only for projects that contain a <ProjectTypeGuids/> node in the .csproj, related to portable libraries.  These entries are unnecessary, and I'm simply deleting them, after which the projects load in VS successfully.


Commit migrated from https://github.com/dotnet/corefx/commit/6896000d173190ad945fac32834c2d30815d8a29
2015-07-24 11:15:28 -04:00
stephentoub 782d1a5d02 Fix ObjectDisposedException in FileSystemWatcher tests
In my code review of @sokket's new FileSystemWatcher tests (dotnet/corefx#2347), I'd encouraged him to clean up some of the AutoResetEvents that were being created, in the name of good hygiene.  But this introduces a sporadic failure in the tests due to a race condition.

The way that FileSystemWatcher is designed, stopping events on the instance doesn't actually prevent any in-progress operations from being processed, nor does stopping block until all in-process events have completed.  As such, if after stopping processing we dispose of an event that's going to be set by one of the callbacks, it's possible such a set could occur from an in-flight operation after we've already disposed of the event, leading to an ObjectDisposedException that crashes the tests.

I contemplated adding synchronization to FSW itself to avoid these kinds of race conditions, e.g. by ensuring that the call to set "Enabled = false;" won't return until all in-progress operations have completed, but that could cause deadlocks not currently possible.  As such, I simply stopped explicitly disposing of the events created in the tests, leaving the cleanup to finalization (as is already done for most other events in the tests).


Commit migrated from https://github.com/dotnet/corefx/commit/43bfad63384aee6eb7e20c064054c5e1cd00fbf0
2015-07-22 17:09:31 -04:00
Jonathan Miller 83bfedb80a Merge pull request dotnet/corefx#2347 from sokket/fsw
Adding new Unit Tests to the FileSystemWatcher code base

Commit migrated from https://github.com/dotnet/corefx/commit/305974d03f0984e735a2ea0ce3b72139822397ba
2015-07-16 17:21:25 -07:00
Jonathan Miller a179a5735a Adding new Unit Tests to the FileSystemWatcher code base and fixing a
small bug in the Linux FileSystemWatcher that would notify a listener
about a new directory before we had a chance to process it, which
could lead to missed notifications and not fit user expectations.


Commit migrated from https://github.com/dotnet/corefx/commit/750602b098ceef5aa11ab626bdb359980dd1aa02
2015-07-16 14:59:21 -07:00
stephentoub bab02c72eb Ensure all Common includes use a <Link/>
Modifies various .csproj files to ensure that all Includes for files under Common use a <Link/> so that Visual Studio shows the files under a Common folder rather than flattened in the root.

Fixes dotnet/corefx#144


Commit migrated from https://github.com/dotnet/corefx/commit/264d92084d6c6366c3c23edaaab54a32f61d501b
2015-07-15 10:21:33 -04:00