Commit Graph
325 Commits
Author SHA1 Message Date
Eric St. John 181b320307 Don't pass FilterToOSGroup to non-builds files
FilterToOSGroup was flowing from .builds to csproj
which was causing unique global property sets for
the same csproj.  As a result the projects would
build multiple times and race when writing output.

[tfs-changeset: 1562265]


Commit migrated from https://github.com/dotnet/corefx/commit/a5d558bcf7713e56c237de704f3d70c4927d8f44
2016-01-07 13:52:41 -08:00
stephentoub 94a6b74a7e Remove stale TODO in SafeFileHandle test
Commit migrated from https://github.com/dotnet/corefx/commit/cabe44c6dd6ebc405c995e3a89a782e871aae7dd
2016-01-04 13:50:06 -05:00
Wes Haggard 8576f85443 Merge pull request dotnet/corefx#5125 from weshaggard/SupportAnyOS
Support for AnyOS

Commit migrated from https://github.com/dotnet/corefx/commit/86a062a0ca68a98cd58a2d52a66ff0df4898c98a
2016-01-03 18:14:17 -08:00
Wes Haggard a3e67fdf73 Update .builds files to include OSGroups
This these .builds files were updated and generated from a script
based on the configurations defined in the matching csproj files.

This updates the builds files to specify OSGroup and TargetGroup
as metadata instead of using AdditionalProperties and also sorts them by
TargetGroup followed by OSGroup.


Commit migrated from https://github.com/dotnet/corefx/commit/95efe37475916016a5fc6ee6f0ba584d990c4196
2016-01-02 23:50:23 -08: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
Wes Haggard ffe95ece1d Add support for building and filtering via OSGroup in .builds files
After this change if you build a .builds file it will all projects
defined in it. However if you specify OSGroup or FilterOSGroup as a property
it will only build the projects that are for that OSGroup or AnyOS.

Change the default OSGroup to AnyOS instead of Windows_NT.

By default if you build from the root it will only filter the projects to
just the OS that you are building on (including anything that is AnyOS).

If you want to build all projects for all OS's from the root pass
/p:BuildAllOSGroups=true property from the command line.

Includes an update to project-guidelines.md and windows-instructions.md docs
with information on the changes.

[MERGE with support commit]


Commit migrated from https://github.com/dotnet/corefx/commit/7146f1be15bbe9b82949cb71b3f1d3548a10fd5e
2016-01-02 23:49:17 -08:00
Stephen A. Imhoff f9d1c9f3e8 Remove extra references
Commit migrated from https://github.com/dotnet/corefx/commit/223542e494fb32feb8299acb565098322040409c
2016-01-03 16:24:35 +09:00
Eric St. John a18fc5f8ca Enable packaging task and targets from dotnet/buildtools in TFS
This change switches the TFS package buid to use the packaging
infrastructure from the buildtools package.  For any package
project that exists in corefx/wcf we will use that in place of the
closed source package.

As we move more package projects to the open they will
automatically be preferred over the closed source projects.

[tfs-changeset: 1559910]


Commit migrated from https://github.com/dotnet/corefx/commit/1b77984dd736f848e39808df7802aae77b02f975
2015-12-23 19:53:16 -08:00
Eric St. John a9eea4dc67 Restore NETCore50 build of FileSystem
Bring back build that was incorrectly removed with https://github.com/dotnet/corefx/commit/dotnet/corefx@58e2f6e862060039e1ebad727d75c87703fdb2f2


Commit migrated from https://github.com/dotnet/corefx/commit/79ee3e65de790e203892a9e08be7a563ec463dab
2015-12-22 11:47:41 -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
Eric St. John abba3c0cfb Always build desktop facades for packaged libraries
The desktop facade must go in the reference package,
so we need to build it whenever we build OS-neutral
projects.


Commit migrated from https://github.com/dotnet/corefx/commit/ca3694d68fcb133cdcdf23284e3abe71966b754d
2015-12-18 06:07:48 -08:00
Nate Amundson b099dac2fc Merge pull request dotnet/corefx#4983 from naamunds/MakeTestsAsync
Make unit tests async to work with 1 thread

