Commit Graph
102 Commits
Author SHA1 Message Date
Viktor Hofer 5a2a56bb22 Disable failing IO PathFeatures tests on netfx
Commit migrated from https://github.com/dotnet/corefx/commit/99aa6e69c24a39d6b7588bc0ce29207267e92afc
2018-09-07 22:30:34 +02:00
Viktor Hofer 49586efb0d Add uap test leg to CI
Disable/Enable tests for clean uap CI leg


Commit migrated from https://github.com/dotnet/corefx/commit/c54d4a20c315730cd76fb7688c15d0a85837f3ce
2018-08-23 20:16:11 +02:00
Viktor Hofer b998fc821e Xunit 2.4 test changes
Commit migrated from https://github.com/dotnet/corefx/commit/591f0b5ba2c0ddcdad1a326eb327936cb2dd40d8
2018-08-23 19:55:27 +02:00
Viktor Hofer 8585939ef2 Update xunit to official 2.4.0 runner
Add necessary Test SDK assemblies

Enable test sdk props & targets only for netcoreapp


Commit migrated from https://github.com/dotnet/corefx/commit/f528b668fcd06efbde72a9510feb189e3988d795
2018-08-23 19:53:34 +02:00
Marco Rossignoli e6707cf973 Add Win32 File.Encrypt/Decrypt() implementation (dotnet/corefx#31763)
* Add Win32 File.Encrypt/Decrypt() implementation

* address PR feedback

* address PR feedback

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/4451ec9d41916eccbb1dc71beae0d177815096d6
2018-08-20 17:28:41 -07:00
Viktor Hofer 6c5a27d741 Revert "Add Win32 File.Encrypt/Decrypt() implementation (dotnet/corefx#31585)" (dotnet/corefx#31725)
This reverts commit dotnet/corefx@cc9eaa79b5.

Commit migrated from https://github.com/dotnet/corefx/commit/bbda7f35fc46af191978f93434786c218cf5f12c
2018-08-12 13:37:29 -07:00
Marco Rossignoli 67d26d46e8 Add Win32 File.Encrypt/Decrypt() implementation (dotnet/corefx#31585)
* Add Win32 File.Encrypt/Decrypt() implementation

* address PR feedback

* address PR feedback

* skipt on Nano Server

* fix WinRT/UWP build


Commit migrated from https://github.com/dotnet/corefx/commit/cc9eaa79b526c2b23ee16f4e453e428e2e84a7df
2018-08-10 10:57:16 -07:00
Anirudh Agnihotry 8e9c9c4a75 Another Case where millisecond Granularity was missed (dotnet/corefx#31593)
* MilliSeconds added

* Test Added for move operation

* LastAccessTimeTest

* avoid overflow and using both seconfs and nanoseconds of the native

* feedback addressed

* Tests fixed for CI

* Feedback addressed

* method signature changed

* removing comments

* named argument added


Commit migrated from https://github.com/dotnet/corefx/commit/510eaf10912ce5790302addb0171916b9a134000
2018-08-08 22:06:57 -07:00
Anirudh Agnihotry 3dcd3db585 Using Utimes instead of utime hence setting millisecond attribute of last access and last modified time to non-zero (dotnet/corefx#31522)
* using utimes instead of utime

* Test for checking millisec attribute is set or not

* Documenting the values in case of the failure

* NanoSecond enabled

* feedback addressed

* int64_t added

* Fixing build on ci Osx(on which utimensat is not available)

* Minor nits done


Commit migrated from https://github.com/dotnet/corefx/commit/cd62bb271e98410319460b4ba48332416bcccf65
2018-08-02 14:10:30 -07:00
Dan Moseley a0fb10a2aa Fix uap failures in IO (dotnet/corefx#29816)
* Fix uap failures in IO

* Fix remaining UAP failures

* Fix RuntimeInfo tests

* Var's


Commit migrated from https://github.com/dotnet/corefx/commit/27e718dfc232c8516c69275c0444d4f81d05c3e5
2018-05-25 13:56:24 -07:00
Jeremy Kuhne 7c4ac470b7 Fix getting attributes for sharing violation files (dotnet/corefx#29790)
* Fix getting attributes for sharing violation files

Some files, such as the pagefile, refuse to allow you to get attributes directly.
You need to enumerate to get the attributes.

Enumerating is expensive, so we had changed from an opt-out to an opt-in. As
it took nearly a year to find this case, switching back to an opt-out with a
larger set of known cases where we get no value from trying again.

Also add an assert to flush out other error codes and scenarios.

* Skip lock test on MacOS (not supported)

* Nano was getting ERROR_NETWORK_UNREACHABLE


Commit migrated from https://github.com/dotnet/corefx/commit/31cdcaa77ab7d03a5430488e180cd1b47d0ee25e
2018-05-18 19:09:15 -07:00
Anirudh Agnihotry 5344a27473 Existing Directory ReadOnlyVolume Disabled for alpine (dotnet/corefx#28783)
Commit migrated from https://github.com/dotnet/corefx/commit/9403c51f2b14a2e31f5ad952c9ce28a75d4060c3
2018-04-03 12:07:36 -07:00
Anirudh Agnihotry 281ee60d7d Disabling test on alpine (dotnet/corefx#28401)
* Disabling test on alpine

* Alpine Detection added to platformDetection

* ref and win updated


Commit migrated from https://github.com/dotnet/corefx/commit/c239771fe12ad9e591fc288a8bf8757c4dba84a8
2018-03-23 09:22:35 -04:00
Stephen Toub 0b2f137b73 Fix File.ReadAllBytes{Async} for virtual file system files (dotnet/corefx#28388)
Some file systems, like procfs, can return 0 for a file's length, even though it actually contains on-demand computed contents.  This breaks File.ReadAllBytes{Async}, which currently assumes that a length of 0 means the file is empty.  This commit fixes it by changing the assumption to mean that a length of 0 means we can't depend on the Length and instead need to read until EOF.

Commit migrated from https://github.com/dotnet/corefx/commit/77bf4078608a5229afd3132115638b59215f478b
2018-03-22 23:11:07 -04:00
Jeremy Kuhne 10c2a8b41a Add more alternate data stream tests (dotnet/corefx#27945)
Commit migrated from https://github.com/dotnet/corefx/commit/de1878e129d4e44f4bccac3bae28612357c6a79d
2018-03-10 23:31:04 -08:00
Jeremy Kuhne 4f51a26e7e Start adding alternate data stream tests (dotnet/corefx#27931)
* Start adding alternate data stream tests

Also fill out ExampleTests.

* Skip on NetFX


Commit migrated from https://github.com/dotnet/corefx/commit/f35784eec7b78132e8c257e5f96f3e62aad14533
2018-03-10 17:30:01 -08:00
Jeremy Kuhne 231f26e3dd Test changes for System.IO.FileSystem (dotnet/corefx#27923)
* Test changes

- Add new tests for more coverage on enumeration
- Re-enable tests

* Add missing assert


Commit migrated from https://github.com/dotnet/corefx/commit/0e70b43de9d13a629082ec878411c4662557e9e1
2018-03-09 20:01:56 -08:00
Jeremy Kuhne 973cec3dd6 Update tests for Path changes (dotnet/corefx#27348)
* Update tests for Path changes

Updates for https://github.com/dotnet/coreclr/pull/16478

* Add back Unix active issue (wishful thinking that this would get the same error on Unix)

* Address feedback


Commit migrated from https://github.com/dotnet/corefx/commit/92afa6ec21817739ebf45cd66b4569a03b54d4c0
2018-02-22 12:13:29 -08:00
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
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
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
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
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
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
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
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
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 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
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
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
Jeremy Kuhne ea703f444c Associate dotnet/corefx#19965 with existing test (dotnet/corefx#20111)
There is a PR to fix the behavior in FileStream in CoreCLR. This
test will pass as per the Windows OS block once that change is taken.
Disabling and tracking to allow taking a new drop.

Commit migrated from https://github.com/dotnet/corefx/commit/4a62cf8ab53a9ed8ab8c7b4cae42129c8ef2bcd8
2017-05-22 11:03:56 -07:00
Jeremy Kuhne 058ab2e451 Fix Unix missing file state (dotnet/corefx#19959)
* Fix Unix missing file state

In the original .NET implementation a missing file never
throws directly with FileInfo. Attributes get the error result
from Windows (-1) and times aren't initialized.

* Feedback

* Change FileSystemTest derivation

FileSystemTest should derive from RemoteFileSystemTest so
we can have one base class.

* Add RemoteExecutorBase to performance test project

* Address test feedback

* Fix File.GetAttributes on Unix

NetFX doesn't rely on FileInfo and throws when getting attributes
on missing files through File.


Commit migrated from https://github.com/dotnet/corefx/commit/801dde95a5eac06140d0ac633ac3f9bfdd25aca5
2017-05-19 13:20:11 -07:00
Jeremy Kuhne 08efda5998 Fix using Directory to move files (dotnet/corefx#19716)
* Fix using Directory to move files

See dotnet/corefx#19710. NetFX behavior is that you can use Directory
to move files. This was broken trying to match other legacy
behavior in dotnet/corefx#17913. Tested on NetFX and CoreFX.

* Fix check for Unix

Unix impl doesn't tolerate a trailing separator. Public api
explicitly checks for this.

* More fixes and tests

Unix won't move the file with a trailing slash. Add more tests
for different combinations of trailing slashes. Validated against
NetFX.

* Attempt to get MoveDirectory further aligned

Trying to handle trailing separator on a source file cases
in the same way as Windows.

* Extend tests, move Unix condition

* Another tweak and more tests

* Fix comment


Commit migrated from https://github.com/dotnet/corefx/commit/ea514e2f4e61bd3128ea3753071af2681f17f063
2017-05-12 19:21:10 -07:00
Stephen Toub 4724fbf441 Fix sharing violations caused by FileShare.Inherited
The FileShareOpen test has been failing sporadically with sharing violations.  It turns out the problem has to do with FileShare.Inheritable being included in the list of FileShare values to test.  If another test in the same process concurrently spawns a process while a FileShare.Inheritable file is open, that file's handle will be inherited into the child process, which will in turn keep the file in use for longer than the test expects.  When it then tries to re-open the file, it may encounter a sharing violation if the subsequent open is incompatible with the previous one's FileShare.


Commit migrated from https://github.com/dotnet/corefx/commit/041672ff3642753807a4502a4c407cb82bfa1009
2017-05-09 10:00:21 -04:00
Stephen Toub 7cc690c3fe Add tests for moving to the same path w/ and w/o different casing
Commit migrated from https://github.com/dotnet/corefx/commit/631389b6937df7c9940873704cb6cd1e4d7b665c
2017-04-19 17:44:10 -04:00
Daniel Harvey 252cdc5e95 Bulk updates of tests for AssertExtensions (dotnet/corefx#18491)
Bulk update to AssertExtensions.Throws for AOT support. This doesn't disable Assert.Throws.

Commit migrated from https://github.com/dotnet/corefx/commit/b43b4df2e0e2182154bb0f425cb4a61bc1269828
2017-04-18 09:52:02 -07:00
Ian Hays e0f936a931 Merge pull request dotnet/corefx#17699 from ianhays/IO_netfxtestaudit
Get IO.FileSystem tests running on NetFX

Commit migrated from https://github.com/dotnet/corefx/commit/6800c0b0c1eead7e1b6053cfd28ecc80d1014afd
2017-04-04 02:27:10 -07:00
Alex Perovich fc4bb66b9f Fold or rename *.netstandard.cs files (dotnet/corefx#17697)
* Win32.Primitives

* System.Collections.Specialized

* System.Diagnostics.Process

* System.Globalization

* System.Globalization.Calendars

* System.IO

* System.IO.Compression

* System.IO.FileSystem

* System.IO.FileSystem.Watcher

* System.IO.Pipes

* System.Linq.Expressions

* System.Net.Primitives

* System.Net.Requests

* System.Net.Sockets

* System.Net.WebHeaderCollection

* System.ObjectModel

* System.Reflection

* System.Reflection.Emit

* System.Resources.ResourceManager

* System.Runtime

* System.Runtime.Extensions

* System.Runtime.Handles

* System.Runtime.InteropServices

* System.Security.Cryptography.X509Certificates

* System.Text.Encoding

* System.Text.Encoding.CodePages

* System.Threading

* System.Threading.Tasks

* System.Threading.Thread

* System.Threading.Timer

* System.ValueTuple


Commit migrated from https://github.com/dotnet/corefx/commit/023b6bdd6086271cbb6ca932c33d7783f8406062
2017-03-30 17:28:22 -05:00
Ian Hays ebe8f66e34 Get IO.FileSystem tests running on NetFX
There were a high number of failing FileSystem tests for NetFX. This PR modifies the tests to run on NetFX without failures and adds comments for the reasons for the tests that had to be disabled.


Commit migrated from https://github.com/dotnet/corefx/commit/7d7b9be2c0eb870658722b1b78f850fbb08b4a97
2017-03-30 12:16:21 -07:00