Commit Graph
582 Commits
Author SHA1 Message Date
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
Dan Moseley 7ff36f9dd9 Fix IsDriveNTFS (dotnet/corefx#18039)
* Fix IsDriveNTFS

* Case insensitive.

* string


Commit migrated from https://github.com/dotnet/corefx/commit/9f742250f9b93411697bb1a6773db088f5cf304d
2017-04-06 22:35:09 -04:00
Alex Perovich c40989b8f7 Check if destination exists in Directory.Move (dotnet/corefx#17913)
* Check if destination exists in Directory.Move

Fixes dotnet/corefx#12396

* Fix tests

* Update DirectoryInfo.MoveTo as well


Commit migrated from https://github.com/dotnet/corefx/commit/074bf02532c4c4496e7c79e03b4801e848848509
2017-04-04 21:20:51 -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 17206626b1 Fix netfx disabled tests in IO FS
Commit migrated from https://github.com/dotnet/corefx/commit/245486297467081f6d105085e3d74ece8351c897
2017-03-30 13:58:24 -07:00
Ian Hays 59871c58b2 PR feedback for IO test audit for netfx
Commit migrated from https://github.com/dotnet/corefx/commit/48014e40bcc539f6a71c09aaf38779d06fbb716e
2017-03-30 13:19:35 -07: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
Ian Hays 9bef00f9b6 Update IO test for new Wildcard chars
This test has been disabled since the new Wildcard characters were allowed. This PR re-enables them and handles the new characters.


Commit migrated from https://github.com/dotnet/corefx/commit/fc2817fc00006757aa835d8aa11dbd113b9093b0
2017-03-29 10:54:43 -07:00
Ian Hays 1ba1ed145a Move SetCurrentDirectory test to RemoteInvoke. (dotnet/corefx#17456)
Tests that alter the current directory should all be done via remoteinvoke to not interfere with other tests that rely on the currentdirectory in some form or fashion.

Commit migrated from https://github.com/dotnet/corefx/commit/a0b0e14a7e04355e84924c540caa3dd0510257be
2017-03-23 18:22:10 -07:00
Viktor Hofer e0d9f18004 Reenabled DirectoryLongerThanMaxLongPath test
Commit migrated from https://github.com/dotnet/corefx/commit/5b5ae0692247a921160f4a428d4131abd849f1b0
2017-03-21 20:19:03 +01:00
Viktor Hofer 31d2798633 removed outdated comments from System.IO.FileSystem tests
Commit migrated from https://github.com/dotnet/corefx/commit/e4cc8fc1a4b9711e3d4348db5d94d89e8b8bad7d
2017-03-21 11:31:38 +01:00
Viktor Hofer 81fe899ad1 Changed ExpectedException to NotSupportedException for methods that use GetFullPath
Commit migrated from https://github.com/dotnet/corefx/commit/e2f385ea59fb971706cc72592a2e12b01efd2e8f
2017-03-21 02:20:00 +01:00
Steve Harter 1380db7ec3 Change tests that use async void to async Task
Commit migrated from https://github.com/dotnet/corefx/commit/39883264a961957d29bd535e2854eed8056343f0
2017-03-10 10:47:53 -06:00
Santiago Fernandez Madero fec48e1004 Desktop tests run progress (dotnet/corefx#16706)
* Desktop tests run progress


Commit migrated from https://github.com/dotnet/corefx/commit/e927c26d055acc9fbd841fe53366488da237d299
2017-03-07 13:44:12 -08:00
Tom Deseyn 7129659f1c Detect Unix paths on Unix and Dos&Unc paths on Windows (dotnet/corefx#15925)
* Uri: detect Unix path on Unix, detect Dos&Unc path on Windows

* Update System.IO.Packaging/tests

* Update System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests

* Update Common.Tests

* Update System.Private.Uri.Functional.Tests

* Update System.Private.Uri.ExtendedFunctional.Tests

* Update System.Runtime/tests

* Uri.MethodsTests.cs: comment out failing inputs

* Restore uri minimal length of 3

* Require unix paths to start with a /

* Allow Unix path file uri to start with '\'

* FileWebRequestTest: revert extra slashes added (file:/// back to file://)

* Uri: fix empty newHost bug and revert workaround in IriTest

* Annotate PlatformSpecific tests

* IdentityHelperTests: use file path that works on Windows and Linux

* System.IO.Packaging/tests: rename s_LocalFile to s_fullPathToLocalFile

* Uri: update comments on minimal Uri length check, don't check length twice on Windows

* Use PlatformDetection.IsWindows

* Ensure Roslyn gets rid of UnixPath checks on Windows by adding IsWindowsSystem (const bool) checks

* Uri: Fix uapaot build by including Uri.Windows.cs

* IdentityHelperTests: rename GetNormalizedUrlHash_Unix -> GetNormalizedUrlHash

* Uri.MethodsTests: don't require GetHashCode to return different values when Uris only differ in case

* s_IsWindowsSystem -> s_isWindowsSystem

* Detect Dos and Unc paths on Unix

* Update tests

* Clean-up

* Clean-up II

* Clean-up III

* Clean-up IV

* Clean-up V

* Move Flags.UnixPath to the end of the Flags enum


Commit migrated from https://github.com/dotnet/corefx/commit/7df6b74cc4aeebc86e76b5c7901a59fa7fa793f6
2017-03-04 16:37:19 -05:00
Ian Hays cb1c596f44 Add fileshare verification to lock/unlock osx test
Commit migrated from https://github.com/dotnet/corefx/commit/79b2895eae0d31872cc348307556e07f9c631a74
2017-02-24 14:28:04 -08:00
Ian Hays ffc47c6dd0 Cleanup File Lock/Unlock OSX tests.
Commit migrated from https://github.com/dotnet/corefx/commit/21dd604a2a8d1e76925f01f34849ad442308f28f
2017-02-24 13:21:42 -08:00
Drew Scoggins e01f5d923c Update performance csprojs
Update the csproj files of all of the performance tests to reference the
PerfRunner csproj.  Also make a change to the PerfRunner csproj to mark
it as a test project so that it can use the generated test runtime for
dependency resolution.


Commit migrated from https://github.com/dotnet/corefx/commit/495e4e8dbdeb0fbe904c323a0ac83f630d44bc8d
2017-02-22 15:50:42 -08:00
Jon Hanna aa4b36ebfa Fix several typos (dotnet/corefx#16264)
* Fix several typos

coment → comment
rangecheck → range check
testcase → test case
deffer → defer
everytime → every time
whitespaces → whitespace (whitespace is uncountable)
white space → whitespace
white spaces → whitespace
the the → the
a → a
nametest → name test
scaned → scanned
and and → and
undecision → indecision
are no whitespace → is no whitespace
Whidbey casing
Everett casing
unkown → unknown
messsage → message
mesage → message
mesasage → message
publically → publicly (publically is attested but questionable).
exceptionto → exception to
mutatable → mutable
implemention → implementation
hadnt → hadn't
couldnt → couldn't
wouldnt → wouldn't
wont → won't
isntead → instead
preocessor → processor
particural → particular
interations → iterations
enterying → entering
stoppped → stopped
stoped → stopped
verication → verification
compuatation → computation
revisisted → revisited
partioner → partitioner
lock'ed → locked
table'd → table would
hashtable'ed → hashtabled (still coining, but tabled is analogous)
intialize → initialize
calcuate → calculate
perfom → perform
performr → perform
matthing → matching
corect → correct
thorw → throw
supress → suppress
reqeust → request
mutliple → multiple
ot → to
trival → trivial
upto → up to
specfices → specifies
patttern → pattern
descrepancy → discrepancy
explict → explicit
implict → implicit
usign → using
non-sensical → nonsensical
contination → continuation
producs → products
childred → children
parametr → parameter
approriate → appropriate
insted → instead
expection → exception
successsfully → successfully
funtion → function
unqiue → unique
apparant → apparent
expception → exception
conatined → contained
apssed → passed
propogate → propagate
cutoms → custom
currrent → current
curent → current
concurent → concurrent
coplted → completed
unexcepted → Unexpected (where the latter seems more appropriate)
to to → to
abd → and
refence → reference
particiant → participant
cuurrent → current
extratc → extract
cparticipant → participant
ehich → which
choosen → chosen
mske → make
alread → already
aquire → acquire
droppping → dropping
intial → initial
tru → true
aprticipant → participant
excption → exception
sempahore → semaphore
fileds → fields
threashold → threshold
duting → during
didnt → didn't
atribute → attribute
serliazation → serialization
localy → locally
channge → change
prperties → properties
attrbute → attribute
sentinal → sentinel
shoukd → should
existant → existent
commnent → comment
expeted → expected
propert → property
commnet → comment
datat → data
ther → the
mach → match
inhertiance → inheritance
convience → convenience
completley → completely
otheriwse → otherwise
actuall → actual
inefficent → inefficient
defalut → default
comparsion → comparison
charcters → characters
postion → position
aleady → already
charater → character
incosistent → inconsistent
seperate → separate
veify → verify
currentlly → currently
corect → correct
betwwen → between
omiting → omitting
readr → reader
compae → compare
allways → always
thown → thrown
with with → with
usecase → use case
avare → aware
lexem → lexeme
grammer → grammar
oposite → opposite
overrided → overridden
everithig → everything
chages → changes
memeber → member
proerties → properties
identifer → identifier
doesnot → does not
deriaved → derived
varialble → variable

* defered -> deferred

* Revert changes within clrcompression.

* Revert underreach → under-reach

* Fix casing broken while fixing spelling.

* Use type name instead of "Diagnostic sources"


Commit migrated from https://github.com/dotnet/corefx/commit/f0ccd9742065ee2aa296448fe3dd38ef6ff77af9
2017-02-17 10:31:00 -08:00