Commit migrated from https://github.com/dotnet/corefx/commit/00ffa34baed8c00bc33c67aef6fb68124fe463ee
2015-12-17 18:55:39 -06:00
Eric St. John 440c1d2195 Initial integration of packaging support
Adds packages for a few libraries and integrates
package build into the binary build process.


Commit migrated from https://github.com/dotnet/corefx/commit/fa811f379c45504a4b5fdae5b08a22a31202bea9
2015-12-15 16:51:34 -08:00
Nate Amundson c1571f42f9 Make unit tests async to work with 1 thread
Currently, the tests System.IO.Tests.FileStream_SafeFileHandle.
ThrowWhenHandlePositionIsChanged and System.Net.NetworkInformation.
Tests.UnixPingUtilityTests.PacketSizeIsRespected hang when running on a
Unix machine with 1 thread.  Declaring the tests async fixes this issue.


Commit migrated from https://github.com/dotnet/corefx/commit/6d15aa69e332866e6282994edfd2de5ca0192899
2015-12-14 18:21:49 -06:00
Eric Mellino b59e56fb4e Consolidate facade project files
Commit migrated from https://github.com/dotnet/corefx/commit/f39d73a00d80c5552c3c88a6b82521c71fecf568
2015-12-14 11:06:32 -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
Eric Mellino b8670dea2f Add facade projects for all supported platforms
These facade project files were generated using a porting tool I wrote,
which examined some information from our internal build and created
appropriate project files. I have also re-generated all of the .builds
files so that they import the facade projects in the correct manner.


Commit migrated from https://github.com/dotnet/corefx/commit/58e2f6e862060039e1ebad727d75c87703fdb2f2
2015-12-10 10:29:09 -08: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 e1abc6cf8b Move the IO check for EINTR down into the native shims.
This allows for the managed code to be cleaner, and it can easily return SafeHandle objects from P/Invoke methods.
Also, it fixes the problem where some code wasn't looping on Interop.CheckIo, which is a problem when EINTR is returned.

Fix dotnet/corefx#3168


Commit migrated from https://github.com/dotnet/corefx/commit/c0ded7d939c7c8ae702586f57011265686879537
2015-12-08 21:24:30 -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
Christopher Costa 0ce492e3f9 System.IO.FileSystem, System.Net.Sockets, and System.Security.Cryptography.Algorithms used to have different builds for OS X and Linux, but now after all the shimming work that was done recently, those were consolidated into a single Unix build, with no differences between Linux and OS X. However, they still have Linux-specific and OSX-specific packages. This change consolidates these.
[tfs-changeset: 1554643]


Commit migrated from https://github.com/dotnet/corefx/commit/bd93f79901e2e9480fe0165d452949a4a1908c04
2015-12-04 10:29:38 -08:00
Wes Haggard 2b08629506 Add other library builds for System.IO.FileSystem project.
Commit migrated from https://github.com/dotnet/corefx/commit/19ab445faa47a76bb4f32aae8980ebdd412333d4
2015-12-03 17:53:16 -08:00
Eric Erhardt 2c3e768b15 Shims should use intptr_t for file descriptors.
Changing all file descriptors used in System.Native to use intptr_t instead of int32_t.  This way we can marshal SafeHandles without having to add DangerousAddRef/Release code.

Fix dotnet/corefx#2904.


Commit migrated from https://github.com/dotnet/corefx/commit/8a5cbc165a696b39b8d9bb48554c09473d4ca6bc
2015-12-02 22:30:06 -06:00
Deepak Shankargouda f5284f6fcc Created initial set of .builds files
Commit migrated from https://github.com/dotnet/corefx/commit/a20fd22b1e44d13e437c235a957a47a2af52838d
2015-12-02 14:38:03 -08:00
Jeremy Kuhne b0432d8e69 Merge pull request dotnet/corefx#4573 from JeremyKuhne/4274
Clean up path handling and align with legacy behavior

