Commit Graph
1058 Commits
Author SHA1 Message Date
Gaurav Khanna f167b0de93 Merge pull request dotnet/corefx#19842 from ericstj/incrementVersions
Increment versions post 2.0

Commit migrated from https://github.com/dotnet/corefx/commit/45d30e6bdf44d4a0e55df5a6064e8275cdf14d25
2017-05-17 12:03:29 -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
Eric St. John e02c675179 Increment versions post 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/6c5f87319a4785499008c95b2ff5e7f13a413d22
2017-05-16 14:12:16 -07:00
Jeremy Kuhne 6624d0c80d Change CoreFX to use SetThreadErrorMode (dotnet/corefx#19801)
* Change CoreFX to use SetThreadErrorMode

See dotnet/corefx#19738. SetErrorMode isn't thread safe- we use SetThreadErrorMode
in NetFX.

* Add P/Invoke exceptions


Commit migrated from https://github.com/dotnet/corefx/commit/ac3d3ba3b4097a5626055447b39535e4ee67d9cb
2017-05-16 11:20:39 -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
Morgan Brown d8a4ca60a8 Remove unneeded Serializable attributes (dotnet/corefx#19577)
Removes unneeded Serializable attributes from enums and delegates. They
can be serialized without attributes and this will remove noise from
future serialization changes.

Commit migrated from https://github.com/dotnet/corefx/commit/2f096d410befd4b348bf0cdf9344cf2221869581
2017-05-09 20:07:36 -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 ff8fb02235 Merge pull request dotnet/corefx#18619 from stephentoub/file_move_fix
Fix UnixFileSystem.MoveFile on macOS when just changing file casing

Commit migrated from https://github.com/dotnet/corefx/commit/0ad947709f6629cf965a17ab94d9a67c3faf85b2
2017-04-19 19:10:23 -04:00
Santiago Fernandez Madero 917354ed7f Fix unix time (dotnet/corefx#18640)
* Change Unix creation time to min(ctime, mtime)

Commit migrated from https://github.com/dotnet/corefx/commit/03691e62e92c73bc0fe511c25723bee70bedffc3
2017-04-19 15:16:22 -07:00
Stephen Toub 7e85c7bc3e Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/b6bbe8a43984f291e01113161efe1bc6e322815f
2017-04-19 17:58:29 -04:00
Stephen Toub 40aa52a030 Fix UnixFileSystem.MoveFile on macOS when just changing file casing
Neither the link/unlink nor copy-all-data approaches work well on a case-insensitive file system when just changing the casing of the file name.  This commit adds an upfront check that detects when the files are the same, and in such cases, just does a rename.


Commit migrated from https://github.com/dotnet/corefx/commit/f29050cf9cad6e62afc3cb4917e1e9056a1abe3c
2017-04-19 17:44:11 -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
Stephen Toub 232f406514 Change FileSystemInfo.CreationTime fall back on Unix
If birth time isn't available, CreationTime currently falls back to `default(DateTimeOffset)`.  This changes it to instead fall back to the last access (st_atime) or status change time (st_ctime), whichever is older.


Commit migrated from https://github.com/dotnet/corefx/commit/c13adf13144fd5e5b88593481d1c129ade8fa558
2017-04-15 07:14:13 -04: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 a61adf8725 Remove unnecessary pinvoke (dotnet/corefx#18234)
* Remove unnecessary pinvoke

* baseline


Commit migrated from https://github.com/dotnet/corefx/commit/2922997b029343688bfbc28aba5b34f16d4b97f3
2017-04-11 21:44:54 -07:00
Wes Haggard 4185183e8c Updates how we define which key an assembly uses
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.

This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.

As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).

Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.

The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility


Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
2017-04-10 12:51:50 -07: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
Stephen Toub 18454a7776 Merge pull request dotnet/corefx#17864 from danmosemsft/deadfiles.handles
Remove dead handle files and FileOptions

Commit migrated from https://github.com/dotnet/corefx/commit/9f8b78d63b308e03895dd11d024f9f15893177cc
2017-04-04 09:15:25 -04: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
danmosemsft 9349d4123c Add dead file
Commit migrated from https://github.com/dotnet/corefx/commit/a364f206761576b356c5b76d2d544d725714b95e
2017-04-03 22:53:48 -07:00
danmosemsft e51006c612 Remove dead handle files
Commit migrated from https://github.com/dotnet/corefx/commit/13f626390abb1876f6c27517c91ee71547ca8667
2017-04-03 22:51:06 -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
Dan Moseley 0893aea8f5 Some PNSE messages (dotnet/corefx#17471)
* PNSE for S.Threading.Thread

* PNSE for S.S.Permissions

* PNSE for M.W.Registry

* PNSE for S.R.Extensions and S.IO.FS

* Fix UAP build

* PNSE for IsolatedStorage

* msg

* Remove dead COR_E_PLATFORMNOTSUPPORTED


Commit migrated from https://github.com/dotnet/corefx/commit/1fa2fe8a9307b7b0d3901f989a2f69f5027d949c
2017-03-24 12:58:51 -07:00
danmosemsft 178f016f98 Revert "PNSE for S.R.Extensions and S.IO.FS"
This reverts commit dotnet/corefx@307bac3faa.

Revert "PNSE for M.W.Registry"

This reverts commit dotnet/corefx@adbe4cbaf8.

Revert "PNSE for S.S.Permissions"

This reverts commit dotnet/corefx@e5d7a7375d.

Revert "PNSE for S.Threading.Thread"

This reverts commit dotnet/corefx@8843d304e3.


Commit migrated from https://github.com/dotnet/corefx/commit/d61fe82d02f8bb2aeb63ddffaa6ac62d4e59d822
2017-03-23 21:21:16 -07:00
danmosemsft 2557c3a1c6 PNSE for S.R.Extensions and S.IO.FS
Commit migrated from https://github.com/dotnet/corefx/commit/307bac3faa908a2631be22601e8626df95381a62
2017-03-23 21:11:16 -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
Jan Kotas 5eec27f44b Delete FileStream implementation moved to corelib
Commit migrated from https://github.com/dotnet/corefx/commit/edca1aaaaf7f1e8111fb1c07eac9cf5c99b87a5e
2017-03-17 06:12:59 -07: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