Commit Graph
341 Commits
Author SHA1 Message Date
stephentoub 28a4e51856 Use PreallocatedOverlapped in FileStream
When using async operations on FileStream, each operation ends up allocating several objects.  By using a PreallocatedOverlapped, we can avoid the majority of those allocations, as well as avoid having to pin/unpin a buffer on each request.

This commit adds an optimization to FileStream that kicks in for the common case when:
- The buffer provided to ReadAsync/WriteAsync is smaller than the size of the FileStream's buffer, such that the FileStream's buffer is used.  And when...
- Operations are not scheduled to run concurrently.

When those conditions are met, we use a PreallocatedOverlapped for the operation to avoid a ThreadPoolBoundHandleOverlapped, IOCompletionCallback, and _IOCompletionCallback getting allocated for each operation.  This reduces the bytes allocated per operation by ~50% and the number of objects allocated by ~60%.  It also saves having to pin/unpin the buffer on each operation.

When those conditions aren't met, we simply use the same code that's used today.


Commit migrated from https://github.com/dotnet/corefx/commit/c01617841be8b5087ed37f64bb2395afc722e549
2016-01-25 20:35:01 -05:00
Wes Haggard 0c42f1823d Add WinRT package dependency for some projects
Windows.winmd was removed from M.TP.Private.NetNative targeting pack
so when some projects were bumped to a that version which needed
that reference they were broken. To fix we needed to explicitly add
a package dependency to M.TP.Private.WinRT package.


Commit migrated from https://github.com/dotnet/corefx/commit/674638364d94441854edf05c75e0e59a9c9a76ac
2016-01-23 22:41:01 -08:00
Wes Haggard aa2df8f523 Add Microsoft.TargetingPack.Private.* to the list of verified packages
Also updates all the package versions of the targeting pack to the latest


Commit migrated from https://github.com/dotnet/corefx/commit/a13a069c16fb6ed8bb6509a2d0a2f08d77a36b71
2016-01-23 19:32:40 -08: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
Wes Haggard 008e610056 Update pkgproj references to use metadata for common properties
Commit migrated from https://github.com/dotnet/corefx/commit/3ca77abd397d27c1cfed52135f3a4adeaf93b80f
2016-01-22 21:31:42 -08:00
stephentoub 9386f54542 Make Directory/FileInfo follow symlinks again
Previously on unix we would use stat to get information about directories and files for DirectoryInfo and FileInfo.  That meant that we wouldn't correctly report ReparsePoint for symlinks, and the code was changed to use LStat.  But that then breaks important use cases, such as by DirectoryInfo.Exist for a symlink to a directory always returning false.

This commit provides a compromise: we first use lstat, and if we find it's a symlink, we use stat but remember separately that it's a symlink so we can include ReparsePoint in the reported attributes.


Commit migrated from https://github.com/dotnet/corefx/commit/36259dc3c72fb1dc2a71a06db6f7dce9ea88c642
2016-01-22 16:35:23 -05:00
Eric Mellino 8ea5b25fe4 Fix two issues with x-plat NuGet package builds
* Microsoft.VisualBasic needs to be disabled because the source
  project cannot be built outside Windows.
* System.IO.FileSystem had an incorrectly-cased path, which I fixed.


Commit migrated from https://github.com/dotnet/corefx/commit/2bdbce4b045531d8a420472d4c03653c7fe90b42
2016-01-21 15:07:16 -08: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
Eric Erhardt 450b83451e Remove all ActiveIssue dotnet/corefx#846 attributes since dotnet/corefx#846 is closed.
Add new issues for failing tests.


Commit migrated from https://github.com/dotnet/corefx/commit/e7ce2bc4b1a25ebeb84b938bba8df7656b4357f2
2016-01-15 14:14:50 -06:00
Eric Erhardt 06df0683f8 Enable all passing tests that are marked with ActiveIssue for dotnet/corefx#846.
Commit migrated from https://github.com/dotnet/corefx/commit/1071000be4db6c545867f0a7fc41a0c4a7419dfe
2016-01-15 14:13:27 -06:00
Jeremy Kuhne 79731238b5 Merge pull request dotnet/corefx#5437 from JeremyKuhne/2632
Change ToString behavior to match .NET Desktop.

Commit migrated from https://github.com/dotnet/corefx/commit/c9ced7081c6a32f464aa41d588ec0025b399bd39
2016-01-14 17:21:07 -08:00
Jeremy Kuhne 11819d1d22 Change ToString behavior to match .NET Desktop.
.NET Desktop DirectoryInfo.ToString returns the original passed in
path as documented on MSDN. Change to match this behavior.


Commit migrated from https://github.com/dotnet/corefx/commit/1af6cc5e222aef65a83c35db34dadc83eb1f5fd5
2016-01-14 14:57:18 -08:00
Stephen Toub 4860319433 Merge pull request dotnet/corefx#5020 from mjrousos/UnixGetAttributesFix
Get Unix file stats with LStat (instead of Stat)

Commit migrated from https://github.com/dotnet/corefx/commit/984cb7dfccc5193402d118abe62b3cc26ac08a53
2016-01-14 17:48:17 -05:00
Mike Rousos 3d2b633341 Get Unix file stats with LStat (instead of Stat)
Stat was ignoring symbolic links (and getting stats for the target
instead) which caused checks for whether or not a path was a sym link
to fail on Unix.

Fixes dotnet/corefxdotnet/corefx#5015


Commit migrated from https://github.com/dotnet/corefx/commit/967cde5486cb290718b4b8f7779ccf832d5f4325
2016-01-14 12:06:45 -08: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
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