Dan Moseley [Wed, 6 Nov 2019 01:53:59 +0000 (17:53 -0800)]
Fix some terms/typos (dotnet/corefx#42398)
* Fix some terms/typos
* a/an
* of
Commit migrated from https://github.com/dotnet/corefx/commit/
4043dc1f855e2d5314620cd69b9dafa19cfee884
buyaa-n [Wed, 6 Nov 2019 00:04:38 +0000 (16:04 -0800)]
Annotate System.Security.Cryptography.Primitives for nullable (dotnet/corefx#42298)
* Annotate System.Security.Cryptography.Primitives for nullable
Commit migrated from https://github.com/dotnet/corefx/commit/
7a517eef6b50bff71ae69d0882ee69cad90f6d1f
Eirik Tsarpalis [Tue, 5 Nov 2019 23:35:05 +0000 (23:35 +0000)]
enable httpstress nightly runs (dotnet/corefx#42387)
Commit migrated from https://github.com/dotnet/corefx/commit/
45e82c542ede629ba770cfec767456863b03c406
Eirik Tsarpalis [Tue, 5 Nov 2019 14:42:36 +0000 (14:42 +0000)]
Annotate System.Text.Encodings.Web (dotnet/corefx#42362)
Commit migrated from https://github.com/dotnet/corefx/commit/
0cd8e74d310fb62a861ba1bda19e5d8ba3b42e0d
Santiago Fernandez Madero [Tue, 5 Nov 2019 04:47:14 +0000 (22:47 -0600)]
Update linux containers to match coreclr's and use latest toolchain (dotnet/corefx#42376)
* Update linux containers to match coreclr's and use latest toolchain
* Use clang9 on alpine and update docs
Commit migrated from https://github.com/dotnet/corefx/commit/
ee038925bde85c1c45c52f235ab09ea03b9c126c
Cory Nelson [Mon, 4 Nov 2019 23:06:45 +0000 (15:06 -0800)]
Update Directory.Build.props
This is a preview package, don't include it in shipped version.
Commit migrated from https://github.com/dotnet/corefx/commit/
279292804fa4f6cb856577e59246ac934a2ef9e5
Jan Kotas [Mon, 4 Nov 2019 23:05:27 +0000 (15:05 -0800)]
Add Array.Copy test for very large arrays (dotnet/corefx#42373)
Commit migrated from https://github.com/dotnet/corefx/commit/
83a1672fd01f1191d8dd159163b1c0291a34560d
Stephen Toub [Mon, 4 Nov 2019 21:34:25 +0000 (16:34 -0500)]
Fix SNIPacket.ReadFromStreamAsync to not consume same ValueTask twice (dotnet/corefx#42338)
Found via an analyzer I'm working on for ValueTasks.
This calls stream.ReadAsync, and in the case where the ValueTask completes successfully by the time the code checks and where the returned Result <= 0, it then awaits the ValueTask again, representing a second consumption when only one is considered legal.
Fix it by replacing the original ValueTask with a new one containing the same result.
Commit migrated from https://github.com/dotnet/corefx/commit/
a7cebb9ce454be31a0467ed418a221e5e3009768
Matt Galbraith [Mon, 4 Nov 2019 18:31:49 +0000 (10:31 -0800)]
Merge pull request dotnet/corefx#42367 from dotnet/MattGal-patch-1
Change Platform -> ArchGroup for timeout increase
Commit migrated from https://github.com/dotnet/corefx/commit/
bc7a5b1899f081dad41b418d6538a429caf5e7bf
Stephen Toub [Mon, 4 Nov 2019 17:58:22 +0000 (12:58 -0500)]
Reduce System.Text.Json test count from ~150K to ~11K (dotnet/corefx#42365)
One theory was added with ~140K inputs and is causing our infrastructure to go haywire.
Commit migrated from https://github.com/dotnet/corefx/commit/
9862cf5e1d1a73a5e62beef8edc2fc1f0f7e5d60
Matt Galbraith [Mon, 4 Nov 2019 17:45:59 +0000 (09:45 -0800)]
Update src/sendtohelix.proj
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/
46ebf3382ecf54f6b7fe5c3f3efd87f55a67cbb1
Matt Galbraith [Mon, 4 Nov 2019 17:30:21 +0000 (09:30 -0800)]
Change Platform -> ArchGroup for timeout increase
From reviewing the binlogs of arm and arm64 builds, this property check should definitely be ArchGroup not Platform (which ends up being AnyCPU here)
Commit migrated from https://github.com/dotnet/corefx/commit/
77a27b97d015648059f3b7968442e0be29aca9e8
Shay Rojansky [Fri, 25 Oct 2019 16:30:06 +0000 (18:30 +0200)]
Fix DataRowExtensions.Field for nullable types
Fixes dotnet/corefx#41879
Commit migrated from https://github.com/dotnet/corefx/commit/
f664740a41ea54e7b061731c36d262cfd9b39570
Jan Jahoda [Mon, 4 Nov 2019 16:07:14 +0000 (17:07 +0100)]
Fix wrong behaviour when move multiple files out of watched folder on mac (dotnet/corefx#41963)
* FS
watcher
* Multiple rename macOS fix
* Multiple rename macOS fix
* Format code
* Clean proj file
* Apply PR comments
* Apply suggestions from code review
Co-Authored-By: Cory Nelson <phrosty@gmail.com>
* Update src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Apply PR comments
* Apply PR comments
* Apply PR comments
* Document rename event id behaviour
Commit migrated from https://github.com/dotnet/corefx/commit/
a1f8c919ac1280bb235264d5cc81f23b0d117710
Marie Píchová [Mon, 4 Nov 2019 15:22:12 +0000 (16:22 +0100)]
GetHostAddresses returns all IPs for local host name on Linux (dotnet/corefx#41764)
Unifies behavior of GetHostAddresses for local host name on Linux with Windows and Mono versions by adding the result of getifaddrs.
Commit migrated from https://github.com/dotnet/corefx/commit/
d8cfa3b6927408d4aa393689742c854eead61c8c
Lukáš Lánský [Mon, 4 Nov 2019 14:51:43 +0000 (15:51 +0100)]
ARM tests take over 15 minutes (dotnet/corefx#42350) (dotnet/corefx#42355)
Commit migrated from https://github.com/dotnet/corefx/commit/
d027ad1819e2ffb68f0d39587f907cff956df94f
Stephen Toub [Mon, 4 Nov 2019 13:48:24 +0000 (08:48 -0500)]
Remove commented out test code
Commit migrated from https://github.com/dotnet/corefx/commit/
372063c6129e3994fe5866cb5962504278a91650
Ganbarukamo41 [Mon, 4 Nov 2019 13:47:35 +0000 (22:47 +0900)]
Cleaning System.Data.Common.Tests up (dotnet/corefx#39958)
* Cleanup System.Data.Common.Tests codes
* Fix broken tests, more cleanups
* Absurd spaces
* Use Equals/Null/Contains instead of True with comparison
* Fix typo
* Apply suggestions, more cleanups
* Use Equals typeof instead of comparing with Type.FullName
* Change AssertNotFound to assert exceptions directly
* Remove trailing whitespaces in comments
Commit migrated from https://github.com/dotnet/corefx/commit/
1dc772565c8dddbb5fd15dd244d934b697f3103d
Viktor Hofer [Mon, 4 Nov 2019 11:23:43 +0000 (12:23 +0100)]
Remove unused testdata version property (dotnet/corefx#42351)
Commit migrated from https://github.com/dotnet/corefx/commit/
800862e8c7337efd09be5daffa49421f1399a031
Stephen Toub [Mon, 4 Nov 2019 11:16:06 +0000 (06:16 -0500)]
Simplify Array.Copy(a, 0, b, 0, c) to Array.Copy(a, b, c) (dotnet/corefx#42343)
VS regex search and replace from `Array.Copy\((.+), 0, (.+), 0` to `Array.Copy($1, $2`, then manually reviewed. The only changes I reverted were those to the tests for Array itself.
Commit migrated from https://github.com/dotnet/corefx/commit/
5ac93ba0cc5843e4a544c8a23b5a9fcb05d0d69d
David Shulman [Mon, 4 Nov 2019 05:17:05 +0000 (21:17 -0800)]
Disable some FileSystemWatcher tests on MacOS (dotnet/corefx#42346)
Contributes to dotnet/corefx#42344
Commit migrated from https://github.com/dotnet/corefx/commit/
15e7e1569a8c3a5502c476c31b60e06d633b3efa
Dan Moseley [Mon, 4 Nov 2019 04:09:24 +0000 (20:09 -0800)]
Tests for BIFE containing path (dotnet/corefx#42150)
* Tests for BIFE containing path
* Update src/System.Reflection/tests/AssemblyTests.cs
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/System.Reflection/tests/AssemblyTests.cs
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/
d718eb86f958bdd18ec1236387d2b72f18b0a86c
Dan Moseley [Mon, 4 Nov 2019 04:08:54 +0000 (20:08 -0800)]
Test for null FNFE.FusionLog (dotnet/corefx#42152)
* Test for null FNFE.FusionLog
* CR
Commit migrated from https://github.com/dotnet/corefx/commit/
ba76268a7b24d5198dca557e1bba7c72ca73680e
Shubham Ranjan [Mon, 4 Nov 2019 03:52:19 +0000 (09:22 +0530)]
Read values from /proc/[pid]/status (dotnet/corefx#41122)
* Fix dotnet/corefx#23449 - Read values from /proc/[pid]/status
* Fix tests for new returned data from /prod/[pid]/status
* Update tests of process info on OSX
* Rename property ParsedStatus.pid --> ParsedStatus.Pid
* 1. Avoid reallocation of delimiter array
2. Use tryParse instead of Parse to avoid exceptions
* Rename static field and mark it as readonly
* Change pid from /status to be read only from debug mode
* Change status file read implementation using spans
* Remove unecessary debug statement
* Revert "Remove unecessary debug statement"
This reverts commit dotnet/corefx@
f60b4f3939cffc4a2753bc27981bd228a0801f79.
* Refactor logic using if statements with reduction in code redundancy
* Improve condition arrangement to avoid reading subsequent files if process name doesn't match
* Avoid failure of process info creation in case of fail read from one of many files.
* Refactor Interop.ProcFsStat for better understanding
* Change process creation logic to fail on read /stat
* Change logic for unit and non unit values in file
Commit migrated from https://github.com/dotnet/corefx/commit/
8086f36db3c1091ba80d3f9dc305605a39d2936d
Stephen Toub [Mon, 4 Nov 2019 02:59:00 +0000 (21:59 -0500)]
Improve tests for StreamReader cancellation (dotnet/corefx#42171)
Existing tests were only validating precancellation and not canceling once a Read{Block}Async call was already in flight.
Commit migrated from https://github.com/dotnet/corefx/commit/
dbcfe7ab09da103ba510756f5785faabdc902e61
David Shulman [Mon, 4 Nov 2019 02:42:42 +0000 (18:42 -0800)]
Merge pull request dotnet/corefx#42322 from davidsh/cert_tests
Cleanup HttpClient certificate tests
Commit migrated from https://github.com/dotnet/corefx/commit/
897e15d9417e122658cd68bfad7407c56ecbe881
David Shulman [Mon, 4 Nov 2019 02:41:12 +0000 (18:41 -0800)]
Merge pull request dotnet/corefx#42342 from davidsh/win7_disable_tests
Disable some networking tests on Windows 7
Commit migrated from https://github.com/dotnet/corefx/commit/
f3eea90e89e56618757bc146bf985c48e0612ce5
David Shulman [Mon, 4 Nov 2019 00:48:16 +0000 (16:48 -0800)]
Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
43f1ee20feb3db2281d2f9a338a46d8fae06202b
David Shulman [Sun, 3 Nov 2019 22:10:28 +0000 (14:10 -0800)]
Disable some networking tests on Windows 7
Contributes to dotnet/corefx#42339
Commit migrated from https://github.com/dotnet/corefx/commit/
d8febf133ed1e19d7f88c810b99729f19045ca98
Roman Marusyk [Sun, 3 Nov 2019 23:32:26 +0000 (00:32 +0100)]
Consolidate .netcoreapp.cs test files in System.Data.* (dotnet/corefx#42325)
* Consolidate .netcoreapp.cs files because System.Data.* projects is no longer cross-compiled
Commit migrated from https://github.com/dotnet/corefx/commit/
2730c1b14bc089468f37f7ef8adb730246787d73
Roman Marusyk [Sun, 3 Nov 2019 23:31:21 +0000 (00:31 +0100)]
Consolidate .netcoreapp.cs test files in System.IO.* (dotnet/corefx#42329)
* Consolidate .netcoreapp.cs files because System.IO.* projects is no longer cross-compiled
Commit migrated from https://github.com/dotnet/corefx/commit/
1499cbb3e319ec733c09202fd2501292c1d3fe3b
Geoff Kizer [Sun, 3 Nov 2019 20:01:32 +0000 (12:01 -0800)]
Add System.Net.Quic.dll assembly with basic object model and mock implementation (dotnet/corefx#42311)
* add stub System.Net.Quic assembly
* mock QUIC implementation
* QUIC: Remove ConnectAsync on QuicStream (dotnet/corefx#42203)
remove explicit connect on QuicStream and related fixes
* rename Create*Stream to Open*Stream
Commit migrated from https://github.com/dotnet/corefx/commit/
b382d0b42ed1d806a886d2293c61055a1e8a8025
David Shulman [Sat, 2 Nov 2019 20:22:04 +0000 (13:22 -0700)]
Cleanup HttpClient certificate tests
Some of the client certificate tests weren't running because they were conditioned on having
the "test root" installed. But that isn't needed for these tests.
Moved test to the loopback server. Also, cleaned up code which assumed the tests ran against
.NET Framework or UAP which isn't true anymore.
Commit migrated from https://github.com/dotnet/corefx/commit/
a6c0e516956acd30bf412fc23bcb6b82cbb490ae
Stephen Toub [Sun, 3 Nov 2019 13:58:27 +0000 (08:58 -0500)]
Assert ValueTask completion in SslStream.Read/Write (dotnet/corefx#42331)
We're employing a pattern in SslStream to avoid redundant code: we reuse the same code paths for both sync and async operations, with different interface implementations for each. The sync implementation has implementations that complete synchronously, and we then guarantee that the whole operation actually completes synchronously, even though it's implemented with async methods. We then .GetAwaiter().GetResult() to extract the result. Since by construction the task will have already completed, it's ok to do so, but it's difficult for a human to see this, and harder for an analyzer. Add an assert to both convey to an analyzer that we know what we're doing, and add a message for a human to understand it better. We can also remove an unnecessary "AsTask()" operation from the synchronous Write path, which should also remove a tiny bit of overhead.
Commit migrated from https://github.com/dotnet/corefx/commit/
d301036132d052840636232005797f86d6363976
Stephen Toub [Sun, 3 Nov 2019 13:58:06 +0000 (08:58 -0500)]
Fix ValueTask usage in XmlTextReaderImpl.ParseTextAsync (dotnet/corefx#42330)
Found by an analyzer for ValueTasks I'm writing (and using corefx to test).
The ParseTextAsync(int) method returns a ValueTask, which then potentially has both .Result called on it and .AsTask (if fullValue is false), and such double-consumption of a ValueTask is not allowed. It hasn't caused any problems because `async ValueTask` methods would always be backed by either a result or a Task, and as an implementation detail double-consumption of such instances doesn't cause a problem. But for .NET 5 we've added the ability for `async ValueTask` methods to use pooled instances, in which case such double-consumption would cause problems (e.g. exceptions about the double use). A fix here is to use Preserve.
Commit migrated from https://github.com/dotnet/corefx/commit/
8063ab674821bcf20d3723aea83bddb002b987b9
Stephen Toub [Sun, 3 Nov 2019 13:57:50 +0000 (08:57 -0500)]
Remove unused return value from ChannelUtilities.QueueWaiter (dotnet/corefx#42328)
Found while working on an analyzer for ValueTasks.
Commit migrated from https://github.com/dotnet/corefx/commit/
0eaedab670de2520be9d0ecbdf43de13313cab13
Günther Foidl [Sun, 3 Nov 2019 00:05:42 +0000 (01:05 +0100)]
Optimize FindFirstCharToEncode for JavaScriptEncoder.Default using Ssse3 intrinsics (dotnet/corefx#42073)
Commit migrated from https://github.com/dotnet/corefx/commit/
ba320d474b16007f894f61c96c94fb25d3c5e4b3
David Shulman [Sat, 2 Nov 2019 21:31:29 +0000 (14:31 -0700)]
Merge pull request dotnet/corefx#42324 from davidsh/disable_hanging_tests
Disable hanging tests
Commit migrated from https://github.com/dotnet/corefx/commit/
d65822a3f6aa21844aceeedb7fce9cdf10af96c2
David Shulman [Sat, 2 Nov 2019 21:29:55 +0000 (14:29 -0700)]
Disable hanging tests
Contributes to dotnet/corefx#42323
Commit migrated from https://github.com/dotnet/corefx/commit/
2c3cb3c1b05626ecd8c0df3e1a06466e34621ba8
dotnet-maestro[bot] [Sat, 2 Nov 2019 17:12:06 +0000 (17:12 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#42314)
* Update dependencies from https://github.com/dotnet/coreclr build
20191101.3
- Microsoft.NET.Sdk.IL - 5.0.0-alpha1.19551.3
- Microsoft.NETCore.ILAsm - 5.0.0-alpha1.19551.3
- Microsoft.NETCore.Runtime.CoreCLR - 5.0.0-alpha1.19551.3
* Update System.Runtime.Intrinsics.Experimental: https://github.com/dotnet/coreclr/pull/27533 https://github.com/dotnet/coreclr/pull/27421
* Update System.Runtime.Intrinsics.Experimental: https://github.com/dotnet/coreclr/pull/27430
Commit migrated from https://github.com/dotnet/corefx/commit/
7aac09e2ac54ec63460908988f3e8c7b9ce4d0f8
Layomi Akinrinade [Sat, 2 Nov 2019 01:37:19 +0000 (18:37 -0700)]
Guard against null refs when attempting to deserialize mismatched JSON into collections (dotnet/corefx#42254)
* Guard against null refs when attempting to deserialize mismatched JSON into collections
* Address review feedback
* Address review feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
eb41b7841f1d8edc499a8c0fbaec5e4d53187fa0
Roman Marusyk [Sat, 2 Nov 2019 00:51:16 +0000 (01:51 +0100)]
Consolidate .netcoreapp.cs files because System.Collections.* projects is no longer cross-compiled (dotnet/corefx#42302)
Commit migrated from https://github.com/dotnet/corefx/commit/
3c111351331f5db7dd100c8514decd85526e9495
Chris Ross [Sat, 2 Nov 2019 00:31:16 +0000 (17:31 -0700)]
Setup HTTP/2 code for sharing (dotnet/corefx#42070)
Commit migrated from https://github.com/dotnet/corefx/commit/
832dfd260bdebffdff91cb67eecbb8b02d5eaff2
Hugh Bellamy [Fri, 1 Nov 2019 23:43:13 +0000 (23:43 +0000)]
Cleanup GDI interop in System.Drawing.Common (dotnet/corefx#39727)
* Cleanup GDI object Interop
* Cleanup GDI region interop
* Cleanup GDI font interop
* Cleanup GDI DC interop
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
f807df691a3007cea9c7aa169f18be4cd9540758
Eric StJohn [Fri, 1 Nov 2019 23:16:21 +0000 (16:16 -0700)]
Add desktop build of System.Runtime.CompilerServices.Unsafe (dotnet/corefx#42297)
Commit migrated from https://github.com/dotnet/corefx/commit/
273d46ae3306f4da9928bdb3a39672a9676d5e9b
Eirik Tsarpalis [Fri, 1 Nov 2019 20:32:32 +0000 (20:32 +0000)]
Remove hardcoded paths from native build scripts (dotnet/corefx#42295)
* remove hardcoded paths from Native scripts
Commit migrated from https://github.com/dotnet/corefx/commit/
1a07de19180cc45facfea87fdbb4c9d007f11b4f
Kristian Hellang [Fri, 1 Nov 2019 20:10:04 +0000 (21:10 +0100)]
Formatting and parsing changes to JsonString (dotnet/corefx#41940)
* Pull duplicated code into JsonWriterHelper
* Add helpers for parsing and formatting ISO dates
* Update tests to expect new format
* Use new helpers in JsonString methods
* Rename methods
* Check for valid parse length
* Use AsSpan extension to work around missing implicit operators on netfx
* More netfx workarounds
* Use constant for stackalloc length
* Add back temp span to avoid writing too much when trimming
* Move IsValidDateTimeOffsetParseLength to JsonHelpers
* Always use StackallocThreshold instead of calling GetUtf8ByteCount
* Remove redundant length checks done by IsValidDateTimeOffsetParseLength
* Adapt test pattern from Utf8JsonWriterTests
* Revert "Always use StackallocThreshold instead of calling GetUtf8ByteCount"
This reverts commit dotnet/corefx@
0d29b646166138413f311a3ccf6284a72024b439.
Commit migrated from https://github.com/dotnet/corefx/commit/
21fd4d2a70447064aacb6536278f6e8cc1c9e2d5
Stephen Toub [Fri, 1 Nov 2019 20:08:46 +0000 (16:08 -0400)]
Delete ILLinkTrim.xml from System.Net.Primitives (dotnet/corefx#42183)
This existed because HttpListener is using a few internal members via reflection (boo). One of the methods listed in this file isn't used by anyone, however, so it's not clear why it's here; probably a typo. The other (ToServerString) has no internal usage and exists only to support HttpListener, which means we'd really like it to survive the initial assembly-level trimming, but then only be kept around for the app-level trimming if this functionality from HttpListener is used.
Given our current limitations, I've added the ability for an assembly to opt-out of keeping around PreserveDependency attributes, I've so opted-out in Primitives, and then I've used PreserveDependency on the two public ctors of Cookie that will always be hit if a cookie is created, such that ToServerString will survive the assembly build, but then these attributes evaporate.
I've also added PreserveDependency attributes into HttpListener, to codify its dependency on the various internals (most of which survive into the assembly initially because they're used by something reachable from public API).
There is still an issue tracking these reflection-based internals dependencies into Cookie from HttpListener.
Commit migrated from https://github.com/dotnet/corefx/commit/
f8e8326b0a76f7bb5a066ee24551b192d196f95a
Viktor Hofer [Fri, 1 Nov 2019 18:07:01 +0000 (19:07 +0100)]
Update required cmake version
Commit migrated from https://github.com/dotnet/corefx/commit/
021463608e504ee53e75689376fede17659f851a
Viktor Hofer [Fri, 1 Nov 2019 17:27:23 +0000 (18:27 +0100)]
Use Package suffix instead of PackageId and Version suffix instead of PackageVersion (dotnet/corefx#42289)
* Use Package suffix instead of PackageId
* Manual darc update from build '
20191101.2'
Commit migrated from https://github.com/dotnet/corefx/commit/
931f79e4670cb73c9347e14714fd892907be6630
Mohammed Adenwala [Fri, 1 Nov 2019 16:23:40 +0000 (11:23 -0500)]
Add new method for parameterless Listen() (dotnet/corefx#42262)
* Add new method for parameterless Listen()
This adds a parameterless overload for Listen(int) which passes in int.MaxValue as the default value. I changed existing tests that were explicitly using int.MaxValue or a random value to use the new overload with no parameter.
* Update src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/
8bdfd53bd23f7242a96c72f152bed5e2adf684fc
Filip Navara [Fri, 1 Nov 2019 16:22:48 +0000 (17:22 +0100)]
Use clonefile for CopyFile, if available (dotnet/corefx#37583)
* Rework SystemNative_CopyFile to use paths instead of file descriptors
Use clonefile for CopyFile, if available
* Bail out in SystemNative_CopyFile if access fails. We don't want to proceed if the destination file is read-only.
* Handle a race condition where clonefile can result in EEXIST error
* Update comment about fcopyfile
* Update PathInternal.TrimEndingDirectorySeparator to Path.TrimEndingDirectorySeparator
* Add missing close(outFd) call
* Remove unnecessary ! operator
* Save errno around close(outFd) calls
* access already sets EACCESS errno, just keep it
* Remove fcopyfile support
* Open destination file with O_CLOEXEC
* Return correct error code for source == destination
* Rearrange error handling a bit
* Remove forgotten HAVE_FCOPYFILE
Commit migrated from https://github.com/dotnet/corefx/commit/
5f45a8d5aa116d688f92952a1de72abd8b30f1a7
Roman Marusyk [Fri, 1 Nov 2019 13:58:20 +0000 (14:58 +0100)]
Consolidate .netcoreapp.cs files because System.Text.Encoding project is no longer cross-compiled (dotnet/corefx#42282)
Commit migrated from https://github.com/dotnet/corefx/commit/
1394f2df79628c9f18f8de0dd4bbd6ce4984d807
Layomi Akinrinade [Fri, 1 Nov 2019 02:27:18 +0000 (19:27 -0700)]
Honor dictionary key policy when entry value is null (dotnet/corefx#42267)
* Honor dictionary key policy when entry value is null
* Address review feedback
* Remove reverse Json checks
Commit migrated from https://github.com/dotnet/corefx/commit/
a24db0ba5666f46f50649810fe698ad267b60331
David Wrighton [Fri, 1 Nov 2019 01:08:45 +0000 (18:08 -0700)]
Improve LINQ diagnosability and startup performance (dotnet/corefx#42187)
* - Generate LINQ interpreter Thunks with unique names
- Instead of generating thunks, for common cases, use a pre-compiled C# method.
- This results in using generic sharing for many instead of requiring exact compiled code
* Give Compiled LINQ lambda expressions unique names
Commit migrated from https://github.com/dotnet/corefx/commit/
4410ec0ce84a5773a76b1302b59565da1e0c4337
Steve Harter [Fri, 1 Nov 2019 00:48:02 +0000 (19:48 -0500)]
Extend BOM test (dotnet/corefx#42279)
Commit migrated from https://github.com/dotnet/corefx/commit/
5d92ba3e6bf4bf8f211f43ad4717572a2a3b4539
Eirik Tsarpalis [Thu, 31 Oct 2019 22:46:28 +0000 (22:46 +0000)]
HttpStress: add docker documentation (dotnet/corefx#42268)
* httpstress: add documentation on dockerized stress runs
* fix stress yml issue
* fix doc issues
* remove commented out code
* remove accidental change
* yaml pipeline variables naming consistency
* Update eng/pipelines/stress/http-linux.yml
Co-Authored-By: Stephen Halter <halter73@gmail.com>
Commit migrated from https://github.com/dotnet/corefx/commit/
4c3bd8a0533a2e35df371b91045a1a5f0ada7d54
Jeremy Barton [Thu, 31 Oct 2019 22:26:18 +0000 (15:26 -0700)]
Change master from testing Ubuntu 19.04 to Ubuntu 19.10
Commit migrated from https://github.com/dotnet/corefx/commit/
f87d27dbf7017f2d5ac62576fe4f82e9cc2955a6
Eirik Tsarpalis [Thu, 31 Oct 2019 22:08:58 +0000 (22:08 +0000)]
Annotate System.Text.RegularExpressions for nullability (dotnet/corefx#42132)
* Annotate System.Text.RegularExpressions for nullability
* fix release build
* address feedback
* address feedback
* disable compiler warning in TryGetValue annotation
* change annotation to MaybeNullWhen()
* Revert "change annotation to MaybeNullWhen()"
This reverts commit dotnet/corefx@
542404ffb147dfc5cc40a6acb4a1e101317aef8a.
* remove redundant comment
* update reference source
* disable nullability warning in reference source
* remove outdated comment
* replace bangs with single Debug.Assert() at top of method body
Commit migrated from https://github.com/dotnet/corefx/commit/
d9ed01e65181a88d09ffa864b68353d622f75e89
Viktor Hofer [Thu, 31 Oct 2019 21:18:35 +0000 (22:18 +0100)]
Update developer-guide.md
Commit migrated from https://github.com/dotnet/corefx/commit/
f1115d4c008b12db69a47c0473aee8ae8c79b204
Eric StJohn [Thu, 31 Oct 2019 19:43:54 +0000 (12:43 -0700)]
Fix ILLink when run from VS/desktop/direct (dotnet/corefx#42266)
ILLink needs the path to dotnet.exe and was relying on an optional
environment variable to find it.
Instead use the NetCoreRoot property set by the SDK.
This is a direct copy of
https://github.com/dotnet/sdk/blob/dotnet/corefx@
b28a8efbfb30d84019351abb3aa9a2b15e008662/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets#L74-L80
We should try to eliminate our custom illink.targets and just configure
the built in ones if we can.
Commit migrated from https://github.com/dotnet/corefx/commit/
18d2d60caa5ddfc89f9a8bce6568cf207b4d1c24
Eric StJohn [Thu, 31 Oct 2019 19:42:42 +0000 (12:42 -0700)]
Use PackageLicenseExpression instead of URL (dotnet/corefx#42271)
* Use PackageLicenseExpression instead of URL
* Cleanup packaging properties from Directory.Build.props
Commit migrated from https://github.com/dotnet/corefx/commit/
987158f576e4ac4db1a4c1058cbbd5607ab22e69
Viktor Hofer [Thu, 31 Oct 2019 16:40:32 +0000 (17:40 +0100)]
Import root D.B.targets and set condition (dotnet/corefx#42261)
Commit migrated from https://github.com/dotnet/corefx/commit/
34e4c520baa8535432011bb5ea527b8b81422b4d
Santiago Fernandez Madero [Thu, 31 Oct 2019 11:37:23 +0000 (05:37 -0600)]
Update System.Reflection.TypeExtensions ref assembly for nullable (dotnet/corefx#42256)
Commit migrated from https://github.com/dotnet/corefx/commit/
4fb7feaa9ce6010207c9e42b0b3076c3db2f8af0
Eric StJohn [Thu, 31 Oct 2019 06:43:12 +0000 (23:43 -0700)]
Fix System.Composition.* public key (dotnet/corefx#42232)
Commit migrated from https://github.com/dotnet/corefx/commit/
18e82cabc1d2cddad8ff07ae96edb7296d9fad9d
Stephen Toub [Thu, 31 Oct 2019 04:27:10 +0000 (00:27 -0400)]
Update analyzer versions (dotnet/corefx#42249)
* Update analyzer packages to latest NuGet versions
* Fix new warnings
Commit migrated from https://github.com/dotnet/corefx/commit/
51686cbf80a980f187a144fa02cf3730ef16ba00
Jan Kotas [Thu, 31 Oct 2019 01:57:48 +0000 (18:57 -0700)]
Fix inefficient string manipulations in RegularExpressions tests (dotnet/corefx#42241)
* Fix inefficient string manipulations in RegularExpressions tests
* CR feedback
* Consistent style
Commit migrated from https://github.com/dotnet/corefx/commit/
54efc1141aba6c1572f3128372ee8835d063c850
Dan Moseley [Thu, 31 Oct 2019 01:54:28 +0000 (18:54 -0700)]
Improve test failure msg (dotnet/corefx#42247)
Commit migrated from https://github.com/dotnet/corefx/commit/
253f0d565c132bc98d9cf52c04c662a3373b49c4
Stephen Toub [Thu, 31 Oct 2019 00:00:25 +0000 (20:00 -0400)]
Clean up Uri.UnescapeDataString (dotnet/corefx#42225)
- Use string.IndexOf rather than an open-coded, unsafe loop.
- Avoid an unnecessary SequenceEquals at the end: we're only at this point if a `%` was found highlighting that something escaped was found.
- Use stack memory for smaller inputs if possible, to avoid unnecessary ArrayPool interaction
- Remove an unnecessary argument to a helper function.
- Fix ValueStringBuilder.Grow to only copy the contained data.
Commit migrated from https://github.com/dotnet/corefx/commit/
04f79d96e8ce89e738e7f8f595f43a52e9cdd4a4
Stephen Toub [Wed, 30 Oct 2019 23:59:22 +0000 (19:59 -0400)]
Delete PlatformHelper class (dotnet/corefx#42230)
Commit migrated from https://github.com/dotnet/corefx/commit/
d2a34404d4161de27db1c99908296f0f6100820f
David Shulman [Wed, 30 Oct 2019 23:01:16 +0000 (16:01 -0700)]
Merge pull request dotnet/corefx#42242 from wfurt/outerloop_42231
Move CertificateValidationRemoteServer_EndToEnd_Ok to outerloop
Commit migrated from https://github.com/dotnet/corefx/commit/
ba0e3f73e61c4fd6fcce00ab08e55acef1cebaa9
wfurt [Wed, 30 Oct 2019 22:32:39 +0000 (15:32 -0700)]
move CertificateValidationRemoteServer_EndToEnd_Ok to outerloop
Commit migrated from https://github.com/dotnet/corefx/commit/
394c370434ee286659dbcd563076080850bbd074
Steve Harter [Wed, 30 Oct 2019 22:00:33 +0000 (17:00 -0500)]
Fix deserialize issue with a large Stream containing a BOM (dotnet/corefx#42206)
Commit migrated from https://github.com/dotnet/corefx/commit/
9009ad1ebf44656a60f306a114ecdbd64c6a1d23
Eirik Tsarpalis [Wed, 30 Oct 2019 19:05:45 +0000 (19:05 +0000)]
Fix System.Net.WebUtility.HtmlDecode issue (dotnet/corefx#42227)
Fix WebUtility.HtmlDecode bug
Commit migrated from https://github.com/dotnet/corefx/commit/
fd454581475dd32b88ed45d38976855f24bd6751
Ahson Khan [Wed, 30 Oct 2019 18:05:12 +0000 (11:05 -0700)]
Add tests for custom JavaScriptEncoder to cover the virtual code paths in TextEncoder, and address previous feedback. (dotnet/corefx#42064)
* Move using directive within ifdef to make it clear when its used.
* Add more tests for custom text encoder case.
* Fix typo in comment gaurd -> guard
* Fix up the using directives that got removed during merge conflict
resolution.
* Address feedback - fix 0x7F case, rename vectors to be self-documenting.
Commit migrated from https://github.com/dotnet/corefx/commit/
62e6ccfa09322db02d6c043226bd382debc915c4
Carlos Sanchez Lopez [Tue, 29 Oct 2019 22:48:49 +0000 (15:48 -0700)]
Add file creation method that takes an ACL (dotnet/corefx#42099)
Approved API Proposal: dotnet/corefx#41614
Related change for directory creation method that takes an ACL: dotnet/corefx#41834 -merged and ported to 3.1 Prev2
Description
We have extension methods in System.IO.FileSystem.AclExtensions that let the user get and set ACLs for existing files, but we do not have methods that create files with predefined ACLs.
.NET ACL (Access Control List) support is Windows specific. This change will reside inside the System.IO.FileSystem.AccessControl assembly.
Customer impact
Before this change, customers had to create a file or filestream, then set its ACLs. This presents a few problems:
Potential security hole as files can be accessed between creation and modification.
Porting difficulties as there isn't a 1-1 API replacement
Stability issues with background processes (file filters) can prevent modifying ACLs right after creation (typically surfaces as a security exception).
This change addresses those problems by adding a new extension method that allows creating a file and ensuring the provided ACLs are set during creation.
This change is expected to be backported to 3.1.
Commit migrated from https://github.com/dotnet/corefx/commit/
508cbc4f1021e260b52981b8510cc5a5881441d3
Eric StJohn [Tue, 29 Oct 2019 22:01:50 +0000 (15:01 -0700)]
Handle binary formatted payloads with ResX mangled generic type names (dotnet/corefx#42102)
* Handle binary formatted payloads with ResX mangled generic type names
ResXSerializationBinder on desktop corrupted type names for generic parameters
in the binary formatted payload. It would also undo this in the reader,
but we don't benefit from that in .NETCore since we don't deserialize
during build: we just copy the preserialized payload into the resources.
To handle this, we use a serialization binder to un-mangle the type names
in a way similar to ResXSerializationBinder. We do it slightly differently
so that we only do it when needed, since relying on the binder to resolve
the type bypasses the type cache in BinaryFormatter.
* Respond to feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/
feebf02c8ef122bf0ea47b05d432aa080a49503b
Viktor Hofer [Tue, 29 Oct 2019 18:32:28 +0000 (19:32 +0100)]
Fix typo in sourcelink targets import (dotnet/corefx#42198)
Fixes https://github.com/dotnet/corefx/issues/42196
Commit migrated from https://github.com/dotnet/corefx/commit/
7a686d120078e74d056f5de6dde1f5b4c348671a
Stephen Toub [Tue, 29 Oct 2019 17:52:12 +0000 (13:52 -0400)]
Avoid duplicated message in WebException (dotnet/corefx#42195)
In a bunch of places, including in HttpClient, when a new exception instance is created to wrap an inner exception, the inner exception's message is then used as the message for the wrapping exception. WebRequest.CreateCompatibleException is taking such an HttpRequestException and concatenating the outer and inner exception's messages, which means it's often duplicating the exact same message twice.
Since we're including the exception as the inner exception, there's no need for such duplication... we can just follow suit and use the outer exception's message without concatenation.
Commit migrated from https://github.com/dotnet/corefx/commit/
d7fbeca702660476d955911ea1cfc5e78c27df2e
Eirik Tsarpalis [Tue, 29 Oct 2019 16:46:09 +0000 (16:46 +0000)]
Use docker-compose for running stress tests (dotnet/corefx#42186)
HttpStress: add docker-compose scenario
Commit migrated from https://github.com/dotnet/corefx/commit/
df648522fd1a1bfaa14e9d1ae7c2eaf4a9c87a7c
Viktor Hofer [Tue, 29 Oct 2019 11:44:25 +0000 (12:44 +0100)]
Prepare corefx for repo consolidation (dotnet/corefx#42175)
* Prepare corefx for repo consolidation into runtime
Commit migrated from https://github.com/dotnet/corefx/commit/
e160dd972d958fbe9594dc1001da4d1b94bba949
Roman Marusyk [Tue, 29 Oct 2019 00:58:42 +0000 (01:58 +0100)]
Consolidate .netcoreapp.cs test files in System.Runtime.Extensions (dotnet/corefx#42184)
* Consolidate .netcoreapp.cs files because System.Runtime.Extensions project is no longer cross-compiled
* Fix AppDomainTests
Commit migrated from https://github.com/dotnet/corefx/commit/
15e1ea023d2818b6083a61c7447a720ff3779482
Stephen Toub [Mon, 28 Oct 2019 21:11:10 +0000 (17:11 -0400)]
Fix build break
Commit migrated from https://github.com/dotnet/corefx/commit/
be5f981716d921976d1f2271d872cac63ef6e9d8
Stephen Toub [Mon, 28 Oct 2019 20:41:12 +0000 (16:41 -0400)]
Remove ILLinkTrim.xml from System.Data.Common (dotnet/corefx#42165)
Commit migrated from https://github.com/dotnet/corefx/commit/
f706c6522e6b4641fc8f95e14c4f9f7e0d6835fa
Stephen Toub [Mon, 28 Oct 2019 20:40:43 +0000 (16:40 -0400)]
Remove several entries from ILLinkTrim.xml in System.ComponentModel.TypeConverter (dotnet/corefx#42182)
Commit migrated from https://github.com/dotnet/corefx/commit/
9c8245c74cac2f3d07c22b04dfa23f3a740efd25
Santiago Fernandez Madero [Mon, 28 Oct 2019 20:00:38 +0000 (14:00 -0600)]
Add support to produce WebAssembly runtime assets (dotnet/corefx#42128)
* Add support to produce WebAssembly runtime assets
* Add support to build in OSX and address PR feedback
* Change AND -> and in Directory.Build.props change region
* PR Feedback: run build in rolling CI builds as well
* Add TODO comment for WebAssembly OSGroup
* Fix indentation.
* Fix wrong #include as apis defined in that include are used outside of ETHTOOL_H #if-def
Commit migrated from https://github.com/dotnet/corefx/commit/
179013357896ab947523bdf9961c02f8504db6ff
Stephen Toub [Mon, 28 Oct 2019 17:47:23 +0000 (13:47 -0400)]
Move PreserveDependencyAttribute to shared (dotnet/corefx#42174)
We need to use it in corelib, too.
Commit migrated from https://github.com/dotnet/corefx/commit/
51f11ec4e94f0f7b7b8bacc8e7233c0578ebd39d
Stephen Toub [Mon, 28 Oct 2019 12:52:34 +0000 (08:52 -0400)]
Remove ILLinkTrim.xml from System.Linq.Expressions (dotnet/corefx#42158)
* Remove ILLinkTrim.xml from System.Linq.Expressions
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
80ec55f39f587fa2ebb92982c32723ba80b8e247
Eirik Tsarpalis [Mon, 28 Oct 2019 10:10:10 +0000 (10:10 +0000)]
Update project-guidelines.md (dotnet/corefx#42169)
Commit migrated from https://github.com/dotnet/corefx/commit/
ffb94ad2c2d7c14fd9be82d365a28a60725b4f9f
Stephen Toub [Mon, 28 Oct 2019 03:47:48 +0000 (23:47 -0400)]
Delete ILLinkTrim.xml (and associated dead code) from System.Text.Encodings.Web (dotnet/corefx#42166)
This is all stale/dead code from before the relevant functionality was made public.
Commit migrated from https://github.com/dotnet/corefx/commit/
17c14aa2b50cfb5920d03ea8835c9a4932b5359c
Stephen Toub [Mon, 28 Oct 2019 03:24:35 +0000 (23:24 -0400)]
Avoid referencing LightCompiler if only Compile() is used (dotnet/corefx#42163)
Invert the dependency between Compile() and Compile(bool) to avoid rooting the LightCompiler if only Compile() is used.
Commit migrated from https://github.com/dotnet/corefx/commit/
bb725e42e48b816a1041c83f610bed711a5f4f41
Roman Marusyk [Mon, 28 Oct 2019 03:22:40 +0000 (04:22 +0100)]
Consolidate .netcoreapp.cs test files in System.Runtime (dotnet/corefx#42100)
* Consolidate .netcoreapp.cs files because System.Runtime project is no longer cross-compiled
Commit migrated from https://github.com/dotnet/corefx/commit/
d6dac9e6a7875862b91139334c8ec620f599cd4d
Dan Moseley [Sun, 27 Oct 2019 20:47:34 +0000 (13:47 -0700)]
Annotate System.Reflection.TypeExtensions for nullable references (dotnet/corefx#42159)
* merge
* CR
* typo
* msbuild /t:GenerateReferenceSource
Commit migrated from https://github.com/dotnet/corefx/commit/
1597b894a2e9cac668ce6e484506eca778a85197
Stephen Toub [Sun, 27 Oct 2019 20:46:54 +0000 (16:46 -0400)]
Update illink.targets to keep PreserveDependencyAttribute (dotnet/corefx#42157)
* Update illink.targets to keep PreserveDependencyAttribute
* Update illink.targets
Commit migrated from https://github.com/dotnet/corefx/commit/
2db6db4a51ab72078126ce288c8c39ad7bbb459f
Stephen Toub [Sun, 27 Oct 2019 20:46:04 +0000 (16:46 -0400)]
Remove ILLinkTrim.xml from System.Net.Security (dotnet/corefx#42156)
* Fix NetEventSource in System.Net.Security to properly delegate to events
Two events were set up in correctly, resulting in them getting trimmed away. The ILLinkTrim.xml was then putting a bandaid on the problem.
* Fix System.Net.Mail.Unit.Tests to not use System.Net.Security internals
The unit tests are currently set up to test internals, and to do so by compiling in the product source. My thoughts on this aside, it's currently incomplete as it's compiling in some code but then depending on other code via reflection to a completely different assembly. We shouldn't be combining such approaches. Delete the reflection code from the unit tests, and update the tests .csproj to include the additional files necessary (we should later revisit this whole scheme).
That lets us delete the ILLinkTrim.xml for the production System.Net.Security assembly.
Commit migrated from https://github.com/dotnet/corefx/commit/
f98b0d9cfdcdba0fd424ceb6077a8f91a1ca00c3
Viktor Hofer [Sun, 27 Oct 2019 16:08:59 +0000 (17:08 +0100)]
Remove versionless netstandard target group (dotnet/corefx#41984)
Commit migrated from https://github.com/dotnet/corefx/commit/
26d7b6626ab0385a1158e674855f81ab73f628e0
John Zabroski [Sat, 26 Oct 2019 21:35:20 +0000 (17:35 -0400)]
Update public-signing.md (dotnet/corefx#42129)
@jaredpar Updated this doc based on comments on Twitter discussion with you and @dsplaisted
Commit migrated from https://github.com/dotnet/corefx/commit/
cf28b7896a762f71c990a5896a160a4138d833c9
Stephen Toub [Sat, 26 Oct 2019 21:08:45 +0000 (17:08 -0400)]
Remove ILLinkTrim.xml from System.Diagnostics.DiagnosticSource (dotnet/corefx#42124)
- Use PreserveDependencyAttribute for ctors used via reflection by FetcherForProperty
- Remove reflection use entirely when looking up Activity events
Commit migrated from https://github.com/dotnet/corefx/commit/
a5d7583c1dc46a0bbf97ba89791079fffd4f1755
Stephen Toub [Sat, 26 Oct 2019 20:03:21 +0000 (16:03 -0400)]
Clean up use of PreserveDependencyAttribute in System.Text.Json (dotnet/corefx#42146)
It's not necessary to specify the assembly name when the consumer is in the same assembly.
Commit migrated from https://github.com/dotnet/corefx/commit/
e13b93bb645db8a2b77b9ee7663b56c3af6f2fbd
Stephen Toub [Sat, 26 Oct 2019 20:02:39 +0000 (16:02 -0400)]
Remove ILLinkTrim.xml from System.Net.Http (dotnet/corefx#42126)
The file was there to keep anonymous types used by DiagnosticsHandler from having their getters removed. But a) it was relying on the implementation detail name generated by Roslyn, and b) it was keeping alive other state from other anonymous types in the assembly. I changed it to use concrete types instead. This also happens to result in less code, because we don't need the generated Equals/GetHashCode methods generated for anonymous types.
Commit migrated from https://github.com/dotnet/corefx/commit/
b8a21f62f29ca98394c30151bdd72ff36f10765c