Commit migrated from https://github.com/dotnet/corefx/commit/64b3796bc9f68e30285abc6b2329a4a4aaff262f
2015-12-01 12:12:44 -08:00
stephentoub 29a8dba1c4 Disable several failing tests on OS X
One new sockets test is still failing.

And a handful of IO tests related to read-only files just recently started failing, presumably due to some kind of OS-related upgrade.


Commit migrated from https://github.com/dotnet/corefx/commit/f2199be65eb6b8020deb0a348923875020b8435a
2015-11-26 08:34:53 -05:00
Ian Hays 7d215ded5f Manually specify perf runner version to avoid lock failures.
Temporary solution to dotnet/corefx#333


Commit migrated from https://github.com/dotnet/corefx/commit/fc4748e21a2df4d5694f2483ffe0466d43bcecfd
2015-11-25 11:03:24 -08:00
Jeremy Kuhne b4e250a059 Clean up path handling and align with legacy behavior
Fixes issues with Path.GetDirectoryName() and relative paths.

- Added directory separator normalizer method.
- Added comments clarifying behavior and usage.
- Clarified and simplified internal methods.


Commit migrated from https://github.com/dotnet/corefx/commit/beb7d50f962c1ece1d11e9bb21e2ff248baea85e
2015-11-23 15:38:24 -08:00
Jan Kotas fe7a2a2dc6 Fix build break in WinRTFileStream
[tfs-changeset: 1548428]


Commit migrated from https://github.com/dotnet/corefx/commit/3e1587e687d5fb55e14e1c878bde7e7c693886b6
2015-11-14 11:51:02 -08:00
Page-Not-Found 835ffb1436 Commonfolder rename and __Error, __HResult
Commonfolder rename and __Error, __HResult


Commit migrated from https://github.com/dotnet/corefx/commit/0a1a2a024797091a645ea42561441fcd8586525c
2015-11-11 15:45:12 -05: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
Ian Hays 851c786922 Perf test targets were buggy and required specific setup to not fail. I've hardened them so that the tests can be more easily built without also running them. I also removed the v5.0 libraries requirement. This commit also allows the perf tests to be run as regular unit tests.
Commit migrated from https://github.com/dotnet/corefx/commit/fa1635c07dc664cfde16f471c296697d4fdb4c42
2015-11-04 07:58:23 -08: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
Eric St. John 8cd3109d56 Switch from using "dotnet" to using "dotnet<generation>"
All projects that previously used dotnet have been updated to specify the appropriate generation of the surface area they depend on or in the case of desktop inbox contracts, the generation that includes the set of platforms they can support.

Now all packages contain all generations of API that they have ever shipped.

In doing this I needed to change how we determine package version.  Before we ensured all assemblies would have the same version and used that.  Now we choose the max.

Additionally I needed to change how we chose which asset to use for netcore50 when the dotnet asset was obscured by a placeholder for a previous netcore release (eg System.Runtime will have placeholders for Win8 since it was inbox there).  To do this I wrote a task that uses nuget to evaluate the package assets with and without the placeholders.  In this way it chooses the "best" dotnet implementation and reference assembly to use for netcore50.

This new model made my old MSBuild-based validation impossible to carry forward, so I wrote better validation in a task that actually uses Nuget's asset resolution algorithm.  This uncovered many existing issues in packages that I have cleaned up.  The validation algorithm could use some polish but its working now.  Perf is not great, package build went from 15s to ~2 minutes.  I'll work on this some more by making it incremental (input: nuspec, output: marker created on success).  Profiling shows that most of the time is spent in calling the nuget APIs.  I'll see if I can reduce some of this with caching for things that don't change (eg: RID graph).  Ultimately I think its a reasonable tradeoff for the types of bugs I can find this way.

[tfs-changeset: 1539216]


