platform/upstream/dotnet/runtime.git
5 years agoRe-enable CA2207 (value type declares a static cctor) (dotnet/corefx#39858)
Stephen Toub [Mon, 29 Jul 2019 15:54:37 +0000 (11:54 -0400)]
Re-enable CA2207 (value type declares a static cctor) (dotnet/corefx#39858)

Commit migrated from https://github.com/dotnet/corefx/commit/7e93ad2cd22832060851ba0e18fcb55129564e2c

5 years agoRe-enable xunit warning 2009 (dotnet/corefx#39847)
Stephen Toub [Mon, 29 Jul 2019 13:42:13 +0000 (09:42 -0400)]
Re-enable xunit warning 2009 (dotnet/corefx#39847)

Commit migrated from https://github.com/dotnet/corefx/commit/6737565ccbb8ceb484d349bd6844f7470bf23248

5 years agoUse relaxed JavascriptEncoder in S.T.JSON specific tests to improve coverage. (dotnet...
Ahson Khan [Mon, 29 Jul 2019 04:17:28 +0000 (21:17 -0700)]
Use relaxed JavascriptEncoder in S.T.JSON specific tests to improve coverage. (dotnet/corefx#39560)

* Use relaxed JavascriptEncoder in S.T.JSON specific tests to improve
coverage.

* Add control characters as well as part of the test data.

* Add JsonElement.WriteTo test and make sure all Utf8JsonWriter in tests
are disposed.

* Fix spacing/formatting.

* Fix call to AssertEquals since it moved to JsonTestHelper.

Commit migrated from https://github.com/dotnet/corefx/commit/74d26be704117139e9ef081c9e287740fde5d002

5 years ago Fix validation check within Utf8JsonWriter for writing a primitive value after anoth...
Ahson Khan [Mon, 29 Jul 2019 04:06:03 +0000 (21:06 -0700)]
 Fix validation check within Utf8JsonWriter for writing a primitive value after another complete value has been written. (dotnet/corefx#39796)

* Fix validation check within Utf8JsonWriter for writing a primitive
value.

* Update the unit test to pass in JsonValueKind as an inlinedata option.

* Test cleanup.

* Remove use of _isNotPrimitive as that is redundant and unnecessary.

* Some more test clean up - validate bytespending moves.

* More test clean up - ensure bytespending remains as is when we throw.

* Invert check order to rely on short-circuiting.

* Address feedback and add comment related tests.

Commit migrated from https://github.com/dotnet/corefx/commit/47c35fe385c18d5f0a4ceacea381f790db472ba2

5 years agoRe-enable xunit warning 1010 (dotnet/corefx#39846)
Stephen Toub [Mon, 29 Jul 2019 02:34:44 +0000 (22:34 -0400)]
Re-enable xunit warning 1010 (dotnet/corefx#39846)

Commit migrated from https://github.com/dotnet/corefx/commit/e36291288fc182e94a919f45e61a8924f953c3cd

5 years agoAdd tests for edge cases in ToLocalTIme (dotnet/corefx#39833)
Tarek Mahmoud Sayed [Sun, 28 Jul 2019 22:50:55 +0000 (15:50 -0700)]
Add tests for edge cases in ToLocalTIme (dotnet/corefx#39833)

For dotnet/coreclrdotnet/corefx#25658: Added conditional tests for ToLocalTIme() to test its behavior with DateTime.MinValue, DateTime.MaxValue, and ambiguous DST time.
Fixed duplicate theory parameter for Subtract_DateTimeOffset.

Commit migrated from https://github.com/dotnet/corefx/commit/72fe15dce2875229722bf6bddd409856d0b47ce1

5 years agoEnable analyzer for xUnit2000 (Constants and literals should be the expected argument...
Ganbarukamo41 [Sun, 28 Jul 2019 22:47:52 +0000 (07:47 +0900)]
Enable analyzer for xUnit2000 (Constants and literals should be the expected argument) (dotnet/corefx#39842)

* Enable xUnit2000 analyzer

This commit enables xUnit2000 (Constants and literals should be the expected argument) and apply fixes for the existing violating codes.
* a Massive commit fixing xUnit2000
* fixing some 2003 errors

* Fix mistakes

* Fix missed errors for unix

Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4

5 years agoMerge pull request dotnet/corefx#39834 from geoffkizer/fixendstreamrace
Geoff Kizer [Sun, 28 Jul 2019 04:25:40 +0000 (21:25 -0700)]
Merge pull request dotnet/corefx#39834 from geoffkizer/fixendstreamrace

HTTP2: Ensure we never send EndStream after RST_STREAM

Commit migrated from https://github.com/dotnet/corefx/commit/57df8b38e4e70fc25aabe3d061cd1745cff0b26b

5 years agoensure we never send EndStream after RST_STREAM
Geoff Kizer [Sat, 27 Jul 2019 22:37:42 +0000 (15:37 -0700)]
ensure we never send EndStream after RST_STREAM

Commit migrated from https://github.com/dotnet/corefx/commit/9389088720e38b9d4f1d126d9daaa3461ad158e8

5 years agoAdd tests for edge cases in ToLocalTIme
Aaron Schiff [Sat, 27 Jul 2019 22:15:41 +0000 (17:15 -0500)]
Add tests for edge cases in ToLocalTIme

For dotnet/coreclrdotnet/corefx#25658: Added conditional tests for ToLocalTIme() to test its behavior with DateTime.MinValue, DateTime.MaxValue, and ambiguous DST time.
Fixed duplicate theory parameter for Subtract_DateTimeOffset.

Commit migrated from https://github.com/dotnet/corefx/commit/dc8e5eb91bb8493f4a6ef6b1e3cd492d3a9a85e3

5 years agoRemove bogus asserts in DataSet tests (dotnet/corefx#39827)
Stephen Toub [Sat, 27 Jul 2019 11:39:18 +0000 (07:39 -0400)]
Remove bogus asserts in DataSet tests (dotnet/corefx#39827)

Commit migrated from https://github.com/dotnet/corefx/commit/610b0eb6e5e058f2c9eb04b4dc62778dc8e062d0

5 years agoFix SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx test (dotnet/corefx...
Stephen Toub [Sat, 27 Jul 2019 02:24:39 +0000 (22:24 -0400)]
Fix SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx test (dotnet/corefx#39795)

Commit migrated from https://github.com/dotnet/corefx/commit/8a6389529afdc0dd53d4c94fe665695ec54c21af

5 years agoDebian 10/Win8.1 fixes: Allow explicitly using SSLv3, TLS1.0/1.1 (dotnet/corefx#39579)
Krzysztof Wicher [Fri, 26 Jul 2019 23:43:12 +0000 (16:43 -0700)]
Debian 10/Win8.1 fixes: Allow explicitly using SSLv3, TLS1.0/1.1 (dotnet/corefx#39579)

* debian 10 fixes

* Fix Windows 8.1 (product issue)

* expand SSL_CTX_set_min/max_proto_version macro in attempt to fix the build

* define SSL_CTRL_SET_MIN/MAX_PROTO_VERSION when not defined

* Apply Win8.1 fix to all platforms in attempt to fix OSX

* check if failing test with excluded SSL2 passes on OSX

* Filter out incompatible protocols at the source instead of each callsite

* Remove ResetProtocolRestrictions from header file

* Update src/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* revert files with only whitespace changes

Commit migrated from https://github.com/dotnet/corefx/commit/d5b91dc5e2b1c4bc73c4ba2070fd7cb8f7013b49

5 years agoMerge pull request dotnet/corefx#39556 from ericstj/Runtime.Caching.NETStandard
Steve Molloy [Fri, 26 Jul 2019 22:26:43 +0000 (15:26 -0700)]
Merge pull request dotnet/corefx#39556 from ericstj/Runtime.Caching.NETStandard

Make System.Runtime.Caching's implementation NETStandard based

Commit migrated from https://github.com/dotnet/corefx/commit/5db03196f0f51f9c1765b383de48a82434bbe8f0

5 years agoMerge pull request dotnet/corefx#39774 from eiriktsarpalis/httpserver-add-echo-header...
Eirik Tsarpalis [Fri, 26 Jul 2019 21:05:57 +0000 (22:05 +0100)]
Merge pull request dotnet/corefx#39774 from eiriktsarpalis/httpserver-add-echo-header-endpoint

HttpStress: Add randomized request headers

Commit migrated from https://github.com/dotnet/corefx/commit/3ebfae3ed729af13e59c0525e7b794327bfd227f

5 years agoUpdate to MatchEvaluator NRE change (dotnet/corefx#39813)
Dan Moseley [Fri, 26 Jul 2019 21:00:30 +0000 (14:00 -0700)]
Update to MatchEvaluator NRE change (dotnet/corefx#39813)

* Update to MatchEvaluator NRE change

* lowercase

Commit migrated from https://github.com/dotnet/corefx/commit/c4e71057d8f2d9717316939584ef046147cefe2f

5 years agotake HttpClient.BaseAddress into account when bounding request uri sizes
Eirik Tsarpalis [Fri, 26 Jul 2019 20:40:48 +0000 (21:40 +0100)]
take HttpClient.BaseAddress into account when bounding request uri sizes

Commit migrated from https://github.com/dotnet/corefx/commit/d5a0fb96a026447dcf201dc7c19b0b8d41be60f5

5 years agothrow for unknown or unsupported AddressFamily on Windows (dotnet/corefx#39785)
Tomas Weinfurt [Fri, 26 Jul 2019 20:31:37 +0000 (13:31 -0700)]
throw for unknown or unsupported AddressFamily on Windows (dotnet/corefx#39785)

* throw for unknown or unsupported SocketAddress on Windows

* feedback from review

Commit migrated from https://github.com/dotnet/corefx/commit/f0a0eca0242cb072acdd940d98d08e43d6adfe28

5 years agomaxRequestLineSize -> MaxRequestUriSize
Eirik Tsarpalis [Fri, 26 Jul 2019 20:08:57 +0000 (21:08 +0100)]
maxRequestLineSize -> MaxRequestUriSize

Commit migrated from https://github.com/dotnet/corefx/commit/920292cf7c763a6963119e7cb7cd2faa149a1cb1

5 years agorespect kestrel request line size
Eirik Tsarpalis [Fri, 26 Jul 2019 19:44:31 +0000 (20:44 +0100)]
respect kestrel request line size

Commit migrated from https://github.com/dotnet/corefx/commit/261ff104b73439fda85a950e2dfb3f5bc8e23c5b

5 years agoAllow JsonConverterAttribute to be applied to an Enum (dotnet/corefx#39790)
Steve Harter [Fri, 26 Jul 2019 17:20:30 +0000 (12:20 -0500)]
Allow JsonConverterAttribute to be applied to an Enum (dotnet/corefx#39790)

Commit migrated from https://github.com/dotnet/corefx/commit/de61fb206e61f105f657ca01b1244580cc9e1e77

5 years agoFix FormatException if an invalid JsonConverter attribute is specified (dotnet/corefx...
Steve Harter [Fri, 26 Jul 2019 16:53:37 +0000 (11:53 -0500)]
Fix FormatException if an invalid JsonConverter attribute is specified (dotnet/corefx#39789)

Commit migrated from https://github.com/dotnet/corefx/commit/dfe3ab2f0205436e23b93c369ee0b2e41a4973e0

5 years agomerge headers and echo headers operations
Eirik Tsarpalis [Fri, 26 Jul 2019 14:49:09 +0000 (15:49 +0100)]
merge headers and echo headers operations

Commit migrated from https://github.com/dotnet/corefx/commit/e22fbde5ebe4000d682bcb679a3a372050c2bc16

5 years agoRe-enable xunit warning 2002 dotnet/corefx#39696 (dotnet/corefx#39706)
Zoey McCullough [Fri, 26 Jul 2019 13:58:06 +0000 (06:58 -0700)]
Re-enable xunit warning 2002 dotnet/corefx#39696 (dotnet/corefx#39706)

* Removed null checks on value types and enabled xunit 2002

* Updated Fill_OpenDataReader_Throws to use range check

Updated Fill_OpenDataReader_Throws to use range check for passing path

* Removed uneeded asserts and updated others

- Removed any assert for a valuetype where it was succeeded by a value type assertion (e.g. Assert.Equal(1, 1))
- Updated reflection tests to check flags for the specified scenario

* Update src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* Update src/System.Reflection/tests/AssemblyNameTests.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* Fixed failing reflection tests and removed Assert.NotNull for enum

* Pulled ruleset up from master to merge

* Cleaned up assert ordering for TestGuid

* Updated TestResponseWithoutContentEvents

- Asserted for 200 OK based on response from DefaultAzureServer + EmptyContentHandler

Commit migrated from https://github.com/dotnet/corefx/commit/c96e389f803b043753558878fefb575f3f85c934

5 years agoaddress feedback
Eirik Tsarpalis [Fri, 26 Jul 2019 13:12:26 +0000 (14:12 +0100)]
address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/b32c61aa4741668d6f4009649412ff80f5d64f85

5 years agoFix NRE when MatchEvaluator returns null (dotnet/corefx#39779)
Dan Moseley [Fri, 26 Jul 2019 05:27:18 +0000 (22:27 -0700)]
Fix NRE when MatchEvaluator returns null (dotnet/corefx#39779)

* Fix NRE when MatchEvaluator returns null

* Update Regex.Replace.Tests.cs

* Use fancy syntax

Commit migrated from https://github.com/dotnet/corefx/commit/98227597b152076cb02c55bb695c572c14284e32

5 years agoRe-enable CA1200 (avoid cref tag prefixes) (dotnet/corefx#39773)
Stephen Toub [Fri, 26 Jul 2019 02:04:39 +0000 (22:04 -0400)]
Re-enable CA1200 (avoid cref tag prefixes) (dotnet/corefx#39773)

* Re-enable CA1200 (avoid cref tag prefixes)

Specifying the prefix prevents the compiler from validating what comes after it.

* Fix netfx build

Commit migrated from https://github.com/dotnet/corefx/commit/58a4d24eb808936f7dc61e68265e968291470b42

5 years agoRe-enable CA1802 (use consts instead of readonly statics) (dotnet/corefx#39782)
Stephen Toub [Fri, 26 Jul 2019 02:02:21 +0000 (22:02 -0400)]
Re-enable CA1802 (use consts instead of readonly statics) (dotnet/corefx#39782)

* Re-enable CA1802 (use consts instead of readonly statics)

I enabled it only for privates and internals, as we've previously violated this in public surface area, and as everything goes through API review moving forward, didn't seem worthwhile fighting it and adding suppressions in various places.

* Address PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/318b5941ba4e713155d82c674c7f5bd0e68faf7b

5 years agoRelax a mutex test condition (dotnet/corefx#39786)
Koundinya Veluri [Thu, 25 Jul 2019 22:21:00 +0000 (15:21 -0700)]
Relax a mutex test condition (dotnet/corefx#39786)

Fixes https://github.com/dotnet/corefx/issues/39694
- When doing a `WaitAny()` with mutexes that are expected to be abandoned and an event that is signaled, it has been seen in the CI on Windows that sometimes the `WaitAny()` may succeed due to event rather than identifying an abandoned mutex. The CLR doesn't do anything special and just delegates to the OS, the only way that could happen is if there could be a delay between the thread exiting and the mutex being released and abandoned. I haven't been able to repro that behavior or the test failure on my machine, it may not be easy to repro, even in the CI it fails only occasionally.
- It's not a bug as long as the mutex eventually gets released and abandoned. Relaxed the condition for `WaitAny()` with an event following a mutex to account for a delay.

Commit migrated from https://github.com/dotnet/corefx/commit/97d5957fc71853961082e22873d926269b291b92

5 years agoaddress feedback
Eirik Tsarpalis [Thu, 25 Jul 2019 20:54:15 +0000 (21:54 +0100)]
address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/88de39071ec291e67f1c5829ea7e9dd30c913da1

5 years agoReduce memory usage of tests and fix asserts for escaped size (dotnet/corefx#39751)
Steve Harter [Thu, 25 Jul 2019 20:24:44 +0000 (15:24 -0500)]
Reduce memory usage of tests and fix asserts for escaped size (dotnet/corefx#39751)

Commit migrated from https://github.com/dotnet/corefx/commit/3e36efc9a3c3f22b87c5f33a25c0ad5dbfeb9396

5 years agoExclude System.Numerics.Tensors Symbol package from publishing (dotnet/corefx#39772)
William Godbe [Thu, 25 Jul 2019 19:18:53 +0000 (12:18 -0700)]
Exclude System.Numerics.Tensors Symbol package from publishing (dotnet/corefx#39772)

Commit migrated from https://github.com/dotnet/corefx/commit/83a6ce4e0ec24791277be6de3ca23d7fdfb56fe1

5 years agoMerge pull request dotnet/corefx#39745 from geoffkizer/requesterrorfix
Geoff Kizer [Thu, 25 Jul 2019 19:07:05 +0000 (12:07 -0700)]
Merge pull request dotnet/corefx#39745 from geoffkizer/requesterrorfix

HTTP2: fix race between request failure and response body read

Commit migrated from https://github.com/dotnet/corefx/commit/64a9e2ccf5e590e0a3a3d6dc9c2a7c828850c912

5 years agoHttpStress: add randomized header operation
Eirik Tsarpalis [Thu, 25 Jul 2019 17:21:30 +0000 (18:21 +0100)]
HttpStress: add randomized header operation

Aguments the stress suite with an "Echo Header" operation
which sends and receives a randomly generated set of headers.
Additionally expands random string to full alphanumeric or ascii range.
Fixes a bug where `n - 1` workers were being initialized.

Commit migrated from https://github.com/dotnet/corefx/commit/ac3e0d6f35dfccdd70bacfc09941fef791192da5

5 years agoAdd [Obsolete] to vbNewLine (dotnet/corefx#39753)
Charles Stoner [Thu, 25 Jul 2019 15:09:17 +0000 (08:09 -0700)]
Add [Obsolete] to vbNewLine (dotnet/corefx#39753)

Commit migrated from https://github.com/dotnet/corefx/commit/75c4a6ee39219480cfeb372c68fd72df90d63c86

5 years agoChange the default symmetric encryption algorithm for EnvelopedCms
Jeremy Barton [Thu, 25 Jul 2019 14:46:11 +0000 (07:46 -0700)]
Change the default symmetric encryption algorithm for EnvelopedCms

.NET Framework upgraded this for 4.8, .NET Core should for 3.0

Commit migrated from https://github.com/dotnet/corefx/commit/64b72f0474555e5039e22a399dbcac289368f68a

5 years agoMerge pull request dotnet/corefx#39632 from eiriktsarpalis/httpstress-segregate-clien...
Eirik Tsarpalis [Thu, 25 Jul 2019 11:12:15 +0000 (12:12 +0100)]
Merge pull request dotnet/corefx#39632 from eiriktsarpalis/httpstress-segregate-client-server

HttpStress: Allow standalone client and server processes

Commit migrated from https://github.com/dotnet/corefx/commit/b5483cb5280235a94b534c93e678e647cfcecd0c

5 years agoRe-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)
Stephen Toub [Thu, 25 Jul 2019 08:45:20 +0000 (04:45 -0400)]
Re-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)

Commit migrated from https://github.com/dotnet/corefx/commit/47d96f89df41ce18d3ba77b38007ec68f7f66fc6

5 years agoAuto-generate the reference assemblies to normalize them (dotnet/corefx#39681)
Ahson Khan [Thu, 25 Jul 2019 03:44:48 +0000 (20:44 -0700)]
Auto-generate the reference assemblies to normalize them (dotnet/corefx#39681)

* Update Microsoft.VisualBasic.Core ref

* Update System.Collections.Concurrent ref

* Update System.Collections.Immutable ref

* Update System.Collections ref

* Update System.ComponentModel.Composition ref

* Update System.Data.Common ref

* Update System.Data.OleDb ref

* Update System.Data.SqlClient ref for netcoreapp

* Update System.Diagnostics.DiagnosticSource ref and DiagnosticSourceActivity.cs

* Update System.IO.Packaging ref for netcoreapp

* Update System.IO.Pipelines ref

* Update System.Linq ref

* Update System.Net.Http ref

* Update System.Net.Security ref

* Update System.Numerics.Tensors ref

* Update System.Reflection.Emit for netcore

* Update System.Security.AccessControl ref

* Update System.Security.Permissions ref

* Update System.ServiceModel.Syndication ref

* Update System.Text.Encodings.Web ref

* Update System.Threading.Channels ref for netcoreapp

* Update System.Utf8String.Experimental ref

* Update System.Utf8String.Experimental csproj to reference new file.

* Upat eSystem.Runtime ref and Manual ref

* Update Microsoft.Bcl.AsyncInterfaces ref

* Disable warning CS8617 for missing nullability annotations within
explicit interface methods.

* Revert System.Runtime.cs back to what's in master.

* Update System.Runtime ref (single change - System.Char -> char).

* Revert System.Collections.Immutable back to what's in master (keep
readonly on private fields).

* Update System.Runtime ref and add comment in Manual ref file for
TypedReference.

Commit migrated from https://github.com/dotnet/corefx/commit/bdd0814360d4c3a58860919f292a306242f27da1

5 years agoEnable xunit2007 analyzer (dotnet/corefx#39740)
Viktor Hofer [Thu, 25 Jul 2019 02:03:09 +0000 (04:03 +0200)]
Enable xunit2007 analyzer (dotnet/corefx#39740)

Commit migrated from https://github.com/dotnet/corefx/commit/619f140e2f0e722a17f3797d532b21ace774ec2e

5 years agoRe-enable xUnit2008 (Assert.True with regex) (dotnet/corefx#39739)
Stephen Toub [Thu, 25 Jul 2019 01:58:45 +0000 (21:58 -0400)]
Re-enable xUnit2008 (Assert.True with regex) (dotnet/corefx#39739)

Commit migrated from https://github.com/dotnet/corefx/commit/e091ee920b211b28a9d8a7928ca3b15294789d82

5 years agoRe-enable xUnit1016 (public MemberDatas) (dotnet/corefx#39738)
Stephen Toub [Thu, 25 Jul 2019 00:46:54 +0000 (20:46 -0400)]
Re-enable xUnit1016 (public MemberDatas) (dotnet/corefx#39738)

Commit migrated from https://github.com/dotnet/corefx/commit/306fe9d60cc6db02a69d8ea6b88dde2b98fe8a7c

5 years agoOnly removing logs which throw invalid parameters exception from eventLogs (dotnet...
Anirudh Agnihotry [Thu, 25 Jul 2019 00:46:40 +0000 (17:46 -0700)]
Only removing logs which throw invalid parameters exception from eventLogs (dotnet/corefx#39705)

* only removing logs which throw invalid parametert exception from eventlogs

* using ordinalIgnoreCase, const name and improving comment

Commit migrated from https://github.com/dotnet/corefx/commit/70aeda2b5b7110ead0ea69dc83f3f47e5728db06

5 years agoparameter name corrected (dotnet/corefx#39744)
Anirudh Agnihotry [Thu, 25 Jul 2019 00:45:38 +0000 (17:45 -0700)]
parameter name corrected (dotnet/corefx#39744)

Commit migrated from https://github.com/dotnet/corefx/commit/32d791286263d58e84a587b4a8be0d7d1e667f05

5 years agoMark System.Numerics.Tensors package as nonshipping (dotnet/corefx#39743)
William Godbe [Wed, 24 Jul 2019 23:22:54 +0000 (16:22 -0700)]
Mark System.Numerics.Tensors package as nonshipping (dotnet/corefx#39743)

* Mark System.Numerics.Tensors package as nonshipping

* Consolidate ItemGroup definition

Commit migrated from https://github.com/dotnet/corefx/commit/a5026415f84efec9c4a51efb6a654be1c4a86070

5 years agofix race between request failure and response body read
Geoff Kizer [Wed, 24 Jul 2019 20:58:28 +0000 (13:58 -0700)]
fix race between request failure and response body read

Commit migrated from https://github.com/dotnet/corefx/commit/a327d792c1590bd9ef744c197dfbb311961d5eef

5 years agoRe-emable CA1507 (use nameof) (dotnet/corefx#39731)
Stephen Toub [Wed, 24 Jul 2019 17:14:01 +0000 (13:14 -0400)]
Re-emable CA1507 (use nameof) (dotnet/corefx#39731)

Commit migrated from https://github.com/dotnet/corefx/commit/c265373119bc0449d347862862b43de35a95b186

5 years agoEnable xunit2012 analyzer (dotnet/corefx#39730)
Viktor Hofer [Wed, 24 Jul 2019 16:20:57 +0000 (18:20 +0200)]
Enable xunit2012 analyzer (dotnet/corefx#39730)

Commit migrated from https://github.com/dotnet/corefx/commit/722ab9b7303ef14db74a1d09d464d180f18f512b

5 years agoAdd comment descriptions to remaining xunit analyzer suppressions (dotnet/corefx...
Stephen Toub [Wed, 24 Jul 2019 14:50:31 +0000 (10:50 -0400)]
Add comment descriptions to remaining xunit analyzer suppressions (dotnet/corefx#39725)

Commit migrated from https://github.com/dotnet/corefx/commit/c1dae31100118f358ac8bf8707a9017c17576356

5 years agoRe-enable CA1825 (zero-length array allocations) (dotnet/corefx#39708)
Stephen Toub [Wed, 24 Jul 2019 14:42:39 +0000 (10:42 -0400)]
Re-enable CA1825 (zero-length array allocations) (dotnet/corefx#39708)

Commit migrated from https://github.com/dotnet/corefx/commit/d0fc0a2b193d11645acc0fe72bbf1b97678a5161

5 years agoRe-enable CA2200 (rethrowing exceptions in catch blocks) (dotnet/corefx#39700)
Stephen Toub [Wed, 24 Jul 2019 11:33:20 +0000 (07:33 -0400)]
Re-enable CA2200 (rethrowing exceptions in catch blocks) (dotnet/corefx#39700)

Commit migrated from https://github.com/dotnet/corefx/commit/7b142543ce066ba684303837c2e9723b9e140d39

5 years agoEnable xunit2015 analyzer (dotnet/corefx#39714)
Viktor Hofer [Wed, 24 Jul 2019 11:25:58 +0000 (13:25 +0200)]
Enable xunit2015 analyzer (dotnet/corefx#39714)

Commit migrated from https://github.com/dotnet/corefx/commit/a7fa4b58be0b266d8fe680de34f9b1a3dab8523a

5 years agoMerge pull request dotnet/corefx#39638 from geoffkizer/streamshutdownfixes4
Geoff Kizer [Wed, 24 Jul 2019 09:28:18 +0000 (02:28 -0700)]
Merge pull request dotnet/corefx#39638 from geoffkizer/streamshutdownfixes4

HTTP2: Rework shutdown handling

Commit migrated from https://github.com/dotnet/corefx/commit/ca3fe6738ae6afc56e1f8fb5477a57a8dc2e183c

5 years agoaddress review feedback and fix test issue
Geoff Kizer [Wed, 24 Jul 2019 07:47:35 +0000 (00:47 -0700)]
address review feedback and fix test issue

Commit migrated from https://github.com/dotnet/corefx/commit/d6e6f52c928f56b424b08fcf6e08ea84a74748ab

5 years agoRe-enable CA1401 (public P/Invoke methods) (dotnet/corefx#39710)
Stephen Toub [Wed, 24 Jul 2019 07:45:28 +0000 (03:45 -0400)]
Re-enable CA1401 (public P/Invoke methods) (dotnet/corefx#39710)

Commit migrated from https://github.com/dotnet/corefx/commit/28e0be5f236b57027b66395fcef87d3c58e31424

5 years agoRe-enable CA2008 (tasks without a TaskScheduler) (dotnet/corefx#39707)
Stephen Toub [Wed, 24 Jul 2019 07:44:54 +0000 (03:44 -0400)]
Re-enable CA2008 (tasks without a TaskScheduler) (dotnet/corefx#39707)

Commit migrated from https://github.com/dotnet/corefx/commit/9958740c24865cad40dd84bcd8c416cea927e3cc

5 years agoRe-enable CA1821 (remove empty finalizers) (dotnet/corefx#39709)
Stephen Toub [Wed, 24 Jul 2019 07:42:36 +0000 (03:42 -0400)]
Re-enable CA1821 (remove empty finalizers) (dotnet/corefx#39709)

Commit migrated from https://github.com/dotnet/corefx/commit/4cdbbd9430a3e080eb0926f612c89ffe74ed6e7e

5 years agoUpdate dummy fields within the ref by auto-generating them from the source assembly...
Ahson Khan [Wed, 24 Jul 2019 06:28:07 +0000 (23:28 -0700)]
Update dummy fields within the ref by auto-generating them from the source assembly. (dotnet/corefx#39687)

* Update dummy fields within the ref by auto-generating them from the
source assembly.

* Address feedback.

Commit migrated from https://github.com/dotnet/corefx/commit/c50b758727a041aec2dc959ee5ca2df5614a3c16

5 years agoUpgrade Roslyn analyzers (dotnet/corefx#39703)
Stephen Toub [Wed, 24 Jul 2019 03:10:17 +0000 (23:10 -0400)]
Upgrade Roslyn analyzers (dotnet/corefx#39703)

* Upgrade analyzer versions

We were years behind.

* Fix nameof warnings in System.ComponentModel.Annotations

* Disable all rules with failures

* Enable CA2007 (ConfigureAwait)

* Enable CA5373, 5379, 5384, and 5385 (weak crypto)

* Remove stale nuget analyzer packages consumed into main package

* Enable CA2002

Commit migrated from https://github.com/dotnet/corefx/commit/0f1fa092672a344b92c4bc440f3ab6232614a7f4

5 years agoUpdate package testing to test for 5.0 and use the SDK targeting pack for 3.0
Santiago Fernandez Madero [Fri, 19 Jul 2019 22:48:01 +0000 (15:48 -0700)]
Update package testing to test for 5.0 and use the SDK targeting pack for 3.0

Commit migrated from https://github.com/dotnet/corefx/commit/e733500d11ae73f5ddba17b75127f1b3033c470c

5 years agoRe-enable xunit warning 2004 (dotnet/corefx#39698)
Stephen Toub [Tue, 23 Jul 2019 21:05:15 +0000 (17:05 -0400)]
Re-enable xunit warning 2004 (dotnet/corefx#39698)

* 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

5 years agofix race in request body completion
Geoff Kizer [Tue, 23 Jul 2019 20:18:56 +0000 (13:18 -0700)]
fix race in request body completion

Commit migrated from https://github.com/dotnet/corefx/commit/29328b71b65abe3a199f0daf62f6ee71ca916e78

5 years agofix race with _requestBodyCancellationSource creation
Geoff Kizer [Tue, 23 Jul 2019 08:10:16 +0000 (01:10 -0700)]
fix race with _requestBodyCancellationSource creation

Commit migrated from https://github.com/dotnet/corefx/commit/7394185c0fc8a52bebf384b933b07c1eb1fba360

5 years agorework SendHeadersAsync to address various issues
Geoff Kizer [Tue, 23 Jul 2019 05:15:05 +0000 (22:15 -0700)]
rework SendHeadersAsync to address various issues

Commit migrated from https://github.com/dotnet/corefx/commit/2d5a9555d4888c82c653a9d7ad8368bc94adfdf2

5 years agoaddress review feedback
Geoff Kizer [Tue, 23 Jul 2019 03:25:59 +0000 (20:25 -0700)]
address review feedback

Commit migrated from https://github.com/dotnet/corefx/commit/752c1c8d8a01d22d52b1a320f9ed082049494045

5 years agocombine into single Cancel method on stream, and ensure Dispose cancels properly...
Geoff Kizer [Sat, 20 Jul 2019 17:02:45 +0000 (10:02 -0700)]
combine into single Cancel method on stream, and ensure Dispose cancels properly when response is not read to end

Commit migrated from https://github.com/dotnet/corefx/commit/5973d1ee6f3b616d2af2bc80527bdf8fe76ee210

5 years agorework shutdown handling
Geoff Kizer [Fri, 12 Jul 2019 11:41:05 +0000 (04:41 -0700)]
rework shutdown handling

Commit migrated from https://github.com/dotnet/corefx/commit/0cd73b77e1f31d48037b56deb0206f4e56b4232e

5 years agoRe-enable xunit warning 2003 (dotnet/corefx#39696)
Stephen Toub [Tue, 23 Jul 2019 19:49:33 +0000 (15:49 -0400)]
Re-enable xunit warning 2003 (dotnet/corefx#39696)

* Replace "Assert.Equal(null, " with "Assert.Null("

* Replace "Assert.NotEqual(null, " with "Assert.NotNull("

* Replace "Assert.Same(null, " with "Assert.Null("

* Replace "Assert.StrictEqual(null, " with "Assert.Null("

Commit migrated from https://github.com/dotnet/corefx/commit/6de660a02e335eefebfcc3c81ecb0013e2a8148e

5 years agoMerge pull request dotnet/corefx#39693 from eiriktsarpalis/add-dockerignore
Eirik Tsarpalis [Tue, 23 Jul 2019 17:43:46 +0000 (18:43 +0100)]
Merge pull request dotnet/corefx#39693 from eiriktsarpalis/add-dockerignore

Add .dockerignore file to the root of the repo

Commit migrated from https://github.com/dotnet/corefx/commit/e6a5951fb68a09598f1fc1826a94de212385c649

5 years agoMake AsciiToLower ReadOnlySpan<byte> (dotnet/corefx#39678)
Egor Bogatov [Tue, 23 Jul 2019 14:25:37 +0000 (17:25 +0300)]
Make AsciiToLower ReadOnlySpan<byte> (dotnet/corefx#39678)

Commit migrated from https://github.com/dotnet/corefx/commit/794bde4b8eb26047b6495af09a428e03e81e7e81

5 years agoadd license notice to new source files
Eirik Tsarpalis [Tue, 23 Jul 2019 13:59:02 +0000 (14:59 +0100)]
add license notice to new source files

Commit migrated from https://github.com/dotnet/corefx/commit/930dc991ca17b759d675c5015cd9c61bc8a725be

5 years agoDisable SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx test (dotnet...
Stephen Toub [Tue, 23 Jul 2019 13:09:51 +0000 (09:09 -0400)]
Disable SendAsync_SuppressedGlobalStaticPropagationNoListenerAppCtx test (dotnet/corefx#39692)

Commit migrated from https://github.com/dotnet/corefx/commit/687f36489c19072cd5a19d48c099f53bbc871c4d

5 years agoRe-enable xunit warning 1006 (dotnet/corefx#39685)
Stephen Toub [Tue, 23 Jul 2019 06:39:47 +0000 (02:39 -0400)]
Re-enable xunit warning 1006 (dotnet/corefx#39685)

Regex search and replace for [InlineData()] with [Theory].

Commit migrated from https://github.com/dotnet/corefx/commit/b58a866ba8709d66eed52bb8ecb13966b7436a1d

5 years agoRe-enable all DisableXUnitAnalyzer test projects (dotnet/corefx#39674)
Stephen Toub [Mon, 22 Jul 2019 20:56:01 +0000 (16:56 -0400)]
Re-enable all DisableXUnitAnalyzer test projects (dotnet/corefx#39674)

* Re-enable all DisableXUnitAnalyzer test projects

* Remove TODO comment

Commit migrated from https://github.com/dotnet/corefx/commit/16f3eef83d6df4c9dbc0e2992dafbc9553db363d

5 years agoRe-enable ~20 xunit analyzers (dotnet/corefx#39671)
Stephen Toub [Mon, 22 Jul 2019 20:45:03 +0000 (16:45 -0400)]
Re-enable ~20 xunit analyzers (dotnet/corefx#39671)

* Re-enable ~20 xunit analyzers

All but one of these had no associated warnings firing.  I fixed one warning to be able to re-enable another analyzer.

* Fix netfx build failures

Commit migrated from https://github.com/dotnet/corefx/commit/c60b8172cfcd1e7f0d8104872f279781fd288b68

5 years agoCustom converter contravariant test coverage (dotnet/corefx#39558)
buyaa-n [Mon, 22 Jul 2019 18:43:03 +0000 (11:43 -0700)]
Custom converter contravariant test coverage (dotnet/corefx#39558)

* Custom converter contravariant test coverage

Commit migrated from https://github.com/dotnet/corefx/commit/27228368037aeaa27fc5220d7d12c0550a2ef9c3

5 years agoUpdate breaking changes doc with a few clarifications (dotnet/corefx#39665)
Stephen Toub [Mon, 22 Jul 2019 18:06:56 +0000 (14:06 -0400)]
Update breaking changes doc with a few clarifications (dotnet/corefx#39665)

Commit migrated from https://github.com/dotnet/corefx/commit/f25b89e05594b0e56e1bea7080c935908142e960

5 years agoAdd missing fields to BrotliEncoder/Decoder ref (dotnet/corefx#39653)
Stephen Toub [Mon, 22 Jul 2019 16:32:21 +0000 (12:32 -0400)]
Add missing fields to BrotliEncoder/Decoder ref (dotnet/corefx#39653)

Without these, we can end up with corrupt encoder/decoder state due to uninitialized fields.

Commit migrated from https://github.com/dotnet/corefx/commit/3c3b9ceee6e1416db6f1ddbc1ab0d0ffb67c16fa

5 years agoRemove unnecessary empty try { } blocks (dotnet/corefx#39664)
Stephen Toub [Mon, 22 Jul 2019 16:30:03 +0000 (12:30 -0400)]
Remove unnecessary empty try { } blocks (dotnet/corefx#39664)

Unnecessary in .NET Core code.  I didn't modify additional instances in libraries that target netstandard/netfx.

Commit migrated from https://github.com/dotnet/corefx/commit/ca795a928d210c78c6bbd3fa10eb35f4c093a5a4

5 years agostress server cleanups
Eirik Tsarpalis [Mon, 22 Jul 2019 12:03:17 +0000 (13:03 +0100)]
stress server cleanups

Commit migrated from https://github.com/dotnet/corefx/commit/358267704c7f6dc7a214353be151ea83e37f8fc7

5 years agofix build
Eirik Tsarpalis [Mon, 22 Jul 2019 10:20:21 +0000 (11:20 +0100)]
fix build

Commit migrated from https://github.com/dotnet/corefx/commit/01d3536ed7d2677f92f50c6fa53ccf3d8ca2f28c

5 years agoDisable DefaultPageSettings_Null_ReturnsExpected test (dotnet/corefx#39647)
Stephen Toub [Sun, 21 Jul 2019 01:45:58 +0000 (21:45 -0400)]
Disable DefaultPageSettings_Null_ReturnsExpected test (dotnet/corefx#39647)

Commit migrated from https://github.com/dotnet/corefx/commit/9bb93a61365db848aaf914b5dfb8d6684df3335e

5 years agoFix NullReferenceExceptions in IndentedTextWriter without writer (dotnet/corefx#39584)
Hugh Bellamy [Sun, 21 Jul 2019 00:59:51 +0000 (01:59 +0100)]
Fix NullReferenceExceptions in IndentedTextWriter without writer (dotnet/corefx#39584)

Commit migrated from https://github.com/dotnet/corefx/commit/52f0a9192d1fcf624252c79e1fe5aa057f1db719

5 years agoFix up cgroup2fs in Interop.MountPoints.FormatInfo (dotnet/corefx#39633)
Omair Majid [Sun, 21 Jul 2019 00:54:49 +0000 (20:54 -0400)]
Fix up cgroup2fs in Interop.MountPoints.FormatInfo (dotnet/corefx#39633)

`stat -fc %T /sys/fs/cgroup` calls this file system `cgroup2fs`

Add the cgroup2fs file system magic number. Available from:

  - https://www.kernel.org/doc/Documentation/cgroup-v2.txt
  - man 2 statfs

Move cgroup2fs next to cgroupfs in the drive type list, since it is also
DriveType.Ram.

Commit migrated from https://github.com/dotnet/corefx/commit/11416bd48af2c695dde9ef0057659249be10f12d

5 years agoPass CancellationToken from Http2Connection.SendHeadersAsync to StartWriteAsync ...
Stephen Toub [Sun, 21 Jul 2019 00:47:17 +0000 (20:47 -0400)]
Pass CancellationToken from Http2Connection.SendHeadersAsync to StartWriteAsync (dotnet/corefx#39635)

Commit migrated from https://github.com/dotnet/corefx/commit/9597dadcea747960aba304253370a17a2218208d

5 years agoDisable nullable warnings for netstandard and netfx (dotnet/corefx#39636)
Stephen Toub [Sat, 20 Jul 2019 12:47:08 +0000 (08:47 -0400)]
Disable nullable warnings for netstandard and netfx (dotnet/corefx#39636)

Commit migrated from https://github.com/dotnet/corefx/commit/e64cac6dcacf996f98f0b3f75fb7ad0c12f588f7

5 years agoPort some methods of the VB Interaction module (dotnet/corefx#39574)
Edison Henrique Andreassy [Sat, 20 Jul 2019 04:04:33 +0000 (01:04 -0300)]
Port some methods of the VB Interaction module (dotnet/corefx#39574)

Commit migrated from https://github.com/dotnet/corefx/commit/45851336efa3b754f427d00cef3d388357aed308

5 years agoRemove unnecessary use of volatile in PartitionerStatic (dotnet/corefx#39591)
Stephen Toub [Sat, 20 Jul 2019 01:09:49 +0000 (21:09 -0400)]
Remove unnecessary use of volatile in PartitionerStatic (dotnet/corefx#39591)

`SharedInt`, which is just an object wrapper around a `volatile int` was being used even though a) the objects weren't actually being shared, and b) the stored `int` was sometimes being passed by `ref` and thus losing its voliatility in some cases anyway.

(It's not entirely clear why an object is being used, regardless, but from the comments it appears to be due to concerns around false sharing.  Presumably cases were found where the enumerators were all allocated up-front resulting in these ints stored as part of the enumerator objects ending up on the same cache line, so they were moved to objects allocated on discrete threads during MoveNext to minimize that possibility.)

Commit migrated from https://github.com/dotnet/corefx/commit/7f21952eed6c421d6854bcce3c0a8f76f2d5de9b

5 years agoregular comment
Eirik Tsarpalis [Fri, 19 Jul 2019 23:15:59 +0000 (00:15 +0100)]
regular comment

Commit migrated from https://github.com/dotnet/corefx/commit/4e9a2648cd0a5f116af2ecef5879866688b034cb

5 years agoaddress feedback
Eirik Tsarpalis [Fri, 19 Jul 2019 23:12:18 +0000 (00:12 +0100)]
address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/1c3de2a6aee80cf5c56d4ac118ee8f7157a8d112

5 years agoHttpStress: Segregate Client & Server into separate classes and support running stand...
Eirik Tsarpalis [Fri, 19 Jul 2019 21:23:33 +0000 (22:23 +0100)]
HttpStress: Segregate Client & Server into separate classes and support running standalone servers and clients

Commit migrated from https://github.com/dotnet/corefx/commit/371f8f2ae76308c7aad6b98eb209d06f485c2c94

5 years agoDon't dispose StreamPipeWriter CancellationToken until after Flush (dotnet/corefx...
Justin Kotalik [Fri, 19 Jul 2019 19:53:12 +0000 (12:53 -0700)]
Don't dispose StreamPipeWriter CancellationToken until after Flush (dotnet/corefx#39610) (dotnet/corefx#39620)

Commit migrated from https://github.com/dotnet/corefx/commit/7431e4938c461f6e24cf3122c0b9ca4eb27e4dde

5 years agoRe-enable unicode host name test (dotnet/corefx#39606)
Stephen Toub [Fri, 19 Jul 2019 14:08:42 +0000 (10:08 -0400)]
Re-enable unicode host name test (dotnet/corefx#39606)

Site appears to be back up.

Commit migrated from https://github.com/dotnet/corefx/commit/1303d28179b4369cbfac43affd723fa6e0bc9554

5 years agoAvoid "async void" tests (dotnet/corefx#39613)
Stephen Toub [Fri, 19 Jul 2019 14:07:15 +0000 (10:07 -0400)]
Avoid "async void" tests (dotnet/corefx#39613)

Most of these are just because "async void" tests are rare and require special handling in xunit we needn't use.  But a few of these are plain wrong and were resulting in our not actually testing what we hoped to test.

Commit migrated from https://github.com/dotnet/corefx/commit/50d8c71bb6139f3c06dd820d6d757a095a9fe994

5 years agoAdd telemetry marker for tests (dotnet/corefx#39619)
Viktor Hofer [Fri, 19 Jul 2019 13:43:31 +0000 (15:43 +0200)]
Add telemetry marker for tests (dotnet/corefx#39619)

Commit migrated from https://github.com/dotnet/corefx/commit/cce2f2e92b75a42d07da123e091ac96fb47f44c5

5 years agoFix in System.Data.Common namespace, use correct WriteAttributeString API (dotnet...
Cheena Malhotra [Thu, 18 Jul 2019 22:45:54 +0000 (15:45 -0700)]
Fix in System.Data.Common namespace, use correct WriteAttributeString API (dotnet/corefx#39543)

Commit migrated from https://github.com/dotnet/corefx/commit/182bed51dec709b3b1b56a4f435e0727e5dea110

5 years agoRemove dead ifdef'd code from Microsoft.CSharp/VisualBasic (dotnet/corefx#39587)
Stephen Toub [Thu, 18 Jul 2019 18:23:46 +0000 (14:23 -0400)]
Remove dead ifdef'd code from Microsoft.CSharp/VisualBasic (dotnet/corefx#39587)

Commit migrated from https://github.com/dotnet/corefx/commit/9c2682f5899f280e3ca2e52569f84eaecb255647

5 years agoMove ConnectAsync_AddCustomHeaders_Success ClientWebSocket test to loopback (dotnet...
Stephen Toub [Thu, 18 Jul 2019 18:21:49 +0000 (14:21 -0400)]
Move ConnectAsync_AddCustomHeaders_Success ClientWebSocket test to loopback (dotnet/corefx#39589)

Commit migrated from https://github.com/dotnet/corefx/commit/83954bb1404c5bdfb56130c5a4994e5e05403beb

5 years agoFix ordering of visibility and abstract/virtual/override (dotnet/corefx#39590)
Stephen Toub [Thu, 18 Jul 2019 18:21:08 +0000 (14:21 -0400)]
Fix ordering of visibility and abstract/virtual/override (dotnet/corefx#39590)

To conform to expected style across corefx.

Commit migrated from https://github.com/dotnet/corefx/commit/b95ad3c0f9066fa426754bd6e3379fbaca24834e

5 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#39567)
dotnet-maestro[bot] [Thu, 18 Jul 2019 18:20:31 +0000 (11:20 -0700)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#39567)

* Update dependencies from https://github.com/dotnet/coreclr build 20190716.2

- Microsoft.NET.Sdk.IL - 5.0.0-alpha1.19366.2
- Microsoft.NETCore.ILAsm - 5.0.0-alpha1.19366.2
- Microsoft.NETCore.Runtime.CoreCLR - 5.0.0-alpha1.19366.2

* Ignore System.Private.Corelib in netcoreapp3.0 package testing

Commit migrated from https://github.com/dotnet/corefx/commit/167bb417724b2338df492b417bdfea89d458e473