Santiago Fernandez Madero [Fri, 22 Mar 2019 00:23:38 +0000 (17:23 -0700)]
Enable publishing build logs in the publish step (dotnet/corefx#36225)
Commit migrated from https://github.com/dotnet/corefx/commit/
00c395eeff363e0ed890622e068817c8d463a72b
Steve Harter [Thu, 21 Mar 2019 23:49:47 +0000 (18:49 -0500)]
Fix issue with object stack frame re-use (dotnet/corefx#36218)
Commit migrated from https://github.com/dotnet/corefx/commit/
59c5ebe82e223fa77ee33bdeea927e9a68c207ba
Steve Harter [Thu, 21 Mar 2019 21:49:55 +0000 (16:49 -0500)]
Add JsonSerializer Xml doc and change DefaultBufferSize semantics (dotnet/corefx#36201)
Commit migrated from https://github.com/dotnet/corefx/commit/
67482220ab7cd18092ccf62749355d280ece4cea
dotnet-maestro-bot [Thu, 21 Mar 2019 20:05:20 +0000 (13:05 -0700)]
Update BuildTools, ProjectNTfs, ProjectNTfsTestILC to preview1-03805-01, beta-27521-00, beta-27521-00, respectively (dotnet/corefx#36215)
Commit migrated from https://github.com/dotnet/corefx/commit/
a1027e9c932a716da65825223e5dce635dcba30f
Stephen Toub [Thu, 21 Mar 2019 18:34:05 +0000 (14:34 -0400)]
Tweak Console's read buffer size (dotnet/corefx#36212)
Unlike most buffer sizes throughout .NET, where buffer size primarily impacts performance, the size used for the Console's read buffer actually impacts visible functionality to an end user. On Windows, when ReadFile/Console are called to read from a cmd window configured in the default fashion, the size of the buffer passed in determines how long a line can be typed by the user; the shorter the buffer, the less the user will be able to type. Currently .NET uses a buffer of size 256, which ends up meaning a user can't type a line longer than 254 characters.
There is also a performance impact to the buffer size of the read buffer, in that (in particular for redirected input where the input might be coming from a large file) the smaller the buffer the more reads are required to consume the contents of the file. In local measurements, reading a 365M text file with Console.ReadLine took ~6s with a 256 char buffer and ~1.3s with a 4K char buffer (a 16K char buffer improved on that only slightly, at around ~1.1s). Changing the size of the write buffers doesn't have a significant impact in contrast, as Console is configured to flush automatically on every read.
In experimenting with other languages/environments, I found that VC++, Go, and Rust by default all appear to use a 4K buffer (it looks like Python defaults to a 16K buffer).
Given all this, I'm changing Console's read buffer to be 4096 chars instead of 256 chars. I've left the rest of the buffer sizes at 256, but consolidated some of the constants.
If a developer wants a larger or smaller size, they can effectively change it with:
```C#
Console.SetIn(new StreamReader(Console.OpenStandardInput(), Encoding.UTF8, false, BufferSize));
```
Commit migrated from https://github.com/dotnet/corefx/commit/
f37461280a3c843000aa79642ba700baa5a1fc30
Santiago Fernandez Madero [Thu, 21 Mar 2019 17:57:21 +0000 (10:57 -0700)]
Move test ilc to 1.0.0 since that is the version the produce in the dev branch (dotnet/corefx#36214)
Commit migrated from https://github.com/dotnet/corefx/commit/
97effb6eb90bd1cb3b83550610b39d068d276581
Liudmila Molkova [Thu, 21 Mar 2019 17:50:50 +0000 (10:50 -0700)]
Ignore invalid correlation context tokens in Http Diagnostics Listener (dotnet/corefx#35906)
* Fix 31687: ignore invalid correlation context tokens
* add comments
* Add outerloop category
* url-encode correlation context keys and values
Commit migrated from https://github.com/dotnet/corefx/commit/
fcbd6804cee9ededfb9db50d7540749640137952
Liudmila Molkova [Thu, 21 Mar 2019 17:19:26 +0000 (10:19 -0700)]
Fix 31687 on netfx: escape Correlation-Context keys and values (dotnet/corefx#36203)
* Fix 31687 on Desktop: escape Correlation-Context keys and values
* review comments
Commit migrated from https://github.com/dotnet/corefx/commit/
39f825ed5fe5a19b0379f0ac0e7113f6d1b5d7b6
Viktor Hofer [Thu, 21 Mar 2019 17:01:23 +0000 (18:01 +0100)]
Fix update-dependencies maestro invocations
Commit migrated from https://github.com/dotnet/corefx/commit/
922492558648039b520d40941966486921a8da19
Stephen Toub [Thu, 21 Mar 2019 16:52:52 +0000 (12:52 -0400)]
Make Process.{Safe}Handle be a waitable event handle on Unix (dotnet/corefx#36199)
The documentation for Process.{Safe}Handle state that its value can be used to initialize a SafeWaitHandle that can then be used with a method like WaitHandle.WaitAny. However, on Unix, the SafeProcessHandle we currently return from Process.SafeHandle just uses the process ID as its faux handle value, since on Unix there isn't actually an OS process handle that's waitable in this fashion.
We already have to manufacture a ManualResetEvent to serve as such a wait handle, though. as we use that for WaitForExit, raising the Exited event, and so on. As such, we can change SafeProcessHandle to be backed by that MRE's handle rather than by the process ID.
Commit migrated from https://github.com/dotnet/corefx/commit/
71122bb4921e0239ea679dd275d53695b94e52f4
bitbonk [Thu, 21 Mar 2019 16:49:12 +0000 (17:49 +0100)]
Update old reference of ASP.NET 5
Commit migrated from https://github.com/dotnet/corefx/commit/
7f19370238c42dacfc2a5399ebb0bdce28450e59
Viktor Hofer [Thu, 21 Mar 2019 16:25:52 +0000 (17:25 +0100)]
Disable Match_ExcessPrefix on ARM (dotnet/corefx#36209)
Commit migrated from https://github.com/dotnet/corefx/commit/
9b9e7a777fe1040ff18d189740be6306eb2dbba0
Viktor Hofer [Thu, 21 Mar 2019 12:09:04 +0000 (13:09 +0100)]
Merge pull request dotnet/corefx#35781 from adamsitnik/removePerfTests
Switch to the dotnet/performance repo
Commit migrated from https://github.com/dotnet/corefx/commit/
d395dafdb31fde67cb8632de75f5c85f6575f176
Tarikul Sabbir [Wed, 20 Mar 2019 23:13:06 +0000 (16:13 -0700)]
Merge pull request dotnet/corefx#35549 from Wraith2/sqlfix-34414
SqlClient shrink SqlParameter and fix 34414
Commit migrated from https://github.com/dotnet/corefx/commit/
cd45097d0066c936676ce1f35958e715dc250a44
David Shulman [Wed, 20 Mar 2019 20:15:58 +0000 (13:15 -0700)]
Fix HttpWebRequest proxy test (dotnet/corefx#36191)
Change test so that it doesn't trip up CredScan.
Fixes dotnet/corefx#36187
Commit migrated from https://github.com/dotnet/corefx/commit/
d09d8f77620ff2c62d2245c5093c3fcfcf4c8352
Adam Sitnik [Wed, 20 Mar 2019 19:35:37 +0000 (20:35 +0100)]
update the docs
Commit migrated from https://github.com/dotnet/corefx/commit/
be8fe7d2402b9f8a8f1a19472d7a36d71296225d
Wraith2 [Wed, 20 Mar 2019 19:49:19 +0000 (19:49 +0000)]
address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
a15c35040c6bdcf8a7e762ed5071ad2a19be426b
Tyler Brinkley [Wed, 20 Mar 2019 19:07:51 +0000 (14:07 -0500)]
Removed need for Nullable converters in Json serialization (dotnet/corefx#35754)
Added support for Nullable<T> properties where a Nullable converter is no longer required.
Enum converter has generic constraint to `Enum` type.
Commit migrated from https://github.com/dotnet/corefx/commit/
b0751dcd4a419ba6731dcaa7d240a8a1946c934c
Jan Kotas [Wed, 20 Mar 2019 15:09:01 +0000 (08:09 -0700)]
Delete *.netcoreappaot.txt baselines
Commit migrated from https://github.com/dotnet/corefx/commit/
1caac52208d277ce673e17bc0069ded9b9fcb4c2
Jan Kotas [Wed, 20 Mar 2019 00:09:11 +0000 (17:09 -0700)]
Delete remaining uses of RuntimeThread
Update ProjectNTfs dependency
Commit migrated from https://github.com/dotnet/corefx/commit/
1f65248b2bc62b35818789e56b913ac87d794445
dotnet-maestro[bot] [Wed, 20 Mar 2019 15:55:22 +0000 (15:55 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#36180)
* Update dependencies from https://github.com/dotnet/coreclr build
20190319.71
- Microsoft.NET.Sdk.IL - 3.0.0-preview4-27519-71
- Microsoft.NETCore.ILAsm - 3.0.0-preview4-27519-71
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview4-27519-71
* Fix argument exception name in test
Commit migrated from https://github.com/dotnet/corefx/commit/
5875dbdb1861a53bd8a44b52c8a85fbb7553d00f
Dan Moseley [Wed, 20 Mar 2019 04:31:08 +0000 (21:31 -0700)]
Remove 2 phase 2 (dotnet/corefx#35936)
Commit migrated from https://github.com/dotnet/corefx/commit/
0ad52826f3cfad89a90eb2c21ccfc131bd36646b
Stephen Toub [Wed, 20 Mar 2019 00:06:49 +0000 (20:06 -0400)]
Fix Chr_CharCodeOutOfRange_ThrowsNotSupportedException VB test (dotnet/corefx#36165)
When run in some cultures, the TextInfo.ANSICodePage in place and that's queried by Strings.Chr doesn't fail for the specified inputs, contrary to what's documented (this is true for both .NET Framework and .NET Core). This change just fixes the test to always use en-US so as to avoid any issues when the test suite is run with other code pages.
Commit migrated from https://github.com/dotnet/corefx/commit/
c0cb02534f6652483f7eae20e2984392418583fd
David Shulman [Tue, 19 Mar 2019 23:59:28 +0000 (16:59 -0700)]
Fix X509Chain build error reporting on Windows (dotnet/corefx#36150)
This issue started out with a difference in behavior between .NET Core 2.0
and .NET Core 2.1. An HTTP request to a TLS website worked in 2.0 and failed
in 2.1. The website used a certificate that chained to an untrusted root. But
the certificate itself was placed in the Windows Local Machine/TrustedPeople cert
store.
It was first thought this was a difference between how WinHttpHandler (WinHTTP)
and SocketsHttpHandler worked. But it turned out to be a problem with SslStream.
The problem can also be observed on current .NET Core 3.0 (master) switching between
WinHttpHandler (disable SocketsHttpHandler via AppContext) and the default
SocketsHttpHandler.
In both cases, the X509Chain built has an error in its X509ChainStatus array. The
single error is 'PartialChain'. The X509Chain.Build() method will try to build a chain
using the applicable policies set into the X509Chain before building. This includes
implied operating system policy such as trusting certificates that are in the
TrustedPeople cert store. X509Chain.Build() returns a boolean indicating if the
chain was successfully built. There might still be entries in the X509ChainStatus
array indicating "soft failures" that were ignored based on policy.
We have some duplicative/similar code in WinHttpHandler and SslStream for building
an X509Chain object. The WinHttpHandler code and the Unix version of SslStream were
both correctly using the bool return value of X509Chain.Build() in determining whether
or not to return a final SslPolicyErrors.RemoteCertificateChainErrors. But the Windows
version of SslStream was not using that boolean. Instead, it was actually checking the
X509ChainStatus array.
This PR fixes the logic to be consistent and only check the result of X509Chain.Build().
I tested this change with CI tests as well as putting the certificate into the TrustedPeople
cert store (and also removing it).
Fixes dotnet/corefx#29563
Commit migrated from https://github.com/dotnet/corefx/commit/
9cc9e050df3b262d6e9d227d484c6cf0c4ccfbd2
Levi Broderick [Tue, 19 Mar 2019 23:18:48 +0000 (16:18 -0700)]
Add BoundedMemory tests for String ctor (dotnet/corefx#36162)
Use the new BoundedMemory feature to put additional correctness checks around the pointer-based String ctors
Commit migrated from https://github.com/dotnet/corefx/commit/
5cf8f3b1785b44fcf72492847f12fd894d0da74b
Stephen Toub [Tue, 19 Mar 2019 20:32:51 +0000 (16:32 -0400)]
Make PipeReader/Writer.AsStream().Dispose complete the reader/writer (dotnet/corefx#36160)
Commit migrated from https://github.com/dotnet/corefx/commit/
4edea1b6b817a3b7e9116e8cc20ccab55f7d7c9a
Wraith2 [Tue, 19 Mar 2019 20:13:59 +0000 (20:13 +0000)]
Merge remote-tracking branch 'dotnet/master' into sqlfix-34414
Commit migrated from https://github.com/dotnet/corefx/commit/
9c2a7003a15ce4365c1e1f89eb6bc4c768ee3616
Santiago Fernandez Madero [Tue, 19 Mar 2019 19:27:27 +0000 (12:27 -0700)]
Fix wrong error condition on Xunit depproj (dotnet/corefx#36158)
* Fix wrong error condition
* Fix typo
Commit migrated from https://github.com/dotnet/corefx/commit/
cfa7e15abf06d73dd31e5343f516a16f6ee79998
Stephen Toub [Tue, 19 Mar 2019 19:12:17 +0000 (15:12 -0400)]
Change Process.MaxWorkingSet to prefer cgroup data (dotnet/corefx#35645)
Commit migrated from https://github.com/dotnet/corefx/commit/
dbcb7528847402325dabe40b9f447534d8a0617d
Hugh Bellamy [Tue, 19 Mar 2019 17:41:44 +0000 (18:41 +0100)]
Cleanup and enhance DateTimeFormatInfo tests (dotnet/corefx#35944)
* Cleanup and enhance DateTimeFormatInfo tests
* Combine tests into single file
- Makes sense for these short tests
- No cleanups or test additions performed
* Remove net46 tests
* Update DateTimeFormatInfoAbbreviatedDayNames.cs
Commit migrated from https://github.com/dotnet/corefx/commit/
f41206d387f9793fcb64c37d509128f6c016231a
Afsaneh Rafighi [Tue, 19 Mar 2019 17:02:10 +0000 (10:02 -0700)]
Merge pull request dotnet/corefx#34999 from Wraith2/sqlperf-guidread
SqlClient remove primitive boxing in SqlDataReader.GetFieldValue
Commit migrated from https://github.com/dotnet/corefx/commit/
5430d51761676bd3e6f59641e2e9931ec5966e96
Adam Sitnik [Tue, 19 Mar 2019 15:46:37 +0000 (16:46 +0100)]
Merge remote-tracking branch 'upstream/master' into removePerfTests
Commit migrated from https://github.com/dotnet/corefx/commit/
48478bb1ae934e0a4949c71a13ddc7724eef7455
Tomas Weinfurt [Tue, 19 Mar 2019 14:24:36 +0000 (07:24 -0700)]
improve parsing of Digest authentication header (dotnet/corefx#36134)
* improve parsing if Digest authentication
* Remove unnecessary blank line
Commit migrated from https://github.com/dotnet/corefx/commit/
5298673f77c7e3d40b95286af713c9af933ba66a
Santiago Fernandez Madero [Tue, 19 Mar 2019 02:31:07 +0000 (19:31 -0700)]
Fix netfx test runs (dotnet/corefx#36082)
* Fix netfx test SDK tfm for new package version
* Add validation that we actually found assets in package to catch this early
* PR Feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
6e9561fb169b372ac0ecc5f85655f4d8800d1238
Ahson Khan [Tue, 19 Mar 2019 01:28:38 +0000 (18:28 -0700)]
Update CurrentDepth semantics to match current token depth, not reader state (dotnet/corefx#36116)
* Update CurrentDepth semantics to match current token depth, not reader
state
* Remove use of CurrentDepth from exception message and add tests.
* Use bitstack.CurrentDepth and update exception message.
Commit migrated from https://github.com/dotnet/corefx/commit/
44f54db21b45fb1b8aa4490833e2d64700801849
Wraith2 [Mon, 18 Mar 2019 23:15:46 +0000 (23:15 +0000)]
fix KatmaiNewDateTimeType logic inversion
Commit migrated from https://github.com/dotnet/corefx/commit/
c9d2331e8a28fb6d69c2b61d032506a727875cd5
Levi Broderick [Mon, 18 Mar 2019 22:05:05 +0000 (15:05 -0700)]
Add ref APIs and unit tests for System.Text.Unicode.Utf8 (dotnet/corefx#34538)
Also provides the implementation of BoundedMemory for checking for buffer overruns during unit testing
Commit migrated from https://github.com/dotnet/corefx/commit/
cd3936e55ad3a1624d4cd81d443554b72445b444
Ahson Khan [Mon, 18 Mar 2019 21:51:33 +0000 (14:51 -0700)]
Utf8JsonReader should be consistent when dealing with more than one JSON payload. (dotnet/corefx#36114)
* Utf8JsonReader should be consistent when dealing with more than one JSON
payload.
* Resolve PR feedback - update tests (Assert.Equals, move out of loop,
AssertThrows)
* Remove unnecessary assert since AssertThrows validates that anyway.
Commit migrated from https://github.com/dotnet/corefx/commit/
969270f5b9aa921b9ec956be87600d1f2e915403
Ahson Khan [Mon, 18 Mar 2019 20:35:15 +0000 (13:35 -0700)]
Disable BuildInvalidSignatureTwice in X509Certificates.Tests on Windows (dotnet/corefx#36127)
Commit migrated from https://github.com/dotnet/corefx/commit/
10c79df595b485f0998dded035f6f35e6279e50d
Stephen Toub [Mon, 18 Mar 2019 13:21:33 +0000 (09:21 -0400)]
Unlock SslStream for writes after failed write (dotnet/corefx#36106)
Commit migrated from https://github.com/dotnet/corefx/commit/
6123d3916f1a78de36a49e52f73ab7129c4cfa95
Ahson Khan [Mon, 18 Mar 2019 06:28:31 +0000 (23:28 -0700)]
Reduce test string size for TextEquals and mover overflow test to (dotnet/corefx#36115)
outerloop.
Commit migrated from https://github.com/dotnet/corefx/commit/
e373334e99f50b9981d3dab76e7449a31df73e99
Ahson Khan [Mon, 18 Mar 2019 05:23:24 +0000 (22:23 -0700)]
Default Ut8fJsonReader.Read should return false. (dotnet/corefx#36112)
* Default Ut8fJsonReader.Read should return false.
* Address PR feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/
e929f9bb99649279d4aab06d300a8beef33411fa
David Shulman [Mon, 18 Mar 2019 00:13:31 +0000 (17:13 -0700)]
Fix WebSocketHttpListenerDuplexStream error handling (dotnet/corefx#36110)
An unobserved websocket task exception was happening when attempting to read/write on
non-existent connections. This code originally came from .NET Framework. It is specific
to Windows only and uses HttpListener as the server for the WebSocket. I was able to
reproduce the problem on .NET Framework as well.
The problem was due to the logic in WebSocketHttpListenerDuplexStream where it was always
creating a TaskCompletionSource and doing a TrySetException even if the error occured on
a synchronous codepath. The ReadAsyncFast (and WriteAsyncFast) methods are always calling
a callback to finish the operation and thus always setting an exception into the task. But
the task was never awaited because the exception was also rethrown from the ReadAsyncFast
method and skips the await.
The fix is to change the logic slightly so that ReadAsyncFast won't rethrow the exception.
It doesn't need to since the exception is already stored in the task. So, awaiting that task
will be fast since it is already completed (faulted with the exception).
In addition to the CI tests, I also verified the fix with the original repro from the issue.
Fixes dotnet/corefx#29005
Commit migrated from https://github.com/dotnet/corefx/commit/
3633ea2c6bf9d52029681efeedd84fd7a06eb6ba
Nikita Potapenko [Sun, 17 Mar 2019 22:43:21 +0000 (00:43 +0200)]
Fix typo (dotnet/corefx#36107)
.Net -> .NET
Commit migrated from https://github.com/dotnet/corefx/commit/
d29ae79fb13b4df9078400ac49b460e011f96404
Layomi Akinrinade [Sun, 17 Mar 2019 20:20:45 +0000 (16:20 -0400)]
Add (Try)GetDateTime(Offset) to JsonElement
Commit migrated from https://github.com/dotnet/corefx/commit/
a5d58ccf75741365c9a0f82c5387a9ae2ec99e16
Stephen Toub [Sun, 17 Mar 2019 09:40:21 +0000 (05:40 -0400)]
Add SslStream test to validate synchronous invocation on underlying Stream (dotnet/corefx#36097)
* Change SslStreamStreamToStreamTest_Sync to actually be synchronous
* Add SslStream test to validate synchronous invocation on underlying Stream
SslStream doesn't introduce its own asynchrony. The only reason an asynchronous operation on SslStream should complete asynchronously is because of an asynchronous call made on its underlying stream completes asynchronously. This adds tests to validate that, e.g. the tests would fail if we started using Task.Run in the SslStream implementation to invoke operations on the underlying stream.
Commit migrated from https://github.com/dotnet/corefx/commit/
5f4e3ce4ec775a960cb379a0edef33406b37befe
Stephen Toub [Sun, 17 Mar 2019 05:49:36 +0000 (01:49 -0400)]
Fix casing of SslStream.Implementation.cs file name (dotnet/corefx#36099)
Commit migrated from https://github.com/dotnet/corefx/commit/
4758e570d40c917c29de47945fd56b5dae350ad4
Stephen Toub [Sun, 17 Mar 2019 02:01:52 +0000 (22:01 -0400)]
Make ReallyLargeLookupUTF8 test outer loop
It allocates a huge amount of memory currently.
Commit migrated from https://github.com/dotnet/corefx/commit/
0d2cbec33968872aa736d033696f618fb0c3b3de
Stephen Toub [Sun, 17 Mar 2019 01:03:18 +0000 (21:03 -0400)]
Disable System.Text.Json outerloop tests failing in CI (dotnet/corefx#36096)
Commit migrated from https://github.com/dotnet/corefx/commit/
fd0abd12c89e8d90fdec1e5233ae89a0b7aceaee
Tim Seaward [Sun, 17 Mar 2019 00:05:58 +0000 (00:05 +0000)]
Flatten SslStream by removing SslStreamInternal SslState (dotnet/corefx#35109)
* Still moving sslState
* Initial SslState removed, should build
* Fix tests
* Moved first methods from SslStreamInternal
* moved a few more messages
* Moved more SslStreamInternal into SslStream
* Move half of SslStreamInternal into SslStream now
* Almost all moved other than shutdown
* Removed SslStreamInternal completely
* Final cleanup
* Clean Fakes
* Formatting
* Remove useless properties, remove dispose internal
* Remove HandshakeComplete and IsShutdown, removed methods from the fakes that match
* Added comment on Fake around removing build warnings
Commit migrated from https://github.com/dotnet/corefx/commit/
5f2d585b6709aa8034da0683eb6367a448faf5e4
Caesar Chen [Sat, 16 Mar 2019 19:56:39 +0000 (12:56 -0700)]
Http trailer support for HTTP/1.x (dotnet/corefx#35337)
* http trailer for http/1.1
* address feedback
* address feedback
* pr feedback
* stop blocking context
* fix framework test failiure
* address feedback
* seperate tests
* address some feedback
* more feedback from review
* correct ReadAsync
* feedback from review
* handle short ReadAsync()
* more feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
ac9c746c44a5c0decf551fe33fb2acbdc895d021
Stephen Toub [Sat, 16 Mar 2019 19:54:15 +0000 (15:54 -0400)]
Add SslStream test for "unlocking" after failure (dotnet/corefx#36094)
* Add SslStream test for "unlocking" after failure
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
6a26d45c3a0f3571f57637c2a995fb40336378f5
David Shulman [Sat, 16 Mar 2019 01:21:24 +0000 (18:21 -0700)]
Fix and re-enable some HttpListener authentication tests (dotnet/corefx#36084)
The Negotiate and NTLM HttpListener tests were disabled due to a behavior of running them
on loopback using an HttpClient with WinHttpHandler. But now the default handler for HttpClient
is SocketsHttpHandler. And it doesn't have this problem with loopback authentication.
Closes dotnet/corefx#20604
Commit migrated from https://github.com/dotnet/corefx/commit/
decd797ca84aca0f4b8ca4b6e5f9c7b818bd2967
Liudmila Molkova [Fri, 15 Mar 2019 22:43:24 +0000 (15:43 -0700)]
Inject W3C headers in netfx HTTP diagnostics hook (dotnet/corefx#35880)
* Inject W3C headers in Http Desktop hook
* do not inject headers if they were injected before
* check that w3c headers are empty when format is Hierarchical
* review comments
Commit migrated from https://github.com/dotnet/corefx/commit/
dee28e27e55251bb01680949105d18f5d6876bc3
Afsaneh Rafighi [Fri, 15 Mar 2019 22:20:16 +0000 (15:20 -0700)]
Merge pull request dotnet/corefx#35344 from Wraith2/sqlfix-tweaks1
SqlClient minor fix and changes
Commit migrated from https://github.com/dotnet/corefx/commit/
9fef9c9e85a60d1491b9f0f953bd02ea1ddeb024
Stephen Toub [Fri, 15 Mar 2019 19:59:31 +0000 (15:59 -0400)]
Fix SslStreamStreamToStreamTest to exercise correct overloads (dotnet/corefx#36065)
The SslStreamStreamToStreamTest is set up as a base class from which three test classes derive, one for each of Async, Begin/End, and Sync. But the base class isn't actually deferring to the derived types to customize most of the functionality being executed, namely read/write methods. This PR fixes that, so that the base class properly exercises the relevant methods, customized to the base type.
Commit migrated from https://github.com/dotnet/corefx/commit/
6a9fe42b8d236f9cb0e5cdede2f06dc7537dc933
Wraith2 [Fri, 15 Mar 2019 18:59:01 +0000 (18:59 +0000)]
Merge remote-tracking branch 'dotnet/master' into sqlfix-34414
Commit migrated from https://github.com/dotnet/corefx/commit/
4dca9ee082bd10d980ccaed17f99b049c3777343
Wraith2 [Fri, 15 Mar 2019 18:58:57 +0000 (18:58 +0000)]
address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
4aa2516b339c015222e2a4d1d9cf918f41a2d3e6
Stephen Toub [Fri, 15 Mar 2019 18:30:25 +0000 (14:30 -0400)]
Add test for using SslStream for concurrent read/writes (dotnet/corefx#36064)
Commit migrated from https://github.com/dotnet/corefx/commit/
66ddc3e0da1af94c52bd7c78f27d18ea008bea74
Ahson Khan [Fri, 15 Mar 2019 05:38:46 +0000 (22:38 -0700)]
Add TextEquals helper methods to Utf8JsonReader (dotnet/corefx#35979)
* Add initial impl of ValueEquals with basic tests.
* Rename to TextEquals based on API review feedback.
* Move to separate test file, increase coverage, and fill in missing impl
details.
* Add xml comments and more test cases.
* Re-enable all the tests.
* Update tests to be netstandard compliant.
* Rename some existing tests to be clearer.
* Address PR feedback.
* Return early if we know unescaping won't produce a match.
* More eagerly check the lengths to return mismatch sooner.
* Add tests to improve code coverage and re-write to avoid unreachable
code.
* Fix resource string merge issue.
* Fix test build failures on netstandard (missing implicit string->span
cast)
Commit migrated from https://github.com/dotnet/corefx/commit/
b8bc4ff80c5f7baa681e8a569d367356957ba78a
David Shulman [Fri, 15 Mar 2019 01:47:50 +0000 (18:47 -0700)]
Add test for HttpWebRequest default proxy credentials (dotnet/corefx#36061)
It's easier to simulate default system proxy settings on Linux since it uses environment
variables. Add a test to verify that the proxy credentials are passed from
WebRequest.DefaultWebProxy.Credentials to the system proxy.
Follow-up to PR dotnet/corefx#36059
Commit migrated from https://github.com/dotnet/corefx/commit/
2e006bb1a471d2b75d1bbae282241d15da388899
Stephen Toub [Fri, 15 Mar 2019 01:46:39 +0000 (21:46 -0400)]
Fix CryptoStream.Dispose to only transform final block when writing (dotnet/corefx#36048)
* Fix CryptoStream.Dispose to only transform final block when writing
When reading, the final transform isn't required, and using it can result in exceptions when the stream is only partially read.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
f99562f10e72edb5b8d8fb264eb7b2436ad2df01
David Shulman [Thu, 14 Mar 2019 23:32:38 +0000 (16:32 -0700)]
Fix HttpWebRequest to use WebRequest.DefaultWebProxy credentials (dotnet/corefx#36059)
If the HttpWebRequest is using the default system proxy, we need to pass any proxy
credentials that the developer might have set via the WebRequest.DefaultWebProxy.Credentials
property. This matches .NET Framework behavior.
I tested this manually using Fiddler as the authenticating proxy.
Fixes dotnet/corefx#36058
Commit migrated from https://github.com/dotnet/corefx/commit/
d6a30736858f91b297fdd3ed4e3d1dfde67bdbdb
Marco Rossignoli [Thu, 14 Mar 2019 21:19:27 +0000 (22:19 +0100)]
Improve test logging: add process name to log (dotnet/corefx#35996)
* add process name to log
* updates
* update
Commit migrated from https://github.com/dotnet/corefx/commit/
88548f58fbd9a5c421395b0f6a4a1eed4be4f155
Stephen Toub [Thu, 14 Mar 2019 20:46:48 +0000 (16:46 -0400)]
Avoid three expensive allocations in UriHelper (dotnet/corefx#36056)
In this repro:
```C#
using System;
using System.Diagnostics;
using System.Text;
class Program
{
static void Main()
{
string input = $"param1={GenerateUrlEncoded(40)}¶m2={GenerateUrlEncoded(220)}";
Console.WriteLine("Input length: " + input.Length);
var sw = Stopwatch.StartNew();
string result = Uri.UnescapeDataString(input);
Console.WriteLine("Result length: " + result.Length);
Console.WriteLine(sw.Elapsed);
}
private static string GenerateUrlEncoded(int rowsCount)
{
var sb = new StringBuilder();
for (int i = 0x100; i < 0x999; i++)
{
sb.Append((char)i);
if (i % 10 == 0) sb.Append('<');
if (i % 20 == 0) sb.Append('>');
if (i % 15 == 0) sb.Append('\"');
}
string escaped = Uri.EscapeDataString(sb.ToString());
sb.Clear();
for (int i = 0; i < rowsCount; i++)
{
sb.AppendLine(escaped);
}
return sb.ToString();
}
}
```
on my machine it ends up allocating ~630GB of memory and takes ~14 seconds.
Almost all of that ~14 seconds is spent in gc_heap::allocate_large, and most of that inside memset_repmovs. This ends up being due to some large allocations being done in a tight loop.
This PR contains three simple fixes that address the majority of the problem. There's still more that can be done here, but this is the lowest of the low-hanging fruit and makes the biggest impact:
1. In UnescapeString, the previous code was allocating a new char[bytes.Length] for each iteration. Stop doing that. Instead, just reuse the same array over and over and only grow it if it's smaller than is needed.
2. In MatchUTF8Sequence, the previous code was allocating a byte[] for each character or surrogate pair. Stop doing that. Instead, just use a reusable four-byte segment of stack.
3. In UnescapeString, the previous code was allocating a new UTF8Encoding for each iteration of the loop. Stop doing that. The object is thread-safe and can be used for all requests, so we just make it a static.
These changes drop that ~630GB to ~22MB and that ~14s to ~0.05s.
Subsequently, there's more memory-related changes that could be done in this code, e.g. using pooling, addressing some of the other allocation, but I've left that for the future.
Commit migrated from https://github.com/dotnet/corefx/commit/
5e84d5b782fd56c7c6772f199719d208b299b605
Wraith2 [Thu, 14 Mar 2019 19:48:55 +0000 (19:48 +0000)]
address formatting feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
de24817089ee09fcc35b1cfa5829ce5903fd2e72
Wraith2 [Thu, 14 Mar 2019 19:48:25 +0000 (19:48 +0000)]
Merge remote-tracking branch 'dotnet/master' into sqlperf-guidread
Commit migrated from https://github.com/dotnet/corefx/commit/
a08768dc5aeb0056b38575a4b41abd604b62aa34
Marco Rossignoli [Thu, 14 Mar 2019 17:39:24 +0000 (18:39 +0100)]
Optimize recursion of System.Net.Http.HttpRuleParser.GetExpressionLength (dotnet/corefx#35959)
Optimize recursion of System.Net.Http.HttpRuleParser.GetExpressionLength
Commit migrated from https://github.com/dotnet/corefx/commit/
4636de3b8595ad10eaebf00cbeed715684e7fd1b
Laura Walker [Thu, 14 Mar 2019 17:14:58 +0000 (17:14 +0000)]
Fix single character typo. (dotnet/corefx#36047)
Commit migrated from https://github.com/dotnet/corefx/commit/
bbf559f23a072a8355ba59bff9f8aad56dbfc67d
John Salem [Thu, 14 Mar 2019 17:02:53 +0000 (10:02 -0700)]
Make StackTrace Symbol Caching Aware of Collectible Types (Phase 2) (dotnet/corefx#35827)
* Update GetSourceLineInfo to consume an assembly:
* Use Assembly as cache key for MetadataReader
* Dynamic and regular assemblies now have the same cache key
* Prevents stale cache entries in the case where a PEFile is unloaded
and replaced by a new one in the same location
dotnet/coreclrdotnet/corefx#20179
* Remove redundant overload of GetSourceLineInfo
* update comments to reflect new behavior
* Change TryGetReader to use ConditionalWeakTable's atomic Add with callback method.
* cleaning up var names based on feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
6f00e97f85650768f87743df769206bfc4119fbc
Michelle McDaniel [Tue, 12 Mar 2019 21:45:41 +0000 (14:45 -0700)]
Rename optimzation package version
Commit migrated from https://github.com/dotnet/corefx/commit/
a42be17c8be34eaf2711dfb09e6196bea68368d3
Michelle McDaniel [Tue, 12 Mar 2019 20:45:26 +0000 (13:45 -0700)]
Remove the workaround to put the IBC files in the right directory
Commit migrated from https://github.com/dotnet/corefx/commit/
6a942229bd09f5c34fbf9a3b7cd03bc032a626b5
Michal Strehovský [Thu, 14 Mar 2019 16:26:11 +0000 (17:26 +0100)]
Enable default interfaces unconditionally (dotnet/corefx#36012)
Corresponds to dotnet/coreclrdotnet/corefx#23225.
Commit migrated from https://github.com/dotnet/corefx/commit/
5fb12949b1487e34657ba9f4e2e12f31f8305295
Krzysztof Wicher [Thu, 14 Mar 2019 16:22:56 +0000 (09:22 -0700)]
Fix: System.IO.Ports runtime package signing (dotnet/corefx#36022)
* temporarily disable publishing
* temporarily disable another publish step
* Move signing to publish step
* re-enable publish steps
Commit migrated from https://github.com/dotnet/corefx/commit/
231bcfc265570ae42a412ac6cc5b09c5d47ca042
Afsaneh Rafighi [Thu, 14 Mar 2019 16:14:44 +0000 (09:14 -0700)]
Merge pull request dotnet/corefx#35927 from Wraith2/sqlperf-streamwrite
SqlClient rent stream parameter buffers
Commit migrated from https://github.com/dotnet/corefx/commit/
397b8cff410b94c74e8c1fc3ddf9c2d44c7e98f8
Eric StJohn [Thu, 14 Mar 2019 13:59:26 +0000 (06:59 -0700)]
Use ILResourceReference (dotnet/corefx#36038)
Commit migrated from https://github.com/dotnet/corefx/commit/
85e4afd0097364b2675c94d11888906f6651b93b
Filip Navara [Thu, 14 Mar 2019 13:51:10 +0000 (14:51 +0100)]
Update ResourceManager tests to account for dotnet/corefx#35114. (dotnet/corefx#35811)
Commit migrated from https://github.com/dotnet/corefx/commit/
8de6f2aefd7e87a45ff47c4949ff251c7c84ac71
David Shulman [Thu, 14 Mar 2019 13:48:55 +0000 (06:48 -0700)]
Disable some proxy tests (dotnet/corefx#36037)
Disable some problematic proxy related tests.
Contributes to issue dotnet/corefx#32809
Commit migrated from https://github.com/dotnet/corefx/commit/
b97e1b696cb9bf6bf288b4fd28481a2026b0dd7a
Stephen Toub [Thu, 14 Mar 2019 13:47:04 +0000 (09:47 -0400)]
Remove remaining usage of Contract.* (dotnet/corefx#36002)
Only remaining use of System.Diagnostics.Contracts in corefx is tests for the library itself, and usage of the [Pure] attribute.
Commit migrated from https://github.com/dotnet/corefx/commit/
940ecee40b64ab93c92f87a7e8909771c013f1a5
Stephen Toub [Thu, 14 Mar 2019 13:01:19 +0000 (09:01 -0400)]
Tweak SslApplicationProtocol (dotnet/corefx#36021)
* Tweak SslApplicationProtocol
- It currently stores a `ReadOnlyMemory<byte>`. That just adds unnecessary expense: we can instead just store the provided `byte[]`.
- The most common values are those exposed statically: Http2 and Http11, but ToString on those results in creating a new string each time. Special-case them.
- Constructing an SslApplicationProtocol with a null string results in an ArgumentNullException being thrown with the wrong parameter name. Fix it.
- Miscellaneous cleanup on the file.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
af6e226ed530bbe7c8319507f414cbad8e81df24
Eric St. John [Wed, 13 Mar 2019 00:01:37 +0000 (17:01 -0700)]
Fix local zip entry header for large files
When opened for Write ZipArchiveEntry needs to write the local header
information to the archive stream upon the first call to write since the
compressed content comes after that and we write directly to the backing stream
rather than buffering in memory.
By default header information only accommodates 32-bit sizes since this is much
more likely and saves space in archives with lots of files and at the first
write we don’t know how big the entry is going to be.
Once the entry is disposed we know the final length and may find it cannot be
represented in 32-bit fields. It can’t insert the extra bytes it would need
in the header region since it’s already written the compressed data and
streams/files don’t have insertion operations, so instead it sets a bit that
says the entry's size information is in a descriptor at the end of the entry.
The entry was setting the bit that indicated the descriptor existed but didn't
set the version in the header to ZIP64 to indicate wether that descriptor had
64-bit fields. Additionally we were writing the central-directory header for
the file with a version of ZIP64 so our local header and central header didn't
match.
May ZIP implementations were OK with this, but not all. Specifically
WindowsBase.dll's implementation of the System.IO.Packaging APIs has a
ZipArchive that insists the local header version must be ZIP64 to have a
64-bit descriptor. Moreover it also insists that the local-header version must
match the central header version.
To ensure zips created with .NETCore's System.IO.Packaging APIs work with
desktop we should set this version field in the local header.
Commit migrated from https://github.com/dotnet/corefx/commit/
b37b4efe6b58eecb83b81e6c754bd5dbe506bedc
David Shulman [Thu, 14 Mar 2019 03:57:55 +0000 (20:57 -0700)]
Clean up some tests and move to new Azure endpoint (dotnet/corefx#36018)
This PR changes the Azure test endpoint for HTTP/1.1 and WebSocket tests to use
Azure App Service instead of the classic Azure Cloud Service endpoint. This now
matches the HTTP/2.0 endpoint architecture.
We are deprecating the use of Azure Cloud Service endpoints because they are hard
to deploy and maintain. Azure App Service, on the other hand, provides a lot of benefits
including built in production/staging slots, TLS certificate handling and easier
integration with Azure DevOps deployment models.
There are a few downsides to Azure App Service which are known feature limitations.
Since it uses ARR (reverse proxy), it causes websocket connections to be proxied.
This results in some behavior changes for some edge condition tests we have. For example,
when a websocket handshake fails (due to subprotocol mismatch for example), the client
side doesn't see a TCP disconnect. Instead, due to the reverse proxy, we end up getting
an HTTP status code (like 500). Either way, it is a websocket handshake failure. So, I've
updated a few tests to be less brittle for that. I also opened another issue dotnet/corefx#36016 to
track moving a few websocket tests to the loopback websocket server which doesn't yet
have full capability.
I also converted an HTTP statusline test to use the loopback server.
Commit migrated from https://github.com/dotnet/corefx/commit/
689e58ec123d8c730d48d1c35c8f7ecbba6c22cf
Stephen Toub [Thu, 14 Mar 2019 01:09:42 +0000 (21:09 -0400)]
Disable tests failing on WSL (dotnet/corefx#36017)
This is on Windows 10 Version 10.0.17763 Build 17763.
Commit migrated from https://github.com/dotnet/corefx/commit/
cf5c3b0282c07ab13da79f04ee83d39f20bac431
Wraith2 [Thu, 14 Mar 2019 01:03:54 +0000 (01:03 +0000)]
let ArrayPool clear returned arrays
Commit migrated from https://github.com/dotnet/corefx/commit/
0972e60bb1d8fb1ba867e29f7ea7d7a81506af51
Layomi Akinrinade [Thu, 14 Mar 2019 01:02:35 +0000 (21:02 -0400)]
Add (Try)GetDateTime(Offset) to Utf8JsonReader (dotnet/corefx#35903)
Add (Try)GetDateTime(Offset) to Utf8JsonReader
This change partially addresses https://github.com/dotnet/corefx/issues/34690.
These methods parse JSON strings to DateTime(Offset) objects according to format `YYYY-MM-DD[Thh:mm[:ss[.s]][TZD]]`
Commit migrated from https://github.com/dotnet/corefx/commit/
66cf67037568d9818881e1a78d3e7b2aa8b04047
Wraith2 [Wed, 13 Mar 2019 22:41:48 +0000 (22:41 +0000)]
Merge remote-tracking branch 'dotnet/master' into sqlfix-tweaks1
Commit migrated from https://github.com/dotnet/corefx/commit/
f8ec493e9c2d2af88af70473229b319cef2017fd
Tarikul Sabbir [Wed, 13 Mar 2019 22:32:16 +0000 (15:32 -0700)]
Merge pull request dotnet/corefx#36015 from tarikulsabbir/datastream_bugfix
Porting XEvent Delay BugFix from .Net Framework
Commit migrated from https://github.com/dotnet/corefx/commit/
8801ab0b3365f551966ae9caa053434ec07f41bb
Eric StJohn [Wed, 13 Mar 2019 21:57:58 +0000 (14:57 -0700)]
Update Windows.Compatibility package with references to newer WCF versions. (dotnet/corefx#35990)
Commit migrated from https://github.com/dotnet/corefx/commit/
369b90a4604281e723ddbc8f6bf114be6074cb82
Tarikul Sabbir [Wed, 13 Mar 2019 18:40:59 +0000 (11:40 -0700)]
Delete XEvent before method exits.
Commit migrated from https://github.com/dotnet/corefx/commit/
f878d4c086baf2225b4097c03f13f347fc5c54d8
Tarikul Sabbir [Wed, 13 Mar 2019 17:23:40 +0000 (10:23 -0700)]
Formatting change
Commit migrated from https://github.com/dotnet/corefx/commit/
b21616da94e320b643d9dfd9fb3ee248f5752c3c
Tomas Weinfurt [Wed, 13 Mar 2019 16:17:01 +0000 (09:17 -0700)]
small fixes for ping to properly set state in case of failure (dotnet/corefx#33621)
* unix ping fixes
* feedback from review and fixes for failing tests
* feedback from review
* more rework on cleanup logic
* add missing check for disposed object in Async path
* remove freebsd part of this change to make it cleaner
* await for all calls of SendPingAsyncCore()
* make arg checking synchronous and stabilize SendPingAsync_InvalidArgs failing on some platforms
* feedback from review
Commit migrated from https://github.com/dotnet/corefx/commit/
2696d751a7b50bdc3e03bf5089f67aa0bd081b24
Stephen Bonikowsky [Wed, 13 Mar 2019 16:16:22 +0000 (09:16 -0700)]
Updating to latest WCF version.
Commit migrated from https://github.com/dotnet/corefx/commit/
ff42076b3b432205007a562435b08e2aac246f92
Ahson Khan [Wed, 13 Mar 2019 02:26:08 +0000 (19:26 -0700)]
Fix JsonReader bug in multi-segment string processing (dotnet/corefx#35978)
Commit migrated from https://github.com/dotnet/corefx/commit/
118ea047b67221f9c50be03515f04ad52492ee6e
Tarikul Sabbir [Wed, 13 Mar 2019 00:50:02 +0000 (17:50 -0700)]
DataStream Test change
Commit migrated from https://github.com/dotnet/corefx/commit/
d761e61fd8da88f291b39cd0db8bce74fc822e75
Wraith2 [Wed, 13 Mar 2019 00:39:18 +0000 (00:39 +0000)]
make TextDataFeed.DefaultEncoding internal
Commit migrated from https://github.com/dotnet/corefx/commit/
d32a2ee4aea2ffdf3a0ec47081b0a978466a3631
Levi Broderick [Tue, 5 Mar 2019 02:31:41 +0000 (18:31 -0800)]
React to changes through ASCIIEncoding and EncoderNLS
Also create some additional ASCII tests
Commit migrated from https://github.com/dotnet/corefx/commit/
d817d68fc6e2fc78624540aa90a060f4d5bf0eee
Wraith2 [Tue, 12 Mar 2019 23:24:19 +0000 (23:24 +0000)]
address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
f2417f59441b0dc55ad73deb75ff23672041aa5e
Tarikul Sabbir [Tue, 12 Mar 2019 22:19:17 +0000 (15:19 -0700)]
DataSteam Test change
Commit migrated from https://github.com/dotnet/corefx/commit/
01f138e1008381379861eaec6df8a5b457d1084e
Jan Kotas [Tue, 12 Mar 2019 21:03:55 +0000 (14:03 -0700)]
Pin buffer for NtQuerySystemInformation (dotnet/corefx#35991)
Fixes dotnet/corefx#35987
Commit migrated from https://github.com/dotnet/corefx/commit/
704a9669e69ef5faae55ca438e9850b8aa0e9ec5
Tomas Weinfurt [Tue, 12 Mar 2019 19:16:12 +0000 (12:16 -0700)]
Fix SendWithPingUtilityAsync to catch InvalidOperationException (dotnet/corefx#35992)
* ignore InvalidOperationException from Kill
* ignore InvalidOperationException from Kill
Commit migrated from https://github.com/dotnet/corefx/commit/
0f7a0bd5fb4892c1434e263824d394ab621a1b2a