Commit Graph
1132 Commits
Author SHA1 Message Date
Anirudh Agnihotry 36b9502f92 Removed Check Invalid Path Chars (dotnet/corefx#25458)
* Removed Invalid path characters

* removed implememtation and tests

* Removed Dead Functions

* Failing test disabled

* Removed the disabled test


Commit migrated from https://github.com/dotnet/corefx/commit/06c9959e69e89645dd0c3cf5781b646028479868
2017-11-28 17:24:07 -08:00
Jan Kotas 27d98c0776 Delete unnecessary SecurityCritical and SecuritySafeCritical annotations
Commit migrated from https://github.com/dotnet/corefx/commit/0bb106232745aedfc0d0c5a84ff2b244bf190317
2017-11-19 10:37:38 -08:00
Jeremy Kuhne 4c7142aaec Clean up CreateFile usage. (dotnet/corefx#25318)
* Clean up CreateFile usage.

The "safe" create file was specifically targetted at FileStream and doesn't apply to remaining usages in FileSystem.

Also collapse a few unnecessary methods.

* Missed a file.

* Related UAP changes

* Remove unnecessary qualifiers.


Commit migrated from https://github.com/dotnet/corefx/commit/c3abf82d27ae168cfdb5965bb1a28185800a22ca
2017-11-17 18:20:39 -08:00
Jeremy Kuhne 44c8e8ab61 Use FILE_TIME in WIN32_FILE_ATTRIBUTE_DATA (dotnet/corefx#25288)
Commit migrated from https://github.com/dotnet/corefx/commit/47cb531a283ce7264544624f0942c71c106b34ab
2017-11-16 06:44:24 -08:00
Stano Peťko 1a70106b96 File path is in IO exception messages (dotnet/corefx#25195)
* Added path to message Argument_InvalidPathChars.

* Added path to message IO_PathTooLong.

* IO_PathTooLong - separate message when path is empty.

* Added argument reference to message.


Commit migrated from https://github.com/dotnet/corefx/commit/51da21f9934c63216a8d7a2eb27ec5aa97944600
2017-11-14 23:09:24 -05:00
Frederik Carlier a1d44f82ce Fix casing of .uap (dotnet/corefx#25185)
Commit migrated from https://github.com/dotnet/corefx/commit/025230bc5dacab6d012a537c583003ea96381c97
2017-11-12 22:36:21 -05:00
Krzysztof Wicher f3f741eade Use distro detection from Microsoft.DotNet.PlatformAbstractions (dotnet/corefx#24531)
Commit migrated from https://github.com/dotnet/corefx/commit/4bf90198c5e7710ea67b7c1b467e859ec8bb78e5
2017-11-03 14:30:47 -07:00
Stephen Toub 54c1d578d8 Mark applicable structs as readonly
Commit migrated from https://github.com/dotnet/corefx/commit/54e889a7c71bf22f9f1ef244a9d040fee64c74d5
2017-11-03 09:48:47 -04:00
Stano Peťko edbb8b4848 Deleted dead code from System.IO.FileSystem. (dotnet/corefx#24701)
Commit migrated from https://github.com/dotnet/corefx/commit/79089260b0bf00e99ba9dd7e736c7b2d776fed0a
2017-10-17 17:33:53 -04:00
Jeremy Kuhne 733ebce7dd Allow directory not empty errors (dotnet/corefx#24382)
If we've successfully removed all of the file content without errors we should allow for directory not empty to allow for active file handles to close.

Commit migrated from https://github.com/dotnet/corefx/commit/e791e8b7a4f1e4d6ff5b4295fad04a6c9f65e909
2017-10-03 12:52:39 -04:00
Kasper Fabæch Brandt 81f81c3e4c Add test for dotnet/corefx#24081 (succeeds after dotnet/coreclrdotnet/corefx#14043) (dotnet/corefx#24163)
Commit migrated from https://github.com/dotnet/corefx/commit/819da8af67f04867012a3fb274e1eca6078a048e
2017-10-02 23:56:07 -04:00
Eric Mellino f717af1490 Disable RecursiveDelete_DeepNesting (Issue dotnet/corefx#24242). (dotnet/corefx#24243)
Commit migrated from https://github.com/dotnet/corefx/commit/6cee65c560f1b853f67c7871345c0feacd95a070
2017-09-25 20:12:23 -07:00
Stephen Toub c58d6840dc Expose/add tests for Memory-based Stream overloads (dotnet/corefx#23776)
Commit migrated from https://github.com/dotnet/corefx/commit/4001151f37e05146e870e96f2a8d417193447c33
2017-09-11 10:03:31 -04: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
Dan Moseley e24a0bcdbc Disable RO-filesystem tests on RH69 (dotnet/corefx#23842)
* Disable RO filesystem tests on RH69

* Disable


Commit migrated from https://github.com/dotnet/corefx/commit/3f6fc6bdb578cfa06324735a2fcab09decced96a
2017-09-06 21:47:40 -07:00
Tarek Mahmoud Sayed 45ebc07bd8 Enable detecting Red Hat distors in PlatformDetection (dotnet/corefx#23775)
* Enable detecting Red Hat distors in PlatformDetection

* Add RedHat properties to PlatformDetection class


Commit migrated from https://github.com/dotnet/corefx/commit/f0a9551d38ddf76a02c4c65cce74559263466ddd
2017-09-05 15:03:06 -07:00
Dan Moseley 1b50c157a6 Disable RecursiveDelete_DeepNesting for desktop (dotnet/corefx#23757)
Commit migrated from https://github.com/dotnet/corefx/commit/499e099dc8e9e8495b602a623c96c8695d5a4d53
2017-09-01 16:16:20 -07:00
Santiago Fernandez Madero 9444c340dc Port rollback of System.IO DCR from release branch to master (dotnet/corefx#23566)
* Port rollback of System.IO DCR from release branch to master


Commit migrated from https://github.com/dotnet/corefx/commit/7f1c480a6a280fbced29606120b507596bafbefc
2017-09-01 00:18:59 -07:00
Eric StJohn 3be4c0beb2 Merge pull request dotnet/corefx#23559 from ericstj/updateBuildTools
Update build tools

Commit migrated from https://github.com/dotnet/corefx/commit/b0d2f1d49c063f4d0239a780714189391ece76a9
2017-08-28 05:49:51 -07:00
Jeremy Kuhne d9d8cd8b89 Add tests to validate we don't fall over enumerating files that just … (dotnet/corefx#23528)
* Add tests to validate we don't fall over enumerating files that just cross the legacy MAX_PATH barrier. As we do special logic on Windows to support long paths this is an important boundary to test. While these path lengths don't have special meaning outside of Windows, we'll always run them they should still pass .

* Conditionalize tests for long path support

NetFX needs to have the long path functionality enabled to run these
tests.


Commit migrated from https://github.com/dotnet/corefx/commit/424823b9123729ec990b31666177b6b17905eb1c
2017-08-25 17:08:27 -07:00
Eric St. John e047f03838 Fix errors with new CSC due to missing comma between attributes
Commit migrated from https://github.com/dotnet/corefx/commit/535828b1423795a71f0b17e0c9d00e99021deed5
2017-08-25 14:05:48 -07:00
Jan Kotas e184dce453 Make DisableMediaInsertionPrompt to be private struct to match CoreLib (dotnet/corefx#23507)
Commit migrated from https://github.com/dotnet/corefx/commit/94b19a4a2405c9fabaf6564cb49cbc4b0957ac6c
2017-08-24 17:13:27 -07:00
Stephen Toub 471a3f75a8 Add tests for FileStream span-based overrides (dotnet/corefx#23481)
Commit migrated from https://github.com/dotnet/corefx/commit/7c35a83d31acf6c8f67ab8714847c71107a8b5db
2017-08-24 12:35:39 -04:00
Jeremy Kuhne 13b6f4095c Use FromApp APIs to allow brokered file access (dotnet/corefx#23316)
* Use FromApp APIs to allow brokered file access

This changes our P/Invokes to use the FromApp variants, which
allow for brokered file access on UAP. These are only included
in the UAP build.

Adds tests for the brokered IO WinRT functions and removes a
dead option from movefile. This option was removed in Windows 8
and did not work correctly in prior OSes. (This was needed
for this change.)

This change depends on the referenced dll being packaged and
added to our dependencies. There is a related change for CoreCLR
that supports FileStream.

* Address feedback.

* Remove unused define.

* Test tweaks

* Add ActiveIssue to known test failure

Unsetting attribute after setting isn't working (only in brokered
locations).  A fix to FileApiInterop.dll is in the works.

* Disable other attributes test.


Commit migrated from https://github.com/dotnet/corefx/commit/5e16d10c41536446f7be2299c61cdc85992966c0
2017-08-21 18:34:32 -07: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
Jeremy Kuhne 5aaa274e86 Improve directory deletion stack pressure (dotnet/corefx#22596)
* Improve directory deletion stack pressure

Recursive directory deletion used particulary large frames and would easily stack overflow with deeply nested directories (especially so when running unoptimized bits).

Reduced the stack frame size by passing the native struct used by ref and removing unnecessary throw/catch blocks. Other optimizations and logic clarfications.

Made the native struct blittable and introduced a helper struct set for fixed size blittable strings.

* Update comments

* Use span prototype

* Switch to ReadOnlySpan

* Update packages

* Mark System.Memory as inbox on UAP

* Packaging fixes

* Factor out package configs


Commit migrated from https://github.com/dotnet/corefx/commit/1d3cc0417753bf0a436824abfeff9c3c1712f63f
2017-08-03 16:19:02 -07:00
Santiago Fernandez Madero 4cf54c17b9 Fix System.IO.FileSystem.Tests in UapAot (dotnet/corefx#22513)
* Fix System.IO.FileSystem.Tests in UapAot

* Fix CI Failures


Commit migrated from https://github.com/dotnet/corefx/commit/912d2e27375f8f74a15b87dbef212027827f127b
2017-07-21 21:33:59 -07:00
Santiago Fernandez Madero e8aa3151cc Re-enable long path tests for Uap (dotnet/corefx#22505)
Commit migrated from https://github.com/dotnet/corefx/commit/b2b47908656ef3b7dcaef62fb342e12aee5f34c4
2017-07-21 15:30:49 -07:00
Stephen Daudell 0d59144bf9 Remove ActiveIssue for PathTooLongException related tests. (dotnet/corefx#22467)
* Remove ActiveIssue for PathTooLongException related tests.

* Fix for *nix and OS X tests.


Commit migrated from https://github.com/dotnet/corefx/commit/87e0f78e812f6fe42413cae99d6f83ce81cd9fc9
2017-07-20 19:16:22 -07:00
Jeremy Kuhne 1450695794 Nested directories were too deep (dotnet/corefx#22448)
* Nested directories were too deep

Nesting directories with Windows paths were over 800
levels deep, causing intermittent issues with stack overflows.
Making directory segments longer to mitigate.

* Use "N" format for guids per feedback


Commit migrated from https://github.com/dotnet/corefx/commit/27886bcb3d016a744e7461b3e378e7261230960f
2017-07-19 22:51:00 -07:00
Nina Chikanov 4b3e622648 Remove ActiveIssue(21358) on WhiteSpace changes (dotnet/corefx#22449)
Changes fully merged in, no longer active issue

Commit migrated from https://github.com/dotnet/corefx/commit/9714cced3ff1e4c525ceecadb5bfa74ce00eefa3
2017-07-19 22:04:21 -04:00
Jeremy Kuhne 3e60882c30 Tweak path related tests (dotnet/corefx#22407)
* Tweak whitespace related tests

Needed to update a few tests for unix whitespace behavior.

* Fix more test issues

Also add another assert extension for three exceptions.


Commit migrated from https://github.com/dotnet/corefx/commit/449e350e27553320a6592be295f05fe1bd0ab2f0
2017-07-18 16:08:19 -07:00
Jeremy Kuhne ffdd2b2904 Fix test assertions for long paths (dotnet/corefx#22393)
We don't preemptively check path length any more. The OS errors we
get back can either be PathTooLong or NotFound depending on the
environment and requested path.

Commit migrated from https://github.com/dotnet/corefx/commit/65ba2083ae5c16163465a1e06aca88b81232b333
2017-07-18 13:57:03 -07:00
Maggie Tsang de23cb7a6f Converted sudo commands to class helper (dotnet/corefx#22349)
Commit migrated from https://github.com/dotnet/corefx/commit/ba1d772fcc812626330b4f354500a03cf965238e
2017-07-17 20:14:28 -07:00
Stephen Daudell c247a3e484 Update tests for long path support in CoreCLR (dotnet/corefx#22190)
* Updated tests to correspond to dotnet/coreclrdotnet/corefx#12786.

* Addressed review feedback.


Commit migrated from https://github.com/dotnet/corefx/commit/b6b0a3c54100ea93375c6a8b6646f1e9bf13c6b0
2017-07-17 17:24:49 -07:00
Nina Chikanov 21eb406937 Update tests for pending whitespace trimming changes (dotnet/corefx#22341)
* Update tests for pending whitespace trimming changes coreclr/dotnet/corefx#12862

* Fix attribute for ActiveIssue


Commit migrated from https://github.com/dotnet/corefx/commit/88ece1d0c6a247c669831f15929d2bb271bba26e
2017-07-17 17:11:09 -07:00
Maggie Tsang 5804e97029 Created admin helper file (dotnet/corefx#22046)
Commit migrated from https://github.com/dotnet/corefx/commit/3f2328a78214cd5c921be42d5d439204db3a2dcf
2017-07-17 15:06:40 -07:00
Jose Perez Rodriguez 14877c8a9d Merge pull request dotnet/corefx#22273 from joperezr/Pipes
Move NamedPipe tests to use Local prefix

Commit migrated from https://github.com/dotnet/corefx/commit/c54a7a72e70cb5dad09dd6fef6aea9a8d5441e4a
2017-07-17 08:42:31 -07:00
Jose Perez Rodriguez 64e57a887e Move NamedPipe tests to use Local prefix
Commit migrated from https://github.com/dotnet/corefx/commit/eaeab5f3c8e0fe5f57563b0a43e69eb69e183c3f
2017-07-17 08:41:51 -07:00
Stephen Daudell f1d375cf9b Remove preemptive checks for path being too long in CoreFX (dotnet/corefx#22131)
* Removed preemptive checks for path being too long.

* Updated tests to catch proper exception.

Fixed an issue in IOInputs.cs where MaxLongPath was not being initialized correctly.

* Rework improper test change.

* Addresed some feedback and hopefully fixed failing unit tests.

* Go back to expecting PathTooLongException on all platforms for this test.

* Adjusted to handle either exception on non netfx.


Commit migrated from https://github.com/dotnet/corefx/commit/f2e440450e8b52317f08c21fe66f70141c9e933c
2017-07-12 16:09:00 -07:00
Nina Chikanov 06a245c05c Merge pull request dotnet/corefx#21955 from nchikanov/toTheory
Convert Tests to Theory

Commit migrated from https://github.com/dotnet/corefx/commit/3acd6a732a12a48e0f5a02b5936071135b5225ae
2017-07-07 10:36:15 -07:00
Maggie Tsang 0d719a615b Increased timeout (dotnet/corefx#21962)
Commit migrated from https://github.com/dotnet/corefx/commit/d719fff783ad089bc7b6ccda67941306f1a0a6c3
2017-07-06 17:36:52 -07:00
t-nichik 6dd2e79756 Split TrailingWhiteSpaceExistence into two tests
The test depended on two different IOInputs functions
(GetSimpleWhiteSpace and GetWhiteSpace). Previously didn't notice so
split the test into two to address both functions.


Commit migrated from https://github.com/dotnet/corefx/commit/ccff43e892dac662b67327aad3d7e20625f3f2bc
2017-07-06 16:50:08 -07:00
t-nichik 8162a540bc Convert Tests to Theory
Converting tests from Fact to Theory to make it easier to recognize
which tests are failing instead of spending time sorting through
ambiguous test output.


Commit migrated from https://github.com/dotnet/corefx/commit/343e20e1452d9eb0267f4e28a3650417a7fb6ae6
2017-07-06 13:37:26 -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
Maggie Tsang dd6f456515 Read only file system delete tests (dotnet/corefx#21684)
* Read only file system delete tests

Tests to validate behavior for directory and file delete for read only
file systems on Unix.

* Addresses feedback


Commit migrated from https://github.com/dotnet/corefx/commit/b61fa81efee8003f34dfed3bfbe093e45ac06fed
2017-06-30 10:17:07 -07:00
Jeremy Kuhne 6563c7348e Add converter from IEnumerable to TheoryData (dotnet/corefx#21671)
* Add converter from IEnumerable to TheoryData

Manipulating test input data in IEnumerable format is
desirable, but a bit awkward to get into IEnumerable<object[]> format that [Theory] expects.

Add test project to new test project. :)  Change a test in
System.IO.FileSystem to theory with new extension.

* Fix performance test project

* Run the UpdateConfigurations target

* Add netfx reference


Commit migrated from https://github.com/dotnet/corefx/commit/94b2a85c837a536096af1a7bc3812feef45e9ecb
2017-06-28 21:15:33 -07:00
Stephanie Niu 44d7080515 Read-only delete fix for Linux. (dotnet/corefx#21588)
* Read-only delete fix for Linux.

Fixed error with read-only file system, non-existing files being deleted.

* Addressed feedback on initial commit.


Commit migrated from https://github.com/dotnet/corefx/commit/26abbf0ad427a2c351533ad2b1440e1c01287497
2017-06-27 17:41:19 -07:00
Santiago Fernandez Madero 2b497a7da4 Disable System.IO.FileSystem NamedPipe for UAP (dotnet/corefx#21448)
Commit migrated from https://github.com/dotnet/corefx/commit/d06e8551daa6fa07efac52a0caf359131dac8bd5
2017-06-23 08:25:24 -07:00
Krzysztof Wicher 307239626a Fix System.IO.FileSystem UAP failures (dotnet/corefx#21277)
Commit migrated from https://github.com/dotnet/corefx/commit/7d5d44a6a905624b066a768c68e413b6d40be9e0
2017-06-20 17:27:21 -07:00