Commit migrated from https://github.com/dotnet/corefx/commit/0931c347eb836c9da94d0d5ff9ad7a14403b9738
2015-10-18 21:12:23 -07:00
Ian Hays 1a12a1d25d Update and addition to Performance tests
- Made the existing perf tests for Linq follow the new syntax and use the new runner
- Removed all references to v5.0 libraries being required as they no longer are
- Added new tests using usage data from aspnet/benchmarks
- Modified some existing tests to be more easily comparable using analysis tools that look at inlinedata/memberdata (e.g. System.IO.Compression)
- Updated the lock files to use the latest xunit-performance package
- Modified test structure and innerIteration loops to produce more consistently repeatable results
- Updated docs with change to csproj requirements


Commit migrated from https://github.com/dotnet/corefx/commit/2ad9a6ffa7f6bcd31382372609849af5caa6a1bd
2015-10-13 14:28:01 -07:00
Jeremy Kuhne 9868dd72bf Merge pull request dotnet/corefx#3549 from JeremyKuhne/GetFullPath
Address perf for GetFullPath and defer to OS.

Commit migrated from https://github.com/dotnet/corefx/commit/acf5f71fbf8a6d6bf1081c6a9d326623b9337d78
2015-10-12 15:25:27 -07:00
Stephen Toub 4ad5069681 Merge pull request dotnet/corefx#3774 from stephentoub/cleanup_test_folder
Reorganize src\Common\tests\ a bit

Commit migrated from https://github.com/dotnet/corefx/commit/1f09da3af8bd261ae48e6405b98daf6f7fe516b3
2015-10-12 15:09:10 -04:00
Rainer Sigwald e2dd621454 Allow recursive Directory.Delete of paths with trailing slash
Fixes dotnet/corefx#3780.

