Commit Graph
30 Commits
Author SHA1 Message Date
Adam Sitnik 76b7dd66a3 [FileStream] Rename "Legacy" to "Net5Compat" (#50470)
* rename Legacy => Net5Compat (System.Private.CoreLib)

* rename Legacy => Net5Compat (test projects)
2021-03-31 07:01:20 -04:00
Adam Sitnik 78027273b3 More tests for FileStream edge cases (#49754)
* add StreamConformanceTests to the solution file so we can read source code from VS

* add FileOffsetIsPreservedWhenFileStreamIsCreatedFromSafeFileHandle tests

* add WriteAsyncStartsWherePreviousReadAsyncHasFinished test
2021-03-17 19:53:43 +01:00
6ef4b2e7ab FileStream rewrite part II (#48813)
* introduce WindowsFileStreamStrategy

* introduce SyncWindowsFileStreamStrategy

* introduce AsyncWindowsFileStreamStrategy

* only DerivedFileStreamStrategy needs to have a reference to FileStream

remove finalizer from FileStream, keep it only in DerivedFileStreamStrategy and LegacyFileStreamStrategy

* use the new strategies when buffering is not enabled

* introduce BufferedFileStreamStrategy

* use the Legacy strategy by default for now, add tests for the other implementation

* Apply suggestions from code review

Co-authored-by: David Cantú <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
2021-03-17 11:55:35 +01:00
Viktor Hofer ed295782bf Add workflow to update solution files with SlnGen and update them initially (#44703)
* Add slngen infra

* Update all solution files
2020-11-17 18:23:30 +01:00
09048ded38 Fix: FileStream.Dispose silently fails on Dispose when disk has run out of space (#38742)
* Save last error info in SafeFileHandle.ReleaseHandle and read it in FileStream.Dispose

* Add manual test

* Remove Debug.Fail from SafeFileHandle, automate the drive filling step in the manual test, add suggested comments, make threadstatic field static.

* Address suggestions

* Update src/libraries/System.IO.FileSystem/tests/ManualTests/ManualTests.cs

Co-authored-by: Jan Kotas <[email protected]>

Co-authored-by: carlossanlop <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
2020-08-11 09:39:56 -07:00
Viktor Hofer d0dc66bc0b Rename CoreFx.Private.TestUtilities and reference it in slns (#34656)
* Rename CoreFx.Private.TestUtilities to TestUtilities

* Add TestUtilities reference to slns
2020-04-08 01:26:53 +02:00
Anirudh Agnihotry 725968c3c5 New Configuration System (#1787)
* libraries -restore for vertical build without test restore

* Automatic test change and regex to remove the addition of an extra line at eof

* manual test restore fixed (restore completely done for vertical build)

* build native done

* Automatic ref change and regex to remove the last line

* manual reference assebly change and generated shims build

* automatic src change and regex

* native bin place and src build manual change

* apicompat and pretest.csproj done

* fixing the package build

* fixing all config

* packaging and feedback

* adding back placeholder configuration

* fixing the shims

* delete configuration.props

* making the build work in master

* Test Change

* fixing the packageing, test restore replacing TargetFramework -> OriginalTargetFramework

* delete test configuraiton.props, trailing semicolon and use targetFramework

* reverting the package change

* enable apicompat and fixing configurationGroup for individual projects

* fixing the api compat

* making ilproj work

* adding the outerBuildTest

* adding the arcade package version

* fixing the merge conflicts

* minor changes

* adding additional configs and setting the runtimeOS

* making the  vs stuff work

* removing the target Group to fix the apicompat

* fixing the linux build and some minor changes

* making additionalBuildTargetFramework LOcalProperty

* fixing the allConfigurations build

* fixing the netfx build

* fixing package Testing and restore

* Missing  TargetFrameworks tag

* making the VSdesgin stuff work

* Remove OriginalFramework Entirely

* some minor pr feedback

* RemoveExtraSemicolon

* use boolean exclude flag

* fixing yml scripts to pass tests

* adding comments and some minor feedback

* moving packaging property to correct plave

* fixing the build for web assembly

* Fixing the live ci build

* Fixing the live build for shims

* fixing the tests

* fixing the packaging and enterprise linux

* fixing  package sizes

* Fix the targetFramework

* updating the targetFramework sdl

* removing the buildOS and be able to use OSGroup as done in the old system

* Fixing the osgroup stuff for send to helix task

* Fix OSX failures

* Fixing the osx build

* uploading tmp folder to artifacts

* running restore for runtime.deproj correctly
2020-02-06 05:24:08 +00:00
Anirudh Agnihotry 3b9abae5aa Removing "netcoreapp" and "netfx" TargetGroup (#457)
* netcoreapp -> netcoreapp5.0 in .sln files

* netcoreapp; -> netcoreapp5.0;  , netcoreapp- to netcoreapp5.0-

* netcoreapp- -> netcoreapp5.0 in .csproj

* 'netcoreapp -> 'netcoreapp5.0 in .csproj

* done with libraries sub folder

* missed semicolon

* minor changes

* netcoreapp -> netcoreapp5.0 in some extra files

* vNext target variable in configurations.props

* netcoreapp => netcoreapp5/0 in some other .props file

* netcoreapp -> vnext in .csproj

* making the netcorepap framework switch work

* fixing sendToHelix and linux build

* TargetFrameworkVNext -> netcoreappCurrent

* case correct netcoreappcurrent

* fixing send to helix zip path

* netfx -> net472 in .sln

* netfx; -> net472; in .props

* netfx- -> net472- in .props

* netfx - -> net472- in .csproj

* 'netfx-> 'net472 in .csproj

* netfx -> net472 manual change

* fixing ci build for netfx

* Not trying to change the global property

* Fixing build failure due to master changes in net https tests

* adding documentaiton and fixing filtering

* netcoreapp -> netcore5.0 in py file

* changing the path to use netcoreapp5.0 version

* feedback and override corefx path corrected in installers

* remaing netcoreapp5.0 changes done

* netcoreapp-> netcoreapp5.0 after live builds

* net472 -> netframeworkcurrent
2019-12-14 12:22:29 -08:00
Adam Sitnik 72bb9d9a30 remove System.IO.FileSystem.PerformanceTests
Commit migrated from https://github.com/dotnet/corefx/commit/7179d4fe52013723574c9994df4caa3244156a9a
2019-03-05 07:09:29 +01:00
Viktor Hofer 66e8f64d31 Consume Microsoft.DotNet.CoreFxTesting package (dotnet/corefx#33423)
* Consume Microsoft.DotNet.CoreFxTesting package

* Remove code coverage dedicated runtime dir config files and switch to Coverlet

* Add global tool support in corefx

* Update code coverage docs

Commit migrated from https://github.com/dotnet/corefx/commit/ae38b7cc3762d832fdcebe27a0aab7b22ab2f3fa
2018-12-06 02:56:11 +01: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
Jeremy Kuhne 23c14fe5cf Remove FileSystem unused common files (dotnet/corefx#27184)
Also update .sln using UpdateVSConfigurations

Commit migrated from https://github.com/dotnet/corefx/commit/7eb6dba62ec630d33db7dcd9e810a937a92d975f
2018-02-15 18:45:51 -08:00
Jeremy Kuhne 8dc5e67384 Cleaning out dead code (dotnet/corefx#27150)
Also refactor Unix attribute handling a bit to be more consistent and
ensure that we don't make unnecessary addtional filesystem calls.

Commit migrated from https://github.com/dotnet/corefx/commit/16f26ba855f5cc6d52a738e8bc3856c6f77cf761
2018-02-14 22:49:17 -08:00
Jeremy Kuhne 113d51c8f3 Reduce Unix enumeration allocations (dotnet/corefx#26942)
* Reduce Unix enumeration allocations

This change factors out the FileStatus access into a helper struct and adds overloads
for the stat imports  that allow passing a span.

The next steps:

- Handle errors manually
- Skip using safehandle
- Look for further opportunities around UTF-8/16 conversion

* Address feedback

Shuffle code around a bit in FileInfo for clarity. Also shift directory determination
to FileSystemEntry to avoid allocation on links.


Commit migrated from https://github.com/dotnet/corefx/commit/c64171e379090b372fe232ec3f27a57ae838406c
2018-02-08 12:55:15 -08:00
Eric St. John d0cfa6fdb0 Update project configurations
Commit migrated from https://github.com/dotnet/corefx/commit/e15f244ad68b70444ad77889e5f92043d245bcdb
2017-04-18 13:28:55 -07:00
Wes Haggard f2fd0ea78a Update Solution files to use windows path slashes.
Commit migrated from https://github.com/dotnet/corefx/commit/f8ba7c412d06d8e4d4e6278502d4dd771a0f10bb
2017-02-03 16:31:48 -08:00
Eric St. John c2dc83e56a Sync BuildConfiguration with project PropertyGroups
Commit migrated from https://github.com/dotnet/corefx/commit/758a0e16e8c5af8741d14043f4bef1d15a79a377
2017-02-03 08:34:24 -08:00
Tarek Mahmoud Sayed 7395af32ad Enable compiling the test projects against the configuration (dotnet/corefx#15743)
* Enable compiling the test projects against the configuration

The tests were compiled using the vertical configuration and not the best configuration picked from Configurations.props. this change is fix that and have all test projects configured accordingly.
This change ensuring netcoreapp runs successfully and we'll have another rounds later for other configurations like netfx, UAP...etc.

* Fix openssl test project on Linux distros

* Update the project configurations

* Update VS solution files

* update solution files


Commit migrated from https://github.com/dotnet/corefx/commit/e79912f8b77bc22abfd85e94b74c06e5d99e8381
2017-02-02 17:54:40 -08:00
Wes Haggard c4e17cd362 Update all solution files using solution generation tool
Commit migrated from https://github.com/dotnet/corefx/commit/a822a266821cf79df96cdd77d2a3d44f1510d9a0
2017-02-02 15:44:45 -08:00
Jose Perez Rodriguez f9d4e6795d Removing netstandard configurations for things that are bellow netstandard (dotnet/corefx#15373)
Removing netstandard configurations for things that are bellow netstandard

Commit migrated from https://github.com/dotnet/corefx/commit/c656446f01db4b902b0c06b19551cc30d9dd9c6b
2017-01-24 09:40:19 -08:00
Karthik Rajasekaran 4bbdadd88a Update project configuration and sln files (dotnet/corefx#15182)
* Add ValidateVSConfigurations

* Update project config and sln files.


Commit migrated from https://github.com/dotnet/corefx/commit/f6ab339f446e37505f93ef9f430801fa1dcc05b8
2017-01-17 14:31:23 -08:00
Jeremy Kuhne a7d5c14c71 Break out nested FileStream
This breaks out the nested FileStream in preparation for
moving the code down to corlib.

Will follow up with:

1. Rename of files (from Unix/Win32FS to FS.os.cs)
2. Moving of common code to FileStream.cs
3. Copy to corlib
4. Move ref to System.Runtime and type forward to corlib
5. Further prep work for bringing up UAP 10.1


Commit migrated from https://github.com/dotnet/corefx/commit/e3fc18c58396737ee5e6bc80acf508031d63cc8e
2016-10-19 13:25:07 -07:00
Jeremy Kuhne 644299cdb6 Add Begin/End to FileStream.
Commit migrated from https://github.com/dotnet/corefx/commit/c31504af97642e9700b01258d72073fd91700298
2016-08-25 14:45:35 -07:00
Deepak Shankargouda fb583e4f16 Moving Perf tests to their own csprojs (dotnet/corefx#10192)
Commit migrated from https://github.com/dotnet/corefx/commit/c912d26b0a848477db0362ab4e00bb0e71e0273a
2016-07-20 18:38:03 -07:00
Eric St. John 54f18d06f2 Eliminate use of PackageTargetRuntime in CSPROJ
PackageTargetRuntime can now be derived from the OSGroup of the project.
Set the default values in dir.props and only override if necessary.


Commit migrated from https://github.com/dotnet/corefx/commit/7f871515097039b95b70c974eb5947fe7afaa322
2016-04-26 12:39:49 -07:00
Jan Henke 8d4d6ad8ce Implement System.IO.FileSystem assembly on FreeBSD
This adds the bits necessary to build the System.IO.FileSystem assembly for FreeBSD. I moved the Interop.posix_fdadvise.cs from Linux to Unix, since that system call is identical between Linux and FreeBSD. That file is only used for Linux and FreeBSD.


Commit migrated from https://github.com/dotnet/corefx/commit/1dd39be66ac96730992dd89ff775b245582d42b7
2015-06-15 17:14:54 +02:00
Lakshmi Priya Sekar 2a499c5cbf Remove XunitTraitDiscoverers from corefx and reference the nuget package xunit.netcore.extensions.
Commit migrated from https://github.com/dotnet/corefx/commit/03e32211d668ee215f32c599849987cb7d9d4e2a
2015-05-07 16:15:32 -07:00
Daniel Paoliello 23457c0c44 Fix for Issue dotnet/corefx#587: Modified Win32FileStream.FileStreamAsyncResult to be using a TaskCompletionSource, modified the core Read\Write methods to return Tasks, and so removed the internal Begin\End methods since they are no longer required. Also added a pair of "mini-stress" tests for ReadAsync and WriteAsync as OuterLoop tests.
Commit migrated from https://github.com/dotnet/corefx/commit/aca535e12bf3642cff2f725cbe97cd31e01a5f9c
2015-04-26 12:50:13 -07:00
Matt Ellis 53a9f1fe9a Refactor build properties for Linux and OSX builds
Previously, we used the catch all OS=Unix property in MSBuild to
determine if we were building for Windows vs Unix, and we shared the
same MSIL between Linux and OSX.  However, we have already started to
take dependencies on Linux specific APIs and we plan on using OSX
specific APIs very soon.

We don't want to try to ship MSIL that contains both Linux and OSX
specific implementations of a feature, so the build system needs to
change a little.

We'll continue to use the OS property as the entry point for the build
to specificy what platform you want to build for.  However, we now have
three platforms:

1. Windows_NT
2. Linux
3. OSX

However, the value of the OS property should not be tested directly,
instead we introduce properties about the target platform itself:

1. TargetsWindows
2. TargetsUnix
3. TargetsLinux
4. TargetsOSX

Code which works the same across Linux and OSX should be guarded by
TargetsUnix (which is true when OS is either 'Linux' or 'OSX').  Code
specific to one OS can be guarded with either TargetsLinux or
TargetsUnix.

In this change, I have simply rewritten all the '$(OS)' == 'Unix'
conditions to '$(TargetsUnix)' == 'true'.  A few libraries may do Linux
specific stuff, but we will clean up that debt when we go to flesh out
the OSX implementations.


Commit migrated from https://github.com/dotnet/corefx/commit/4d07173fbf86631d49ed56623581eff9cb7d3f87
2015-03-19 14:07:07 -07:00
Maxwe11 6a98eb9ef5 Move *.sln files to the appropriate projects folders
Commit migrated from https://github.com/dotnet/corefx/commit/fb8fb441b3e5414590b8d1af4ec5f52ca52c0dff
2015-02-20 19:52:00 +02:00