Commit Graph
601 Commits
Author SHA1 Message Date
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
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
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
Morgan Brown 975ad3c685 Scale back [Serializable] CoreFX types (dotnet/corefx#19742)
* Remove SerializableAttribute from many CoreFX types that will not be serializable.

* Removes serialization tests for types that are no longer serializable and fixes serializing a couple of types. Includes marking some internal serializable types as public so that they'll be reflectible with .NET Native.

* Remove unneeded pragmas

* Update based on review comments


Commit migrated from https://github.com/dotnet/corefx/commit/6dd451f51451a7d0ceea6104b51bd17005e9a0e6
2017-05-16 18:16:29 -04:00
Stephen Toub 3a5637277b Merge pull request dotnet/corefx#19759 from JasonLinMS/WslRS2Enable
Enable most corefx tests for Bash on Windows

Commit migrated from https://github.com/dotnet/corefx/commit/a118c89423c9d44efd40d62289f9ebe197054681
2017-05-15 10:05:09 -04:00
Jason Lin 996a786159 Enable most corefx tests for Bash on Windows
Many corefx tests are skipped when running on Bash on Windows. As of Win10 Creators Update, most of these skipped tests now pass, so they can now be enabled.


Commit migrated from https://github.com/dotnet/corefx/commit/cf3c7d5a3283da40e8a2849e8776e23c7292fb41
2017-05-14 21:02:27 -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 76f1ac52bf Improve logging in FileShareOpen test
This test is still spuriously failing with sharing errors.  Adding some more logging to hopefully better understand why.


Commit migrated from https://github.com/dotnet/corefx/commit/3331cdafafd1519bcb6c1f2c716bb01f34160dec
2017-05-09 07:46:00 -04:00
Stephen Toub 2117d05ebe Avoid file collisions with temporary test files
In some of our test suites, we use a pattern where a base class contains the core test logic and then derived classes override various members in those base classes to customize the actual tests.  xunit then runs the base methods for each of the derived types.

Since xunit by default parallelizes inter-class, meaning it won't parallelize tests on the same class but will on different classes, tests on the base class may run in parallel with themselves, though, when actually being run for different concrete derived types.  This is problematic when the tests pick temporary file names based on the test itself, e.g. using the FileCleanupTestBase helper that derives a temporary file name from the current member name, line number, etc.

To avoid such conflicts, this changes adds a random identifier into each such temporary file name.


Commit migrated from https://github.com/dotnet/corefx/commit/8c16d26d42c3aa81b28e4aeb790a821bd67c03b8
2017-05-08 13:36:32 -04:00
Santiago Fernandez Madero 3b52c8a097 Fix some System.IO.PathTests on Desktop to support legacy path behavior (dotnet/corefx#19012)
* Fix System.IO.PathTests

Commit migrated from https://github.com/dotnet/corefx/commit/134cc0df801938a4ba3e58f902a58cec09b744ef
2017-04-27 19:17:34 -04:00
Viktor Hofer 1e99767209 Disable CDriveCase on uap (dotnet/corefx#19068)
Commit migrated from https://github.com/dotnet/corefx/commit/391a7718e2ed8797d49fd3cfa4e79a1421f6ca97
2017-04-27 23:50:27 +02:00
Viktor Hofer fe35c2bd42 LongPath generation fixed (dotnet/corefx#19054)
Commit migrated from https://github.com/dotnet/corefx/commit/48c201f8a461c74e924caa0e3b418b1076c853a6
2017-04-27 22:46:46 +02:00
Stephen Toub 2416b52796 Add tests for FileStream.BeginEndRead/Write
Enable most of the Read/WriteAsync tests to work for Begin/EndRead/Write as well.


Commit migrated from https://github.com/dotnet/corefx/commit/f815371d499a9ea8d11abfbbf9dd6b1523faec7f
2017-04-26 13:36:51 -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
Eric StJohn dc465f6e98 Merge pull request dotnet/corefx#18498 from ericstj/v2pkgAudit
Re-enable package validation and clean up package content

Commit migrated from https://github.com/dotnet/corefx/commit/af74a86c3003d487e981655283488f8b03829b29
2017-04-18 16:54:48 -07:00
Stephen Toub 9cb6d15238 Fix attribute handling of hidden directories ending with slashes
We currently consider a file to be hidden if its name starts with a period.  That applies to directories as well.  But if the directory name in the FileSystemInfo ends with a '/', then the file name that comes back from GetFileName is empty, and it's actually the GetDirectoryName value we want to check for a period.


Commit migrated from https://github.com/dotnet/corefx/commit/de10647c8f3cb4190653bf243c515d3431689004
2017-04-18 17:13:04 -04:00
Eric St. John d0cfa6fdb0 Update project configurations
Commit migrated from https://github.com/dotnet/corefx/commit/e15f244ad68b70444ad77889e5f92043d245bcdb
2017-04-18 13:28:55 -07: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
Alex Perovich b768474750 Fix S.IO.FS.Performance tests on uapaot (dotnet/corefx#18403)
* Fix S.IO.FS.Performance tests on uapaot

* Don't be windows only


Commit migrated from https://github.com/dotnet/corefx/commit/008877e13652b28fd65e421466bcc573f7bee633
2017-04-14 18:50:31 -05:00
Alex Perovich f3d4d23517 Fix S.IO.FileSystem tests running on uapaot
Commit migrated from https://github.com/dotnet/corefx/commit/518e739ee935bb00b375b757330f74368957ad90
2017-04-13 17:53:04 -07:00
Viktor Hofer 5c9c58a947 Revert "Reenabled DirectoryLongerThanMaxLongPath test" (dotnet/corefx#18298)
Commit migrated from https://github.com/dotnet/corefx/commit/9ec3892e490580dd4c7be8c9c50ff7719b0fdaeb
2017-04-12 23:49:55 +02:00