FindFirstFile with a normal path will happily collapse multiple
backslashes into a single logical path separator, but when presented
with a `\\?\` path, that doesn't happen.  As a result, unconditionally
concatenating a path-separator was fine until RemoveDirectoryHelper was
always called with EnsureExtendedPrefix (which is needed for extended
path support, introduced in 0721434).  With that, Win32 FindFirstFile
returns an error if there's a double backslash in the path beyond the
prefix.


Commit migrated from https://github.com/dotnet/corefx/commit/cb3724deb88743495f8b73f56509267db9796300
2015-10-12 11:30:50 -05:00
stephentoub ba9fea449f Reorganize src\Common\tests
Our common tests folder has gotten a bit unwieldy in its organization.  This change simply moves files around to better map to how src\Common\src is organized.  Files are now stored in a path based on functionality/namespace.

I mostly kept groups of functionality together and did not attempt to reorganize at that level, e.g. I moved the src\Common\tests\System.Xml.XPath\ folder to be src\Common\tests\System\Xml\XPath\ and did not further reorganize all of the folders/files it contains.  Such cleanup can be done separately on each individual area.

Some of the files also need to be cleaned up internally, e.g. the namespace (or lack thereof), so I put such things in a path that I thought made sense even if it differs from the current namespace in the file; I wanted this change to be relatively simple and just be about moving files around to clean up the main hierarchy.


Commit migrated from https://github.com/dotnet/corefx/commit/9a5546c439f7700d3462564678aa4206c7fbf4f1
2015-10-11 15:44:39 -04:00
Jeremy Kuhne 93dce22a24 Address perf for GetFullPath and defer to OS.
This change attempts to limit the number of allocations made when evaluating
full paths. This is particularly important when Windows paths can be way over
the historical max of 260 characters. (The new max is over 32K)

We no longer kick paths in Windows that are valid, outside of paths with colons
that are not directory separators. (This has the effect of blocking alternate
data stream access- which is a legacy behavior.)

When creating directories, we still drop the trailing separator, which causes
trailing whitespace to be trimmed. This makes it particularly difficult to create
paths with trailing spaces in .NET, which is still desirable as most code has
a tough time dealing with this scenario. We'll open them fine now, which hits
the above point of not kicking valid legacy paths (paths that don't require
extended syntax).

Several simplifications to the logic were made, including moving relative segment
evaluation to shared code and calling it directly when getting directory names
rather than relying on the not-so-obvious prior behavior of GetFullPath without
"full checks".


Commit migrated from https://github.com/dotnet/corefx/commit/11b457d1186c364bdf3e7d978006eb2417e8d060
2015-10-07 11:22:27 -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 de822c50f0 Updated perf tests and documentation
- Updated getting started perf docs
- Removed caching of collections for tests; my results found the caching of negligible benefit
- Changed from MemberData to InlineData where possible to simplify matching method signatures for the perf analysis tools.
- Fixed the namespace for FileSystem tests to be the same as the other FS tests


Commit migrated from https://github.com/dotnet/corefx/commit/f551cdfe7bd815b8d99ac5577fbbc7d88b5ae472
2015-10-02 11:37:12 -07:00
Stephen Toub 73092b7818 Merge pull request dotnet/corefx#3511 from stephentoub/filestream_perf
Improve UnixFileStream.Read/WriteAsync consistency and perf

Commit migrated from https://github.com/dotnet/corefx/commit/35668ab9aa781c5a172372ea59218332181c6bbd
2015-10-02 09:38:11 -04:00
Matt Ellis c6e0d9dcf2 Update lock files
Commit migrated from https://github.com/dotnet/corefx/commit/b9f29bfa2b29055e3f93b23fadc86323f728637d
2015-10-02 00:21:35 -07: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
stephentoub e41eb4e117 Improve UnixFileStream.Read/WriteAsync consistency and perf
This commit addresses two related issues.

1) When a FileStream is created on Windows with FileOptions.Asynchronous (the default in corefx), synchronous Read and Write operations are actually implemented as blocking wrappers for ReadAsync and WriteAsync.  Since in FileOptions.Asynchronous mode ReadAsync and WriteAsync can be used to issue requests that run concurrently, this also means that a call to Read/Write could safely be made on the stream while a ReadAsync/WriteAsync operation was in progress.  In contrast in the current Unix implementation, Read/Write are not implemented as wrappers for ReadAsync/WriteAsync, so although ReadAsync/WriteAsync can have operations overlapped, using Read/Write while such an operation was outstanding could result in corruption of the FileStream, and in particular of its internal buffer.  In general, such usage patterns are not encouraged, but we should aim to be consistent across platforms in how we handle them and whether corruption is possible.

2) On Windows, when in FileOptions.Asynchronous mode, ReadAsync/WriteAsync use the stream's internal buffer directly, potentially avoiding making any asynchronous calls and just returning synchronously if the request can be satisfied using the buffer.  On Unix we were never doing that.

This commit addresses these as follows:
- One extra field is added to UnixFileStream that stores additional state used when FileOptions.Asynchronous is set.  This state includes a semaphore used to synchronize operations, as well as storage for the buffer/offset/count from the currently active async call, and a cached task that can be handed back for some ReadAsync operations.
- When FileOptions.Asynchronous is not set, little changes: Read/Write/ReadAsync/WriteAsync/ReadByte/WriteByte all check _useAsyncIO, and do exactly what they do today if it's false.
- When FileOptions.Asynchronous is set, Read/Write/ReadByte/WriteByte wrap their current behavior with calls to the semaphore's Wait/Release, such that they will be appropriately serialized with other outstanding asynchronous operations happening on the stream.  This addresses issue (1).
- For (2), when FileOptions.Asynchronous is set, ReadAsync/WriteAsync check whether there is enough data/space in the internal buffer to satisfy the request synchronously, and if there is they do the buffer copy synchronously and return an already completed task.  Since it's very common to ask for the same amount of data on each call, and thus if it's satisified by the buffer get exactly the same amount of data on each call, in ReadAsync we cache a task with a Result of the last number of bytes returned, and we reuse that task the next time if it contains the appropriate count.  This same optimization is already employed in the Windows implementation. When we do need to schedule work asynchronously, we also do so explicitly using a continuation off of the semaphore's WaitAsync rather than using the base implementation.  Due to the base Stream's implementation and its need to account for legacy async models, this ends up reducing the amount of memory used to schedule the async operation by ~50%.


Commit migrated from https://github.com/dotnet/corefx/commit/153e42839c3090de8ea705f94fd6f83b119ba4f4
2015-10-01 14:01:47 -04:00