* Replace "Assert.Equal(true, " with "Assert.True("
* Replace "Assert.Equal(false, " with "Assert.False("
And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.
* Replace "Assert.StrictEqual(true, " with "Assert.True("
* Revert a few changes where true/false was being compared to object
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
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
Assert.Equals on arrays boxes each element and then performs a complex
operation to compare each box. This is slow for large arrays, and extremely
slow for large arrays on checked CoreCLR.
Use AssertExtensions.Equal for large arrays in File.Copy tests to make
them reasonably fast on checked CoreCLR.
Commit migrated from https://github.com/dotnet/corefx/commit/c53300f0696c4817bc06a8ef8711a0bb46f362ec
* Factor out repo restore into seperate props/targets
* Use configuration system msbuild sdk
* Remove XUnit.Runtime.depproj
* Remove TargetGroup usages in test projects
* Fix ILLink configuration
The ILLink package contains netcoreapp2.0 assets which are compatible
with netstandard2.0. Removing the old TargetFramework to restore
successfully.
* Remove usages from TargetGroup in Directory.Build.props
* Remove dead net4* configurations
* Change tests.builds to tests.proj sdk proj
* Make externals dir proj an sdk project
* Consume Microsoft.DotNet.CoreFxTesting as an msbuild sdk
* Use runtimeconfig.template.json
* Remove SupplementalTestData
* Map shared framework version to product version
* Stop binplacing tests
* Move some tool depprojs to targets during restore
* Remove dead code
* Use PackageReference instead of RefFromRuntime in test
* Disable using an apphost
* Copy compression testdata manually cause unicode bug
* Remove target batching in optimizationData
* Reference packaging tools from CoreFx.Private.TestUtilities
Commit migrated from https://github.com/dotnet/corefx/commit/c4c1985531cc1f25c805bbc4801b85c98e0dfee0
In the 1903 release of Windows 10 the deletion behavior has changed. Previously, the filename would be reserved until all open handles were closed after being marked for deletion. Now the filename is immediately released.
Commit migrated from https://github.com/dotnet/corefx/commit/a4cf9a480b34a00e11201e932f7152c63b99b85f
System.IO.Filesystem's MoveFile() and ReplaceFile() use the link() syscall under some conditions to avoid a copy. This fixes two problems with that:
* MoveFile()'s fall-back does not recognize a possible Android error as non-critical, and bails out on the fall-back with an exception. From logs we know that 'strerror_r(android_error)' = 'Permission denied' so the Android error should be EACCES (we already check for EPERM)
* While MoveFile() was using a fall-back, ReplaceFile() wasn't.
Commit migrated from https://github.com/dotnet/corefx/commit/f6aed7b177580ed3953e6e23dccbe2de57850729
* 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
* making corefx compatible with newGenfacadesTask
correcting the new runtime variable
updating genfacades version to latest
fixes uap build and removes extra seed ype preferences for uapaot
* adding build configuration, comments and updating genfacadwa version
* fixing build for netcoreapaot
* removing netcoreappaot build from all configurations build
Commit migrated from https://github.com/dotnet/corefx/commit/52206f12e2a34b708f33304d9b076b4958fbaa5e
* Added support for UF_HIDDEN flag on macOS and FreeBSD (dotnet/corefx#29323)
* Changes based on review
* Reverted UserFlags field
* Sorted include in csproj
* Changed comparison style
* Reverted UserFlags field
* Fixed parentheses
* Changes based on PR review
* Add missing newline
* Add missing newline
Commit migrated from https://github.com/dotnet/corefx/commit/b37f0185ac05c9431389f333f5b2b0fc5fe93e6a
* Auto-generate the reference assemblies
* Add back type forwards.
* Revert "Add back type forwards."
This reverts commit dotnet/corefx@3acf74aabb.
* Add back TypeForwardedTo in .Forward.cs files
* Add new type forward files to the csproj files
* Add back if-defs and move TestUtilities comment from ref to source
* Remove duplicate definitions, delete unnecessary manual files,
* Fix build breaks
* Add back missing AsyncMethodBuilderAttr to S.Runtime ref
* Fix typo between XmlDocument and XPath.XDocument
* Add type forward fild missed from previous commit
* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1
* Remove "this type was moved to comments" from the type forwards.
* Add back the Xml and Debugger* attributes to Xml.ReaderWriter
* Add back struct layout attributes
* Add back attributes missing (highlighted from api compat)
* Add missing toolbox item attribute in s.data.common.
* Add missing struct layout attributes and remove unnecessary additions
* Add back InterfaceTypeAttribute
Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
* Disable Media test on NETFX
* Fix S.R.E for Uapaot
* Disable varargs for PN
* missing method 'AssemblyLoadContext..ctor(bool)
* IO test
* Fix UapAot RuntimeInformation tests
* Set correct tfm for AppDomainTests
* Merge driveonly tests into one
* Revert math
Commit migrated from https://github.com/dotnet/corefx/commit/0a751af9afe28042a720411925e6e6c55bdc10cc
Rather than having Environment partially live in corefx and call into an EnvironmentAugments type in CoreLib that in turn calls into an Environment type in CoreLib, we're just moving Environment to live in CoreLib.
To start that, this PR moves Environment and its dependencies from their current locations into the shared CoreLib. Those changes will mirror over to coreclr. After that, I'll fix it up to work in CoreLib. And once those changes are built and available back to corefx, I'll update System.Runtime.Extensions to just use the functionality from CoreLib and delete remaining unnecessary code from corefx.
Commit migrated from https://github.com/dotnet/corefx/commit/b2d890a311ff66857339c7dae493efa43237284c
* Fix ConvertDirent for AIX by always returning PAL_DT_UNKNOWN
I commited the sin of untested code, as this function wasn't wired
up to Mono's BCL until a few days ago, and I had triggered the
situation where I needed this working by purging stale build
artifacts.
What happened here was me being too clever; I tried stat, but
we only have the file name, and from the unmanaged call stack this
would run in, we'd have no way to get the directory it's in
(without butchering the function signature) to properly use stat
for non-cwd directories. This meant that the check would get random
garbage on the stack; sometimes the data for "..", sometimes
another function would clobber it, and it'd read that. This caused
the Mono gensources tool to act erratically, preventing the BCL
from building.
Fix this by always returning DT_UNKNOWN. This isn't ideal, but the
BCL seems to handle this with grace and does a stat afterwards
to properly fill in data. It's enough to get the Mono build from
scratch working again. (The stat bit was verified by me running the
syscall tracing tool, `truss` over it, plus Mono's JIT trace.)
* Handle DT_UNKNOWN cases in FileSystemEntry.Initialize
On some OSes like AIX, we return DT_UNKNOWN as a sentinel value,
because they don't have a type field in dirent. If so, or the OS
does return a type and we got an unknown, also set symlink status
if so when making the managed equivalent structures.
TimeZoneInfo.Unix also calls ReadDir and thus ConvertDirent, but
it does this logic already.
* Move symlink check to its own if-elif block
Commit migrated from https://github.com/dotnet/corefx/commit/c34dd2fb843c45ad135ef2b0348c06224e15c736
* long name test
* typo
* typo
* Enable test as WSL fixed
* Disable test for WSL
* Test update
* Fix tests
* Properly reuse buffer length
* Fix actual bug
* Tests for create on Linux
* Extend to unix
* netfx
* Update interop file
Commit migrated from https://github.com/dotnet/corefx/commit/23521cc75428e38b8ff62cbac188c86b32184d42
* test added
* rearranging order for if statements
* reducing thread sleep time and reverting millisecond test change
* adding comment
* removing comment, adding tick equality check, failing if not able to create file with non-zero nano or milli second
* correcting test for hfs system
* NanoSeconds -> Nanoseconds, Millisec -> milliseconds
HFs assert converted to false
Commit migrated from https://github.com/dotnet/corefx/commit/83e468591a0212f109c179c2f4b75ef03c92432b