Commit Graph
1561 Commits
Author SHA1 Message Date
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
Jeremy Kuhne 0cdda627c9 Remove WinRT specific code (dotnet/corefx#21157)
* Remove maxpath from FileSystem

* Remove unnecessary code blocks

We're getting brokered file support for a number of Win32 APIs. Copy/Move are notable exceptions.

Killing the unnecessary code to make turning on WinRT specific code paths more understandable.

* Putting Windows specific file back

Got moved out of the conditional ItemGroup.


Commit migrated from https://github.com/dotnet/corefx/commit/ba5a33a58548f8bff03f792487bee0a89b3b3125
2017-06-16 21:36:36 -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
Jeremy Kuhne e86d8a150f Start on WinRT purge in FileSystem (dotnet/corefx#21136)
* Fix String casing & other minor cleanup

Change String to string and clean up some usings, etc.

* Kill WinRT FileStream

Other minor formatting cleanup


Commit migrated from https://github.com/dotnet/corefx/commit/6bc1f118619a6e19c52bd110a49552f10e75a3a8
2017-06-16 12:33:35 -07:00
Dan Moseley 64f96fdd75 Update Pinvoke baselines to match latest modernapis.xml entries (dotnet/corefx#21028)
* Pinvoke updates

* S.S.AccessControl

* csp

* Networking

* Add issues

* comment

* Remove memory mapped file baseline

* Fix RtlGetVersion

* Remove unnecsesary baseline

* Remove dead condition

* Add comments

* Update buildtools

* Add GetKeyState to OneCore baseline

* baselines

* Fix violation in RI


Commit migrated from https://github.com/dotnet/corefx/commit/51a6f64004c28db7343e5c8605458f26bb057a18
2017-06-14 17:24:06 -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
Jeremy Kuhne 9ff1ec49c4 Fill out FileSystemInfo state when enumerating (dotnet/corefx#20716)
* Fill out FileSystemInfo state when enumerating

On Windows FileSystemInfos are filled in with state as we have
all of the state from FindFirstFileEx.

* Add more tests

Refactor Time tests and add cases for refresh state.
Fix positive attribute assertion.

* Missed one of the cases

* Tweaking the time tolerance didn't succeed.

Putting it back to -3 seconds.

* Refactor tests

Gets coverage consistent
Fixes test bug in DirectoryInfo where it was creating files for invalid attributes

* Address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/9468aedba81b7d0b43f5545fc840a53544164694
2017-06-07 19:53:15 -07:00
Atsushi Kanamori 5ee9cbce2f Fix remaining failures in System.IO.FileSystems (ILC) (dotnet/corefx#20696)
Commit migrated from https://github.com/dotnet/corefx/commit/ea928c79dfc167fa3102779971d3d5b38bd87b97
2017-06-05 09:50:26 -07:00
Stephen Toub 65e266ac0e Fix tests to catch exceptions from CanCreateSymbolicLinks
It's failing on some platforms.


Commit migrated from https://github.com/dotnet/corefx/commit/79878e1a09689699beb8bd45c18fa0c64dc22ddf
2017-06-02 17:49:15 -04:00
Stephen Toub af01901c62 Remove TemporaryDirectory/File from FileSystem tests (dotnet/corefx#20576)
* Remove TemporaryDirectory/File from FileSystem tests

* Explicitly set UseShellExecute=false in MountHelper


Commit migrated from https://github.com/dotnet/corefx/commit/a84b402d70d5720268649c4707ddb3152974fa08
2017-06-01 13:10:17 -07:00
Stephen Toub 16918b2d2f Merge pull request dotnet/corefx#20453 from stephentoub/fix_writealltextasync
Fix incorrect length in File.WriteAllTextAsync

Commit migrated from https://github.com/dotnet/corefx/commit/d9beba5aa9193e6d25d4859fb7fccee0e4f84d0c
2017-05-30 15:23:43 -04:00
Stephen Toub 068288ca1d Fix incorrect length in File.WriteAllTextAsync
Commit migrated from https://github.com/dotnet/corefx/commit/fb8b5bd13c0251b01a88cd3e65962ec2575fb023
2017-05-30 12:25:40 -04:00
Stephen Toub 3e9f125193 Re-enable two file tests on Unix
Commit migrated from https://github.com/dotnet/corefx/commit/78f5d88949abdb38d2add3c3ffca2ecdd9f6b00f
2017-05-29 22:59:28 -04:00
Eric StJohn eb4fbea10f Merge pull request dotnet/corefx#20322 from ericstj/updateConfigurations
Update configurations

Commit migrated from https://github.com/dotnet/corefx/commit/2a1751d92d3124c3a34ba28839f1a624cec1e0a9
2017-05-26 12:28:01 -07:00
Morgan Brown c748507f03 ISerializable cleanup (dotnet/corefx#20220)
* Changes to throw PlatformNotSupportedException from ISerializable.GetObjectData and serialization constructors on non-serializable types. Also removes private serialization constructors and some unneeded code that was used to support serializing non-serializable types. A few tests testing GetObjectData implementations are also removed.

* Address code review comments.

* Change exceptions' GetObjectData to just call base rather than throw. This makes them behave consistently with exceptions that didn't override GetObjectData.


Commit migrated from https://github.com/dotnet/corefx/commit/a82f54bd51e22ec3eb14eb5d8f572f022becb8e3
2017-05-25 12:38:09 -07:00
Eric St. John af1d155bf6 Remove help VS comments
Many CSProjs included the comment
`<!-- Help VS understand available configurations -->`

These aren't handled well by the tooling that rewrites projects and weren't providing much value.

Remove them.


Commit migrated from https://github.com/dotnet/corefx/commit/5ba948d13e3177c2c7075b6b00791e574bfa0860
2017-05-25 11:10:27 -07:00
Santiago Fernandez Madero c65dd7a4bd Test attributes cleanup for Uap now that Uap flag includes UapAot (dotnet/corefx#20108)
* Update xunit extensions to unify TargetFrameworkMonikers.Uap to include UapAot

Commit migrated from https://github.com/dotnet/corefx/commit/652d12bf31606eeef8fe8b9a7bf1cc7af06f6352
2017-05-22 15:10:24 -07:00