* 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
* 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
* 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
* 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
* 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
* 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
* 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
- 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
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
* 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
* 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
* 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
* 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