Commit Graph
630 Commits
Author SHA1 Message Date
Dan Moseley 5319d7787e Add nanosecond granularity to Unix filesystem time reads (dotnet/corefx#26176)
* Update PAL

* Revert PAL

* Add SxS struct

* Test

* CompareTo

* Simple creation time test

* CompareTo public

* Simple creation time test

* typo

* Extract method

* CR feedback

* Look for birthtimespec

* Rework to PAL approach

* comment

* typos

* typo

* Comment


Commit migrated from https://github.com/dotnet/corefx/commit/d75610efce77c2f2562c4f35de901ea38b6d43b7
2018-01-15 08:10:27 -08:00
Anirudh Agnihotry 04c6f66b04 Fix tests for path validation changes on Windows And Unix (dotnet/corefx#25788)
Commit migrated from https://github.com/dotnet/corefx/commit/fc0e922bb1d5e92414acb6869d8a7aa3502f6b1c
2017-12-08 14:41:55 -08:00
Stephen Toub e492fe23ba Disable failing tests after path validation updates
Commit migrated from https://github.com/dotnet/corefx/commit/c0817aec1c3fbf9ee8bdbba286edbf1c9c3c64c4
2017-12-03 12:08:32 -05:00
Jeremy Kuhne 3307889b0c Fast file enumeration for Windows (dotnet/corefx#25426)
* Fast file enumeration for Windows

Implements an optimized, low allocation replacement for file enumeration on Windows. In preliminary tests this improves performance at least two fold, particularly for recursive searches.
Removes aggressive filter validation.
Copies and cleans up filename matching code from FileSystemWatcher.
Add length setter for ValueStringBuilder.
Remove Unix .. check for enumerable.

Commit migrated from https://github.com/dotnet/corefx/commit/eb0d4388c339288a589bdd7f5e0c9fcd61da4362
2017-11-30 15:46:56 -08: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
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
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
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
Jeremy Kuhne 7181dc2b9b Clean up attribute code (dotnet/corefx#21149)
- Cleans up and optimizes file attribute retrieval
- Adds wrapper for disabling media prompt and wraps correctly in enumerator

This is backlog work that is important for taking the next steps to removing our WinRT code.

Commit migrated from https://github.com/dotnet/corefx/commit/0cdb9f36c76927f8a2fcf57641c64e8985a48e4d
2017-06-16 16:38:02 -07:00
Tarek Mahmoud Sayed 8754550d62 Enable UAP Remote Execution for all tests (dotnet/corefx#21014)
This change to enable remote execution of all corefx tests in UAP. Because the remote execution code for UAP is using WinRT APIs and to avoid forcing adding UAP configuration to all test projects, we factor the remote execution code into its own test library (called TestHelper) which is cross compiled.

Commit migrated from https://github.com/dotnet/corefx/commit/eb2f543b189e8f7f9ae4c31e832ac9d3c22bb41a
2017-06-14 13:26:57 -07:00
Jeremy Kuhne b4d25f5103 FileStream SafeHandle ctor negative test fix (dotnet/corefx#20798)
* FileStream SafeHandle ctor negative test fix

The tests were intermittently failing on desktop as the
constructor was closing the handle when it got finalized.

- Moved the negative tests into a new class (they were running redundantly with no changes)
- Stopped creating files where it wasn't needed
- Added specific test for checking handle state and disabled for desktop with active issue

* Was looking at the redundancy as functional at the end point, not that they were calling different constructors. Putting them back in the derived classes to avoid introducing constructor overload regressions.


Commit migrated from https://github.com/dotnet/corefx/commit/dbd01e7691932235e007e454a1b7d7934b582de9
2017-06-08 15:57:53 -07:00
Atsushi Kanamori 05c6159671 Fix dotnet/corefx#19909 and reactivate tests on ILC. (dotnet/corefx#20830)
This may cause new failures on ILC runs because of new tests
running. I did not check the state of every test.

Commit migrated from https://github.com/dotnet/corefx/commit/c697135fc981a89c929995da903cdc533c7e623e
2017-06-08 14:59:58 -07:00
Dan Moseley 79994d9f1e Attempt to reenable two FileStream tests for nano (dotnet/corefx#20819)
* Reenable for nano

* Put theory back...


Commit migrated from https://github.com/dotnet/corefx/commit/3df589e9952ad6bbb07756f3b768e560c7565c30
2017-06-08 14:47:20 -07:00
Jeremy Kuhne 2863418862 Check actual set time for test (dotnet/corefx#20820)
There is already a test that checks the time is in range.
The time here shouldn't change at all- and the range I was
using wasn't tolerant enough for all of our targets.

Commit migrated from https://github.com/dotnet/corefx/commit/06b92192b96e9b377efc272b3c8749209b857f5e
2017-06-08 12:50:55 -07:00
Jeremy Kuhne 07a7560678 Handle escaping in Unix file enumeration (dotnet/corefx#20784)
* Handle escaping in Unix file enumeration

We try and align with Windows, so we'll escape out [ and /.

Adds a bunch of tests and issues for other cases that we don't
match Windows behavior.

* Clarify comments, move one case

For completeness I ran everything through RtlIsNameInExpression to
validate the "correct" results. I've commented appropriately.

I moved one test to the "normal" block that I misplaced.

* Optimize the escaping a bit

* Improve perf further

* Whoops, miscopied

* More feedback


Commit migrated from https://github.com/dotnet/corefx/commit/059eec8df974867d773178d5553ca15a487a2e45
2017-06-08 10:53:46 -07:00