Commit Graph
155 Commits
Author SHA1 Message Date
Adeel Mujahid 58fa9fe4de Remove Format wrappers around interpolated strings (#40231) 2020-08-01 07:59:07 -07:00
Matt Kotsenas 1f62294e4c Remove unused locals in System.IO.FileSystem.* (#39552)
* Remove unused locals in System.IO.FileSystem.AccessControl

* Removed unused locals in System.IO.FileSystem.DriveInfo

* Remove unused locals and methods in System.IO.FileSystem
2020-07-17 21:26:06 -07:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
Alexander Köplinger da10ba8ca7 Use ConditionalFact/Theory for skipping RemoteExecutor on unsupported platforms (#37479)
RemoteExecutor doesn't work on platforms that can't spawn processes like iOS/Android/WebAssembly.
2020-06-09 12:40:44 +02:00
Santiago Fernandez Madero 110282c71b Update all issues in source code to point to runtime (#32349) 2020-02-18 15:49:23 -08:00
Stephen Toub 9999d4b86e Clean up stale issue links (#2063)
- In some cases, I deleted ActiveIssues associated with issues where the problem was supposedly fixed.  We'll see.
- In some cases, I deleted test cases entirely, e.g. where the corresponding issue said effectively "we'll live with the behavior" or "another repo is responsible for this now" (paraphrasing), or where the tests were initially added to the repo years ago already disabled and against bug numbers from some old bug database.
- In some cases, I replaced the link with the correct one.
- In some cases, I re-opened closed issues.
2020-01-23 17:05:05 -05:00
Erhan Atesoglu caa2ed9698 Rebased version of CoreFX renames (#1941)
* FinalCoreFXRenames

The last of the CoreFX renames.

* Update DirectorySearcher.cs

Fixed typo in DirectorySearcher.cs

* Update TestClasses.SimpleTestClassWithObjectArrays.cs

This fixes the expected value of the tests to runtime, instead of corefx.

* Update PersistedFiles.Names.Unix.cs

Adds a note to not update the corefx reference.
2020-01-21 20:05:51 -08:00
Stephen Toub 04f22268ef Change all ActiveIssues to use Uris instead of numbers (#1768) 2020-01-15 23:21:36 -05:00
Jan Kotas fb7edc0c3b Delete RHEL6 leftovers (#1648)
Fixes #423
Closes dotnet/corefx#24525
Closes dotnet/corefx#37739
Closes dotnet/corefx#31792
2020-01-12 12:49:27 -08:00
Jacob Lalonde f576bd51a9 Directory move fix (dotnet/corefx#40570)
* Fix to support case-insensitive directory moving/renaming

* More tests for other directories

* Include throwing win32 exp upon directory already existing

* Added ) that I dropped in previous rebase

* Directory get with pattern to check for case sensitivity

* Error message fix

* Rework to support multiple edge cases

* Rework to only support moving to the same directory case insentivity

* Handle situations for case-sensitive file systems

* Test changes

* Stopped modifying environment's current directory

* Cleanup, and tests for drive differences

* Only set route to lower, but only only compare roots ordinally

* Add additional if to check if any directory with that name exists

* Edit to what path to use

* Use destination path.

* Rework file directory scan

* Make utility function due to Any() with empty returning true

* Get the full path before getting the filename

* Check if the directory name is null or empty

* Removed extra line

* Now Defering to the OS for if the directory already exists

* Remove extra semi-colon

* Test Edit

* Comment edit

* Actually test the functionality the test is built for

* Remove platform specific tests and make them platform agnostic

* Target only OSX

* Target all platforms other than linux itself

* Changed how we detect case variants

* Remove unix specific test

* Convert OSX test into no-op test

* Code review feedback and additional tests

* Case-Sensitive file systems specific tests

* Fix to not include osx with other unixes

* Removed a ,


Commit migrated from https://github.com/dotnet/corefx/commit/e9ce2f734698ab5bf13f947c281fa4bec67b0216
2019-11-06 15:30:38 -08:00
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Stephen Toub 7ff3a1100a Reduce RemoteInvoke usage in tests (dotnet/corefx#41741)
Many of our RemoteInvokes are there purely because of needing to change the current thread culture but on UAP that actually impacting the whole process.  Until that's addressed, we can at least avoid the RemoteInvoke on all platforms other than UAP. There are also some RemoteInvokes that can be avoided by just serializing all of the (small number of) tests in a test assembly. And there's some additional cleanup to be done as well around not explicitly returning an exit code unless required.

This helps measurably with test performance.  Consider the System.ComponentModel.Annotations test suite.  On my machine, prior to these changes, it took ~25 seconds; after these changes, it takes ~0.3. It helps even more when running against a checked runtime, where all of our test costs are magnified.  With a checked runtime, prior to these changes, it takes ~196 seconds; after these changes, it takes ~2.5 seconds.  This should help measurably with CI time in coreclr.

Commit migrated from https://github.com/dotnet/corefx/commit/cd18bafbabf7fe47601f6f790d157409034a2477
2019-10-15 12:09:06 -04:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00
Viktor Hofer 0f67ef28f8 Make CoreFx.Private.TestUtilites RID-agnostic (dotnet/corefx#36207)
* Make CoreFx.Private.TestUtilites RID-agnostic

* Add version checks for other distros

https://github.com/dotnet/corefx/commit/dotnet/corefx@4f0d10773ccbb4849b869b6a0a73d5938f1804bd
Porting fix over into PlatformDetection.

* Build test lib in advance for VS support

* Disable pretest in AllConfigurations

Commit migrated from https://github.com/dotnet/corefx/commit/d3d144fad9b600a0fc1ca6fc7d65c247fddd9f04
2019-06-29 21:53:19 +02:00
Carlos Sanchez Lopez 0bbdb43e6c Fix for issue where iterating over directories ending in a dot would unexpectedly throw (dotnet/corefx#38489)
Issue
In Windows, when iterating over the files of a directory whose name ends in a dot, the iteration fails by throwing an unexpected exception, even when using the proper prefix "\\?\" for the full directory path.

Fix
Add a new boolean argument at the end of the enumeration function signatures that will indicate if the passed path is normalized or not. If it is normalized (which only happens when the path is created by us, not by the user), then we can create the handle using that path. If it's not normalized, we attempt to get its full path before creating the handle, which will throw if a full path can't be obtained.

Added a new unit test to verify the fixed behavior and updated some others whose behavior changed with this fix.

Commit migrated from https://github.com/dotnet/corefx/commit/8e95261ef710e0df980a6d46923eb3c0e8b0bc83
2019-06-20 19:58:33 -07:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00
Carlos Sanchez Lopez 24545a60b2 Directory.Move behaves differently on Unix vs. Windows (dotnet/corefx#37121)
* Directory.Move behaves differently on Unix vs. Windows

We will now throw an exception in Unix platforms like in Windows, if the destination path already exists.

* Modifying ExistingDirectory test method that verifies Move overwrite so its called by all platforms.

We already had a test method that tests Move when the destination path exists. I simply removed the platform attribute that restricted it to Windows and renamed the test method so its universal (as opposed to platform specific).

Commit migrated from https://github.com/dotnet/corefx/commit/f9c85c033361ee5bfcf43707dc6d29731f8bc3cb
2019-04-23 13:46:50 -07:00
Viktor 7e4b5f9b01 Update src folder
Commit migrated from https://github.com/dotnet/corefx/commit/817c36a05ef2d92e59ce6f5a37e2be50076361b3
2019-04-02 19:21:57 +02:00
Tomas Weinfurt 953477d303 improve detection for ReadOnly_FileSystemHelper (dotnet/corefx#35531)
* improve detection for ReadOnly_FileSystemHelper

* feedback from review

* fix bad resolve


Commit migrated from https://github.com/dotnet/corefx/commit/7d4f25f1f503f91dd680d6e2c4cb556fd4f631e4
2019-02-26 15:11:39 -08:00
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 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
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -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 bf9d6c0a95 Enumerating strings should retain trailing separators (dotnet/corefx#29413)
* Enumerating strings should retain trailing separators

This is a regression introduced by the enumeration overhaul. We didn't have tests that covered trailing separators in the specified root directory when enumerating. They should be retained as is.


Commit migrated from https://github.com/dotnet/corefx/commit/e5b4059217c9958662d8f7bc6749c8a051f55cfb
2018-05-01 12:03:34 -07:00
Jeremy Kuhne 124dbf3655 Populate the original path when creating directories (dotnet/corefx#29155)
* Populate the original path when creating directories

The DirectoryInfo class should be the same when calling Directory.Create() as
it would be creating DirectoryInfo directly then calling create on it.

* Use Combine instead of Join (for NetFX)

* Fix test

The different behavior with desktop is only with the Directory.Create
path.


Commit migrated from https://github.com/dotnet/corefx/commit/2c3bdc61c1bdae804ce862d12285934acbc85bd6
2018-04-20 15:15:08 -07:00
Anirudh Agnihotry 4891d8acf5 Accessing an accessible drive (dotnet/corefx#29010)
Commit migrated from https://github.com/dotnet/corefx/commit/e076f6b8aa94d45022ecbf29d5c485e87375823e
2018-04-11 11:48:31 -07:00
Anirudh Agnihotry ba5dcf0853 Tests for Directory Exists (dotnet/corefx#28732)
Commit migrated from https://github.com/dotnet/corefx/commit/f759243d724f462da0bcef54e86588f8a55352c6
2018-04-02 16:06:45 -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
Anirudh Agnihotry 4a52e4c4e0 Fixing NonBreakingSpace test on OSX using FSAssert (dotnet/corefx#28094)
Commit migrated from https://github.com/dotnet/corefx/commit/a89e7ad8e09fe133fefd76aea902232892453561
2018-03-15 12:45:40 -07: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
Anirudh Agnihotry 2a687498bb Test for enumerateDirectories NonBreaking space (dotnet/corefx#27762)
Commit migrated from https://github.com/dotnet/corefx/commit/61aaf07bf486e457fa6d3f19f8335b0d536d7bca
2018-03-07 16:59:14 -08:00
Anirudh Agnihotry 6dff4e5f8e enable failing tests due to paths (dotnet/corefx#27681)
Commit migrated from https://github.com/dotnet/corefx/commit/91b311e840646cd343db5cb97622b53ce14334e3
2018-03-05 10:25:12 -08:00
Stephen Toub ff964cd53c Disable failing System.IO tests
Commit migrated from https://github.com/dotnet/corefx/commit/303922a96cc14b3db2150c01f44ffe5dacb18fee
2018-02-28 09:03:28 -05: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
Jeremy Kuhne 985d730865 API tweaks to match latest updates to spec (dotnet/corefx#27102)
* API tweaks to match latest updates to spec

Add a few new tests

See dotnet/corefx#25873

* Properly clear state when enumerating on Unix.
Make sure we don't include special directories in subdir processing. Add test.
Collapse helper that was only called in one place, and remove dead one.


Commit migrated from https://github.com/dotnet/corefx/commit/1c9cd8118abfa13165d88a4e660fbdcc6c2ebc4c
2018-02-13 21:49:57 -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
Jeremy Kuhne 3307889b0c Fast file enumeration for Windows (dotnet/corefx#25426)
* Fast file enumeration for Windows

Implements an optimized, low allocation replacement for file enumeration on Windows. In preliminary tests this improves performance at least two fold, particularly for recursive searches.
Removes aggressive filter validation.
Copies and cleans up filename matching code from FileSystemWatcher.
Add length setter for ValueStringBuilder.
Remove Unix .. check for enumerable.

Commit migrated from https://github.com/dotnet/corefx/commit/eb0d4388c339288a589bdd7f5e0c9fcd61da4362
2017-11-30 15:46:56 -08: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
Eric Mellino f717af1490 Disable RecursiveDelete_DeepNesting (Issue dotnet/corefx#24242). (dotnet/corefx#24243)
Commit migrated from https://github.com/dotnet/corefx/commit/6cee65c560f1b853f67c7871345c0feacd95a070
2017-09-25 20:12:23 -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
Tarek Mahmoud Sayed 45ebc07bd8 Enable detecting Red Hat distors in PlatformDetection (dotnet/corefx#23775)
* Enable detecting Red Hat distors in PlatformDetection

* Add RedHat properties to PlatformDetection class


Commit migrated from https://github.com/dotnet/corefx/commit/f0a9551d38ddf76a02c4c65cce74559263466ddd
2017-09-05 15:03:06 -07:00
Dan Moseley 1b50c157a6 Disable RecursiveDelete_DeepNesting for desktop (dotnet/corefx#23757)
Commit migrated from https://github.com/dotnet/corefx/commit/499e099dc8e9e8495b602a623c96c8695d5a4d53
2017-09-01 16:16:20 -07:00
Jeremy Kuhne d9d8cd8b89 Add tests to validate we don't fall over enumerating files that just … (dotnet/corefx#23528)
* Add tests to validate we don't fall over enumerating files that just cross the legacy MAX_PATH barrier. As we do special logic on Windows to support long paths this is an important boundary to test. While these path lengths don't have special meaning outside of Windows, we'll always run them they should still pass .

* Conditionalize tests for long path support

NetFX needs to have the long path functionality enabled to run these
tests.


Commit migrated from https://github.com/dotnet/corefx/commit/424823b9123729ec990b31666177b6b17905eb1c
2017-08-25 17:08:27 -07:00
Jeremy Kuhne 5aaa274e86 Improve directory deletion stack pressure (dotnet/corefx#22596)
* 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
2017-08-03 16:19:02 -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