Viktor Hofer [Fri, 30 Aug 2019 13:31:38 +0000 (15:31 +0200)]
Ignore casing in servicename tests on nano server (dotnet/corefx#40699)
Commit migrated from https://github.com/dotnet/corefx/commit/
0c650b2765f64186f2fe84e332d8a74108866db2
Viktor Hofer [Fri, 30 Aug 2019 08:34:54 +0000 (10:34 +0200)]
Update pullrequest-builds.md
Commit migrated from https://github.com/dotnet/corefx/commit/
261b2cdc260bc94967a8af6666831739d91ceb96
Viktor Hofer [Fri, 30 Aug 2019 02:07:36 +0000 (04:07 +0200)]
Disable EventLog failing test on Windows (dotnet/corefx#40688)
Relates to dotnet/corefx#40224
Commit migrated from https://github.com/dotnet/corefx/commit/
ae0d0cb852a6186ca5ef8130b0bf862314485017
Viktor Hofer [Fri, 30 Aug 2019 02:07:11 +0000 (04:07 +0200)]
Disable two flaky tests Mutex/Netw (dotnet/corefx#40689)
Commit migrated from https://github.com/dotnet/corefx/commit/
3ef9df83a04113947c42d69cef4b7aadedd612c6
Steve Harter [Thu, 29 Aug 2019 22:18:38 +0000 (17:18 -0500)]
Deserialize extension data properly for child objects (dotnet/corefx#40662)
Commit migrated from https://github.com/dotnet/corefx/commit/
26782185622fde9ba354a3decd42f9a0a1a1a266
Viktor Hofer [Thu, 29 Aug 2019 21:39:44 +0000 (23:39 +0200)]
Enable macOS10.14 in PR builds (dotnet/corefx#40684)
Commit migrated from https://github.com/dotnet/corefx/commit/
7e5791b9fb20e29b5fbf8d89ff2688663ae9310a
Tom Deseyn [Thu, 29 Aug 2019 20:59:32 +0000 (22:59 +0200)]
SmtpClient: fix Timeout for low values (dotnet/corefx#37462)
* SmtpClient: fix Timeout for low values
The timeout is triggered from a Timer.
There were two race conditions:
- The timer event could occur before there was a connection to abort.
- The connection abort performs a TcpClient.Dispose, which may not
work when there is a TcpClient.Connect occurring simultaneously.
* TCPClient: make Dispose thread-safe
* Fix NullReferenceException from _networkstream.Close
* SmtpTransport: fix racy aborted detection
* TestZeroTimeout: skip on .NET Framework
* PR feedback
* Don't null out socket on Dispose to let ODE propagate from Socket
* Fix merge
* Run TestZeroTimeout test on Linux too
* Add back ODE to TcpClient.Connect(IPEndPoint)
* Add comment about why we're disposing the socket
* PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
807a18da803b09cdca42bfb7d05652b843f5079b
Steve Harter [Thu, 29 Aug 2019 20:02:09 +0000 (15:02 -0500)]
Add custom enum converter test for having flags as array (dotnet/corefx#40678)
Commit migrated from https://github.com/dotnet/corefx/commit/
e3644c538ab5dad6c19c6a7c975df0b160823875
Anirudh Agnihotry [Thu, 29 Aug 2019 17:46:09 +0000 (10:46 -0700)]
changing netcoreapp targetframework from 3.0 to 5.0 and adding support for targetgroup = netcoreapp5.0 (dotnet/corefx#40049)
* adding 5.0 target moniker
* Restoring packages for netcoreapp3.0
* package config for crypto done
* Drawing.Common and System.Windows.Extensions done
* some left over crypto and some smaller other libraries
* security.permissions, WindowsRuntime, WindowsRuntime.Xaml done
* experimental projects and openssl cryptography
* harvesting the runtime package version for windows Runtime
* update VS configurations
* reverting the shared framework package
* some remaining projects
* Using sdk to restore package and targetFrameowrk for netcoreapp3.0
* removing harvesting and using ReferenceFromRuntime for windowsRuntime project
* For oob packages with no pkg folder
* addresses feedback
* addresses the feedback
* reverting a commit with extra packageconfig additions
* System.text.Encoding.Web configurations edited
Commit migrated from https://github.com/dotnet/corefx/commit/
777dbdec193fcbe49b3f18614348ac96f77d57c3
Layomi Akinrinade [Thu, 29 Aug 2019 15:08:43 +0000 (11:08 -0400)]
Improve JsonSerializer support for derived types (dotnet/corefx#40654)
Commit migrated from https://github.com/dotnet/corefx/commit/
c59f5bf9badcda76581cd56cbfc5507f29fb022c
Steve Harter [Wed, 28 Aug 2019 22:46:55 +0000 (17:46 -0500)]
Fix additional issue of dictionary properties being skipped (dotnet/corefx#40629)
Commit migrated from https://github.com/dotnet/corefx/commit/
546fdc4198bdfd89504c8895c1bd608b4e92d80d
Cory Nelson [Wed, 28 Aug 2019 20:11:02 +0000 (13:11 -0700)]
Fix HashSet.SetCapacity() that increases capacity failing after a successful Remove(). (dotnet/corefx#40638)
Fix HashSet.SetCapacity() not accounting for freelist when increasing capacity.
Resolves dotnet/corefx#40621
Commit migrated from https://github.com/dotnet/corefx/commit/
2d6fe6b5cc3adba461bb8737c7e5c947992d4c7a
Jose Perez Rodriguez [Tue, 27 Aug 2019 23:06:07 +0000 (16:06 -0700)]
Calculate Harvest packages during build instead of using checked-in source (dotnet/corefx#40548)
* Calculate Harvest packages during build instead of using checked-in source
* Add ability to override the calculated package references and versions
* Switch to use PackageDownload instead of PackageReference
Commit migrated from https://github.com/dotnet/corefx/commit/
fde678cf14cf1a8e76fe8b6d384d2110f49d253d
Tom Deseyn [Tue, 27 Aug 2019 19:17:09 +0000 (21:17 +0200)]
Reconfigure terminal for Console usage even if only one of stdin/stdout was used by the child (dotnet/corefx#40563)
* Process: Unix: ensure we reconfigure the terminal for Console usage if only one of stdin/stdout was used by the child.
Console: Unix: Fix cache check for VTIME (read timeout).
Fixes https://github.com/dotnet/corefx/issues/40557
* Also consider not redirecting stderr as terminal usage
Commit migrated from https://github.com/dotnet/corefx/commit/
4b35a6fe24aed9ba44ef2534bd32b7a1e0bb7841
Charles Stoner [Tue, 27 Aug 2019 18:17:58 +0000 (11:17 -0700)]
Port remaining members of ErrObject, Interaction, SpecialDirectories (dotnet/corefx#40365)
Commit migrated from https://github.com/dotnet/corefx/commit/
063568705557b469606eef1069946484d78034ae
madmir [Tue, 27 Aug 2019 17:58:00 +0000 (19:58 +0200)]
Remove Uri.IdnScope and perform cleanup (dotnet/corefx#40546)
Commit migrated from https://github.com/dotnet/corefx/commit/
9630ecefc14671d26b2426e9bc76b8178dd3dd75
Jan Vorlicek [Tue, 27 Aug 2019 16:36:07 +0000 (18:36 +0200)]
Remove useless GdiPlus cleanup (dotnet/corefx#40617)
Part of the cleanup was not compiled in and the rest didn't have any
effect.
Commit migrated from https://github.com/dotnet/corefx/commit/
619f73197f28cc998265340c817cbbaa12d165c7
Stephen Toub [Tue, 27 Aug 2019 16:35:52 +0000 (12:35 -0400)]
Remove stray "#nullable enable" from Pkcs (dotnet/corefx#40622)
This assembly hasn't been reviewed yet for nullability annotations. We don't want to be mislead by this one file saying it has been.
Commit migrated from https://github.com/dotnet/corefx/commit/
c46bd6c33f4c6ad0303d64522bb1f02c6dc5b64c
Steve Harter [Tue, 27 Aug 2019 16:06:59 +0000 (11:06 -0500)]
Add additional skip tests and prevent reset of property index for perf (dotnet/corefx#40598)
Commit migrated from https://github.com/dotnet/corefx/commit/
7cc4a04ed3bb9319ec2d80c186a22da3803fda23
David Cantu [Tue, 27 Aug 2019 06:11:59 +0000 (23:11 -0700)]
Change exception message when reading numbers with leading zeros (dotnet/corefx#40520)
* Change exception message when reading numbers with leading zeroes such as octals.
* Modified exception message and added condition to only throw it when an actual number is being read.
* Addressing suggestions.
* Narrowing scope to ConsumeZero and ConsumeZeroMultiSegment methods only.
* Addressing suggestion to use JsonHelpers.IsInRangeInclusive
Commit migrated from https://github.com/dotnet/corefx/commit/
7055b496a30dfe0f66a2f555cad31502473d144b
Stephen Toub [Tue, 27 Aug 2019 00:47:04 +0000 (20:47 -0400)]
Fix PLINQ outerloop tests (dotnet/corefx#40589)
* Revert dotnet/corefx#40415's changes to PLINQ tests
They broke outerloop significantly.
* Fix MemberData(BinaryOperations) usage in PLINQ
Lots of outerloop tests are failing because xunit is preferring the wrong overload of the BinaryOperations method via reflection. This just renames some of the methods to avoid the overloads.
Commit migrated from https://github.com/dotnet/corefx/commit/
8429c2a5cc01ac07122f4439f360f8ab2ca4ae86
Stephen Toub [Mon, 26 Aug 2019 23:47:48 +0000 (19:47 -0400)]
Re-enable XML theories with English-only variants (dotnet/corefx#39607)
* Re-enable XML theories with English-only variants
* Disable more XML tests on non-English systems
It turns out a bunch of these tests are comparing error strings against hardcoded English text as to what the expected error message will be.
Commit migrated from https://github.com/dotnet/corefx/commit/
a6059cdc54865304d1cb76b514096cadddda486f
Katarzyna Bułat [Mon, 26 Aug 2019 22:51:04 +0000 (15:51 -0700)]
JsonArray and transformations API implementation (dotnet/corefx#40469)
* JsonArray added
* Transformations API added
* Review Comments included
Commit migrated from https://github.com/dotnet/corefx/commit/
ad4fdd9cd3d99d0240fa53b9b7bdc23bb7a3f4a8
Mikel Blanchard [Mon, 26 Aug 2019 21:04:49 +0000 (14:04 -0700)]
Fix issue causing subsequent properties to be skipped during deserialization once a dictionary has been skipped (dotnet/corefx#40490)
Commit migrated from https://github.com/dotnet/corefx/commit/
fb30a2d1a2bffbba2c039fd294c471962576a2d7
Steve Harter [Mon, 26 Aug 2019 20:58:46 +0000 (15:58 -0500)]
Allow PathAssemblyResolver to use an assembly with different PublicKeyToken if reference is Retargetable (dotnet/corefx#40581)
Commit migrated from https://github.com/dotnet/corefx/commit/
fca60323d9606a90b327273d08089200ae6f527b
Aashik Nagadikeri Harish [Mon, 26 Aug 2019 20:17:19 +0000 (13:17 -0700)]
System.Numeric.Tests tests now have unique inputs (dotnet/corefx#40564)
Matrix add, subtract and multiplication tests now have unique inputs
Commit migrated from https://github.com/dotnet/corefx/commit/
cadc61e7696ceaab416db7f2132db55acfe7c48c
Hugh Bellamy [Mon, 26 Aug 2019 19:52:45 +0000 (21:52 +0200)]
Move ReferenceConverter to the new test base and add ComponentConverter tests (dotnet/corefx#38981)
Commit migrated from https://github.com/dotnet/corefx/commit/
8038032294f7a43b5b23bf84d1b0b7cf2d692768
Tomas Weinfurt [Mon, 26 Aug 2019 19:22:44 +0000 (12:22 -0700)]
detect libinotify on FreeBSD (dotnet/corefx#40202)
Commit migrated from https://github.com/dotnet/corefx/commit/
29e4b76150ace52cb7ccec2ab880fbf23f2dfab3
Stephen Toub [Mon, 26 Aug 2019 18:41:59 +0000 (14:41 -0400)]
Remove a few allocations (dotnet/corefx#40580)
Commit migrated from https://github.com/dotnet/corefx/commit/
0f7b2968f098f1231993b4e0751026884659b193
Levi Broderick [Mon, 26 Aug 2019 18:03:21 +0000 (11:03 -0700)]
Add more span-based Vector<T> ctors and CopyTo tests (dotnet/corefx#36136)
Commit migrated from https://github.com/dotnet/corefx/commit/
53edc76f126940875d6ea11ede1f6a00e4a4ce5b
Jeremy Barton [Mon, 26 Aug 2019 17:46:33 +0000 (10:46 -0700)]
Clean up JsonElementWriteTests (dotnet/corefx#40468)
* Make JsonElementWriteTests and JsonDocumentWriteTests share drivers
* Fix the casing of all escaped values in these tests (reducing the need for normalization)
* Hard-code the correct answer for a test that used NewtonSoft.Json to dynamically compute the same answer every run
* Make two async tests declare async, and await the async part.
As a followup the JsonElementWriteTests / JsonDocumentWriteTests / JsonReadonlyDomWriteTests classes can be split to multiple files, but in this PR it keeps the edits reduced to only the semantic changes (inheritance).
Commit migrated from https://github.com/dotnet/corefx/commit/
95d012c8bb53bcbc0ba2b024342c114b9105b26b
Next Turn [Mon, 26 Aug 2019 17:12:06 +0000 (01:12 +0800)]
Add tests for Encoding virtual methods (dotnet/corefx#40528)
* Add tests for Encoding virtual methods
* Update CustomEncoding
Commit migrated from https://github.com/dotnet/corefx/commit/
04b70f289b2840926fe84f7512f96650de8c780b
Tomas Weinfurt [Mon, 26 Aug 2019 16:33:44 +0000 (09:33 -0700)]
set _requestQueueBoundHandle to null after disposing (dotnet/corefx#40466)
* set _requestQueueBoundHandle to null after disposing
* remove extra spaces
* feedback from review
Commit migrated from https://github.com/dotnet/corefx/commit/
40949c48e1a24a735452248294c983609c77a26c
Stephen Toub [Sat, 24 Aug 2019 02:24:14 +0000 (22:24 -0400)]
Contribute to IDE0055 (fix formatting)
Commit migrated from https://github.com/dotnet/corefx/commit/
b49a8a9be1d53cd9e50cb68fd8540be25c65d433
Stephen Toub [Thu, 22 Aug 2019 17:10:47 +0000 (13:10 -0400)]
Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.
Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.
Commit migrated from https://github.com/dotnet/corefx/commit/
93285e4511a9656a30b92b8b6a9088608aac40e0
Stephen Toub [Thu, 22 Aug 2019 15:47:00 +0000 (11:47 -0400)]
Fix StyleCop warning SA1001 (spaces around commas)
Commit migrated from https://github.com/dotnet/corefx/commit/
37f351d310f07560274c63862ceaed8afd54a46f
Eric StJohn [Fri, 23 Aug 2019 22:07:20 +0000 (15:07 -0700)]
Fix typo in netstandard.depproj (dotnet/corefx#40547)
Commit migrated from https://github.com/dotnet/corefx/commit/
7b441c984058fe69acdace0b6386ebd7db18b1c6
Anirudh Agnihotry [Fri, 23 Aug 2019 21:09:30 +0000 (14:09 -0700)]
Correcting baseline numbers here as 5.0 should have higher numbers then 3.1 (dotnet/corefx#40530)
* correcting baseline numbers here.
* removing runtime, private and meta packages
* updating the visual basic core package number
Commit migrated from https://github.com/dotnet/corefx/commit/
66bbf33e750fd9284edb56c52577536f6b91c139
Viktor Hofer [Fri, 23 Aug 2019 20:53:42 +0000 (22:53 +0200)]
Remove explicit parameter and use arcade default (dotnet/corefx#40542)
for source link validation in the yml.
Commit migrated from https://github.com/dotnet/corefx/commit/
76b0203a61cdaea49360604b616eb1139c83efdb
Ricardo Arenas [Fri, 23 Aug 2019 20:09:35 +0000 (13:09 -0700)]
fix syntax for the publishUsingPipelines variable (dotnet/corefx#40545)
Commit migrated from https://github.com/dotnet/corefx/commit/
20cce62d9853d9e3bf5d110a778cd1fd32772e62
Jeremy Koritzinsky [Fri, 23 Aug 2019 17:11:01 +0000 (10:11 -0700)]
Add AssemblyAttributesGoHere* and SuppressMergeCheckAttribute to S.R.CS.VC with typeforwards from mscorlib (dotnet/corefx#40470)
* Add AssemblyAttributesGoHere* and SuppressMergeCheckAttribute to System.Runtime.CompilerServices.VisualC as internal types with typeforwards from mscorlib.
* PR Feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/
7d94c79892c135d836ecd71e1d969031dba6c2a0
Steve Harter [Fri, 23 Aug 2019 17:06:29 +0000 (12:06 -0500)]
Add additional extension data tests (dotnet/corefx#40488)
Commit migrated from https://github.com/dotnet/corefx/commit/
5f0a73134598165820c037c0c7ed2c3fba92a038
Jeremy Barton [Thu, 22 Aug 2019 22:23:41 +0000 (15:23 -0700)]
Fix UAF when removing trusted certs on OSX
CheckTrustSettings called CFRelease on cert, which downref'd it to zero
before IsCertInKeychain ran.
Now CheckTrustSettings leaves cert alive, and it's the caller's responsibility to CFRelease.
Commit migrated from https://github.com/dotnet/corefx/commit/
9be99cb634ffe1b8dc60e4b3d8c01026347a0283
Eirik Tsarpalis [Thu, 22 Aug 2019 20:55:04 +0000 (21:55 +0100)]
Httpstress: Add checksum validation & support plaintext http (dotnet/corefx#40360)
Httpstress: Add checksum validation & support plaintext http
Commit migrated from https://github.com/dotnet/corefx/commit/
a25beeee0af0c849eef58c45579733efa0d55f8d
Eirik Tsarpalis [Thu, 22 Aug 2019 20:49:07 +0000 (21:49 +0100)]
HTTP2: fix header corruption issue (dotnet/corefx#40487)
* HTTP2: fix header corruption issue
Fixes a bug in HPackEncoder which results in header
data corruption in cases where the write buffer has
not been zeroed out. Adds HPack roundtrip tests.
Fixes dotnet/corefx#40459.
Commit migrated from https://github.com/dotnet/corefx/commit/
6f9796080563c9c40359e641e3287fabe42b580c
Kristian Hellang [Thu, 22 Aug 2019 20:06:39 +0000 (22:06 +0200)]
Move IsReadOnly check inside if-block to avoid cascading if-else (dotnet/corefx#40446)
Commit migrated from https://github.com/dotnet/corefx/commit/
988783b4568682bf306875f28ae76e90e7da92a5
Stephen Toub [Thu, 22 Aug 2019 20:05:13 +0000 (16:05 -0400)]
Fix unnecessary reliance on ValueTask being backed by a Task (dotnet/corefx#40511)
* Fix unnecessary reliance on ValueTask being backed by a Task
Arbitrary ValueTasks musn't be consumed twice. Some code in WebSockets we doing so explicitly with the knowledge that the ValueTask it was consuming was actually safe in this pattern, but there's no need for that; with a minor restructuring, that can easily be avoided.
* Address PR feedback
Co-Authored-By: Gert Driesen <gert.driesen@telenet.be>
Commit migrated from https://github.com/dotnet/corefx/commit/
cc4ceae30f14b69b625c5275315bbf873be84c01
Blake Hensley [Thu, 22 Aug 2019 20:05:00 +0000 (13:05 -0700)]
Fix mail message encoding for transport when delivery method is pickup (dotnet/corefx#40492)
* Fix SmtpClient encoding message for transport when delivery method is pickup
* Reduce tested range of values to more closely bracket where error occurs
* Modify unit test to ensure line folds and validate result
Commit migrated from https://github.com/dotnet/corefx/commit/
0de845b6baac154b27ff845774c467018b94c047
Layomi Akinrinade [Thu, 22 Aug 2019 19:54:15 +0000 (15:54 -0400)]
Add regression test for https://github.com/dotnet/corefx/issues/39770 (dotnet/corefx#40510)
Commit migrated from https://github.com/dotnet/corefx/commit/
0b0c64c4302dfb1bc2a34ca2c1b5fbf9c5f609f6
Viktor Hofer [Thu, 22 Aug 2019 19:01:02 +0000 (21:01 +0200)]
Re-enable source link validation (dotnet/corefx#40507)
dotnet/corefx@
fa168dd690798a683ef0d1e65d60ce5d6918d987 in arcade should have a fix to prevent OOM exceptions.
Commit migrated from https://github.com/dotnet/corefx/commit/
4dae0831fccad7b81fc8c4ef187674edb052a1b3
Stephen Toub [Thu, 22 Aug 2019 18:17:28 +0000 (14:17 -0400)]
Fix AsyncValueTaskMethodBuilder tests (dotnet/corefx#40505)
A few tests are intended to validate internal implementation details, and those are commented. But the rest should be asserting implementation specifics. This fixes those, and augments some validation a bit as well.
Commit migrated from https://github.com/dotnet/corefx/commit/
ba9f27788bd99a29e5d832531f0ee86d8eae4959
Tom Deseyn [Thu, 22 Aug 2019 15:47:32 +0000 (17:47 +0200)]
Console tests: remove tests that expect to observe ANSI sequences (dotnet/corefx#40495)
These tests expect ANSI escape sequences to be written to the Console.SetOut stream,
which doesn't match with the implementation (since https://github.com/dotnet/corefx/commit/dotnet/corefx@
98552707c585bc0f0c138fdeed991c28f00a0ac5).
Commit migrated from https://github.com/dotnet/corefx/commit/
49a351478132e1c537f0cf3a02b77bbd232238f4
madmir [Thu, 22 Aug 2019 14:17:26 +0000 (16:17 +0200)]
Re-enable xunit warning 2017 (dotnet/corefx#40467)
* Re-enable xunit warning 2017
Use specialized assertions for checking for elements in collections.
* Revert Re-enable xunit warning 2017, revert some test changes
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
2fc48e13e87a4e68576d7df7af420ac2874e929e
CodeBlanch [Wed, 21 Aug 2019 22:09:46 +0000 (15:09 -0700)]
Ignore extension property if null. (dotnet/corefx#40431)
Commit migrated from https://github.com/dotnet/corefx/commit/
41cd99d051102be4ed83f4f9105ae9e73aa48b7c
Viktor Hofer [Wed, 21 Aug 2019 18:19:14 +0000 (20:19 +0200)]
Fix official builds because of SDL authentication (dotnet/corefx#40483)
* Fix official builds because of SDL authentication
Commit migrated from https://github.com/dotnet/corefx/commit/
a1578465f68f6793e7498152dc2d0d2f4eed3a4e
Steve Harter [Tue, 20 Aug 2019 21:34:20 +0000 (16:34 -0500)]
Fix namespace typo in test (dotnet/corefx#40460)
Commit migrated from https://github.com/dotnet/corefx/commit/
6257672b2172bf993568cf57ff5d2397bf1dcc7d
Erhan Atesoglu [Tue, 20 Aug 2019 20:29:34 +0000 (23:29 +0300)]
Fixed filename case issue (dotnet/corefx#40457)
Commit migrated from https://github.com/dotnet/corefx/commit/
c71d095e3e57e0ad2a75d8d97b93cdceb4f7f720
Günther Foidl [Tue, 20 Aug 2019 20:16:10 +0000 (22:16 +0200)]
FromBase64Transform.InputBlockSize set to 4 instead of 1
Commit migrated from https://github.com/dotnet/corefx/commit/
b456415bca6317b1ad6f98c6475ca59a20c57101
Ahson Khan [Tue, 20 Aug 2019 20:06:56 +0000 (13:06 -0700)]
Update Debug.Assert to more clearly show the condition (brace for objects, bracket for array).
Commit migrated from https://github.com/dotnet/corefx/commit/
30e06a4f4359f9a368e8fbab013259f46c866df4
Stephen Toub [Tue, 20 Aug 2019 14:56:17 +0000 (10:56 -0400)]
Avoid WeakReference race with GC in LdapSessionOptions (dotnet/corefx#40340)
The GC could run between the check of IsAlive and the access to Target. Better to just access Target and use the result if it's non-null.
Commit migrated from https://github.com/dotnet/corefx/commit/
2fac89f63c644ab81d936d62c91e6003302e718d
Stephen Toub [Tue, 20 Aug 2019 14:54:53 +0000 (10:54 -0400)]
Remove dead code in CacheMemoryMonitor.SetLimit (dotnet/corefx#40336)
The code was initializing _memoryLimit to 0. That then makes the second branch of the cascading if/else if/else if dead and the third branch into a pure else. As a result the whole structure can be brought down to a simple ternary.
Commit migrated from https://github.com/dotnet/corefx/commit/
103fc3a785dc8d927357cb3614468fd31ef98864
Adeel Mujahid [Tue, 20 Aug 2019 14:48:21 +0000 (17:48 +0300)]
Use UTC date in Json{Object,String}Tests which use MinValue
Commit migrated from https://github.com/dotnet/corefx/commit/
4f7dc2e9d56035d514caa92b9a61d5c03f28c3d8
Ahson Khan [Tue, 20 Aug 2019 11:47:41 +0000 (04:47 -0700)]
Fix reading past comments after an end object or end array token within Utf8JsonReader (dotnet/corefx#40436)
* Fix reading past comments after an end object or end array token.
* Add more test cases and update unreachable code paths with
Debug.Asserts.
Commit migrated from https://github.com/dotnet/corefx/commit/
247793c64816a887c4ff47a92acdd9b527b7873b
Ahson Khan [Tue, 20 Aug 2019 11:13:22 +0000 (04:13 -0700)]
Fix BitArray.CopyTo to byte[] regression - update offset for extra bits. (dotnet/corefx#40441)
Commit migrated from https://github.com/dotnet/corefx/commit/
2547b52f31131f10b3cefc530242df35ce9d0e70
Kristian Hellang [Tue, 20 Aug 2019 09:37:34 +0000 (11:37 +0200)]
Fix failing System.Text.Json test (dotnet/corefx#40439)
Commit migrated from https://github.com/dotnet/corefx/commit/
cf5c1b0a7c3cf0087ae72fd0e1995a274cfefe27
Kristian Hellang [Tue, 20 Aug 2019 05:50:34 +0000 (07:50 +0200)]
System.Text.Json - Don't add to readonly collections - Take 2 (dotnet/corefx#40366)
* Don't add to collection when IsReadOnly is true
* Throw NotSupportedException instead of JsonException
* Add test for readonly collections
* Revert back to InvalidCastException
Commit migrated from https://github.com/dotnet/corefx/commit/
f66beeec1ab37a8ea8647caae8bb2ae901f01012
Viktor Hofer [Tue, 20 Aug 2019 04:59:26 +0000 (06:59 +0200)]
Fix Outerloop runs
Commit migrated from https://github.com/dotnet/corefx/commit/
97abb7eb388206f0f976440bbde8f652e9cdd5e1
Layomi Akinrinade [Tue, 20 Aug 2019 04:35:21 +0000 (00:35 -0400)]
Use named argument syntax for null values in json serialization methods (dotnet/corefx#40435)
Commit migrated from https://github.com/dotnet/corefx/commit/
2b2dd5120029081af767e0eea5e813fd68bded11
Ahson Khan [Tue, 20 Aug 2019 04:16:36 +0000 (21:16 -0700)]
Make sure byte position for invalid JSON is consistent and the exception message is accurate (dotnet/corefx#40349)
* Add tests for reading numbers when data is within a multi-segment
ReadOnlySequence.
* Test rename and add debug.assert.
* Test clean up - remove unnecessary/expensive Debug.Assert.
* Test and code cleanup.
* Address feedback - add stronger test condition for token length.
* Revert state on incomplete read and on error. Make sure exception
message is accurate.
* Fix byte position in line for invalid JSON and update tests.
* Address feedback - pass by in and move private struct to end.
* Fix string consumption and add various tests.
* Fix off-by-one error when calculating position.
* Test clean up - make sure multi-segment tests are in the right file.
* Update string parsing - do not increment line number for escaped newline
chars within quoted strings.
* Remove unnecessary custom state struct for string and re-use the same
one for both string and numbers.
* Update tests based on PR feedback.
* Create helper to get start sequence position from roll back state.
Commit migrated from https://github.com/dotnet/corefx/commit/
a690f1658cdc4d92936bd709e644074b2e2e288e
madmir [Tue, 20 Aug 2019 00:59:07 +0000 (02:59 +0200)]
Re-enable xunit warning 1019 (dotnet/corefx#40415)
Make MemberData reference IEnumerable<object[]>
Commit migrated from https://github.com/dotnet/corefx/commit/
3c09762fa14249c65e5bc676a5d812c2654c8941
Layomi Akinrinade [Tue, 20 Aug 2019 00:06:47 +0000 (20:06 -0400)]
Honor converters for implementing types (dotnet/corefx#40411)
* Honor converters for implementing types
* Cache implementing-type converter if one is detected
* Address feedback: name parameters and add IEnumerable wrapper test
Commit migrated from https://github.com/dotnet/corefx/commit/
ee880076f3bcacde1a32e88ea4ebd701a609e52d
Layomi Akinrinade [Mon, 19 Aug 2019 22:42:49 +0000 (18:42 -0400)]
Use new instances of JsonSerializerOptions in property visibility tests to prevent re-using cached metadata (dotnet/corefx#40414)
Commit migrated from https://github.com/dotnet/corefx/commit/
21ce6673922a93d34117b6c757f394600b7f7dbb
Jeremy Koritzinsky [Mon, 19 Aug 2019 18:15:08 +0000 (11:15 -0700)]
Add DecoratedNameAttribute (dotnet/corefx#40125)
Commit migrated from https://github.com/dotnet/corefx/commit/
86db0ef4acc409ab29cd07908aec21c2dc237ea0
Layomi Akinrinade [Mon, 19 Aug 2019 13:42:54 +0000 (09:42 -0400)]
Honor JsonIgnore attribute when applied to unsupported collections (dotnet/corefx#40401)
* Honor JsonIgnore attribute when applied to unsupported collections
* Address feedback: add more unsupported collections
Commit migrated from https://github.com/dotnet/corefx/commit/
6739eab2f4ee9a895575289893edf63b6c234d43
Ahson Khan [Mon, 19 Aug 2019 11:15:46 +0000 (04:15 -0700)]
Avoid using double/floats within tests that don't roundtrip on netfx (dotnet/corefx#40408)
(for G17).
Commit migrated from https://github.com/dotnet/corefx/commit/
b2ea249aa67d719b35c6a1c95befbf2b819bab17
Mandar Sahasrabuddhe [Mon, 19 Aug 2019 04:04:53 +0000 (09:34 +0530)]
Corefx dotnet/corefx#40133 Use TryFormatDouble TryFormatFloat (dotnet/corefx#40197)
* Corefx dotnet/corefx#40133 Use TryFormatDouble TryFormatFloat
* add test cases
* Changes as per review comments
* remove extra empty line
Commit migrated from https://github.com/dotnet/corefx/commit/
3d72b56b8e7d1e4e44262be6c45c2aac580bbbc4
Steve Harter [Mon, 19 Aug 2019 04:01:32 +0000 (23:01 -0500)]
Change 'type' to 'inputType' on serialize methods (dotnet/corefx#40372)
Commit migrated from https://github.com/dotnet/corefx/commit/
9217d338671fe78d2bd31138a610bb9ad5a12608
Stephen Toub [Sat, 17 Aug 2019 23:49:42 +0000 (19:49 -0400)]
Use Count in Enumerable.Any if available (dotnet/corefx#40377)
* Use Count in Enumerable.Any if available
We've been hesitant to make this change in the past, as it adds several interface checks. However, wide-spread "wisdom" is that `Any()` is as fast or faster than `Count() > 0`, and there are even FxCop rules/analyzers that warn about using the latter instead of the former, but in its current form that can frequently be incorrect: if the source does implement `ICollection<T>`, generally its `Count` is O(1) and allocation-free, whereas `Any()` will almost always end up allocating an enumerator. On balance, it seems better to just have `Any()` map closely to `Count()` so that their performance can be reasoned about in parallel.
* Add test coverage for Enumerable.Any
Commit migrated from https://github.com/dotnet/corefx/commit/
9021bc1cbc8c1189d2eb8de906e8891878430e6f
Viktor Hofer [Sat, 17 Aug 2019 01:41:57 +0000 (03:41 +0200)]
Disable AssociatePersistedKey_CAPIviaCNG_RSA on arm64 (dotnet/corefx#40375)
Commit migrated from https://github.com/dotnet/corefx/commit/
9ea74a6d3ec09fef63975338105abdca6fac8e1c
Stephen Toub [Fri, 16 Aug 2019 16:46:16 +0000 (12:46 -0400)]
Remove unnecessary field in PrinterSettings (dotnet/corefx#40339)
I'm not sure why it has its own ArrayEnumerator, but as long as it does, it doesn't need _startIndex.
Commit migrated from https://github.com/dotnet/corefx/commit/
bfe2c58a4536db9a257940277c5d94bf9e26929a
buyaa-n [Fri, 16 Aug 2019 15:50:56 +0000 (08:50 -0700)]
Disabling test failing in Mac OSX 10.15 (dotnet/corefx#40332)
* Disabling test failing in Mac OSX 10.15
* Using active issue annotation
* Checking OS version instead of disabling test for any Mac
* Formatting update
Commit migrated from https://github.com/dotnet/corefx/commit/
df3837cbced3fdcaab22464c18f0ce20b4aadfc7
Viktor Hofer [Fri, 16 Aug 2019 15:48:40 +0000 (17:48 +0200)]
Fix outerloop cron job (dotnet/corefx#40317)
Commit migrated from https://github.com/dotnet/corefx/commit/
001f42b944e3a05a42f9f8cd7d14d338a06e6328
Stephen Toub [Fri, 16 Aug 2019 15:25:21 +0000 (11:25 -0400)]
Remove unnecessary null check from ConstraintCollection (dotnet/corefx#40343)
`_table` will never be null. The `ConstraintCollection` is only constructed in one place, where it's passed `this` by `DataTable`. It's used in many other places without a guard check, as well (and later in this method, unguarded).
Commit migrated from https://github.com/dotnet/corefx/commit/
f4344b0d3b45fc7c8f41e5c909ddcb2752bea0fa
Stephen Toub [Fri, 16 Aug 2019 15:24:54 +0000 (11:24 -0400)]
Fix IDE0066 across corefx (dotnet/corefx#40288)
* Fix IDE0066 across corefx
"Fix all", but then manual tweaking to accommodate places the rule doesn't work quite right.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
f71a5a1d88214a9e2c26ff2ff8bcfb1017aa6713
Edison Henrique Andreassy [Fri, 16 Aug 2019 05:09:40 +0000 (02:09 -0300)]
Improve code coverage for VB Conversion module (dotnet/corefx#39937)
Commit migrated from https://github.com/dotnet/corefx/commit/
4d2b68c2cda66c861aa918fd91e9bf7d664ea05f
Ahson Khan [Fri, 16 Aug 2019 04:12:23 +0000 (21:12 -0700)]
Fix BytesConsumed when reading JSON numbers within a multi-segment ReadOnlySequence via Utf8JsonReader (dotnet/corefx#40303)
* Add tests for reading numbers when data is within a multi-segment
ReadOnlySequence.
* Test rename and add debug.assert.
* Test clean up - remove unnecessary/expensive Debug.Assert.
* Test and code cleanup.
* Address feedback - add stronger test condition for token length.
Commit migrated from https://github.com/dotnet/corefx/commit/
1b0f28942ccafca8a56f960536e125301e7b9306
Stephen Toub [Fri, 16 Aug 2019 00:35:39 +0000 (20:35 -0400)]
Minor cleanup tweaks in Regex (dotnet/corefx#40338)
* Remove unused local in RegexRunner.TextposDescription
* Remove redundant checks in RegexCharClass.AddRange
Commit migrated from https://github.com/dotnet/corefx/commit/
04bd3fa5c2c7d379c22b805ad840bc28423d5242
Stephen Toub [Thu, 15 Aug 2019 23:02:51 +0000 (19:02 -0400)]
Remove duplicate _wrapped.WriteBase64 call in QueryOutputWriterV1 (dotnet/corefx#40345)
The same expression is used for both the if and the else branches. But the if branch does make a mutating method call, which we keep.
Commit migrated from https://github.com/dotnet/corefx/commit/
6aaba8d6f07c8f2e4db0a918dbdbad6d95b26eae
Anirudh Agnihotry [Thu, 15 Aug 2019 20:41:36 +0000 (13:41 -0700)]
adding ci to release 3.0 branch (dotnet/corefx#40359)
Commit migrated from https://github.com/dotnet/corefx/commit/
c5cb132f5ad2b938e67866cf510d3f3bc58e32c3
Stephen Toub [Thu, 15 Aug 2019 18:31:49 +0000 (14:31 -0400)]
Avoid creating/populating unneeded certificate collection in SecureChannel.AcquireClientCredentials (dotnet/corefx#40354)
Commit migrated from https://github.com/dotnet/corefx/commit/
f34e088ff8400ff39ceff5a68b3b1a90dbe8d0ab
buyaa-n [Thu, 15 Aug 2019 18:31:04 +0000 (11:31 -0700)]
Tests for JsonSerializerOptions.GetConverter() and converter methods (dotnet/corefx#39750)
* Tests for JsonSerializerOptions.GetConverter
Commit migrated from https://github.com/dotnet/corefx/commit/
e11af6abaaec093cd77cb55738b99b466f70148e
Steve Harter [Thu, 15 Aug 2019 16:03:56 +0000 (11:03 -0500)]
Support custom converters that treat non-null input as null (dotnet/corefx#40287)
Commit migrated from https://github.com/dotnet/corefx/commit/
ba54c4034a0e87ac6bdf3d13b55b767f5c321df2
Steve Harter [Thu, 15 Aug 2019 16:01:33 +0000 (11:01 -0500)]
Prevent threading issues with warm-up of property caching (dotnet/corefx#40261)
Commit migrated from https://github.com/dotnet/corefx/commit/
b35cfc014b17cca8ee20c24ee250c6925d73855f
Igor Šušić [Thu, 15 Aug 2019 15:50:16 +0000 (17:50 +0200)]
Renaming Microsoft.Framework.WebEncoders namespace (dotnet/corefx#40238)
* Renaming the namespace Microsoft.Framework.WebEncoders to System.Text.Encodings.Web.Tests
- Namespace Microsoft.Framework.WebEncoders renamed to System.Text.Encodings.Web.Tests
* Changed aliases naming from camelCase to PascalCase
* Deleted unnecessary using directives and reverted EncoderExtensionsTests
Deleted unnecessary using directives. Reverted changes made in EncoderCommonTests.cs to commit dotnet/corefx@
db1dd29edac07716ac27b8916d5e12f9a85b4978 and changed using directive for test namespace to right one.
Commit migrated from https://github.com/dotnet/corefx/commit/
1a8fab5315d2de425d530c6fb7d801ade653bc41
Steven Kirbach [Thu, 15 Aug 2019 15:25:45 +0000 (08:25 -0700)]
fixing ZipPackagePart.GetStreamCore crashes with NotSupportedException (dotnet/corefx#40319)
* fixing ZipPackagePart.GetStreamCore crashes with NotSupportedException
ZipArchiveEntry only ever supports opening once when the backing archive is in Create mode, and the backing stream is non-seekable, so we shouldn't call SetLength in that case. You could still open an archive in Update mode then call part.GetStream(FileMode.Create), in which case we'll want this call to SetLength, so we only avoid this call when the backing Archive is in Create mode.
* updating test to explicitly test the Update path for ZipPackage
* skip UAP since we don't have access to the file system to create the .zip
* undo accidental change to existing test
* removing unnecessary variable
Commit migrated from https://github.com/dotnet/corefx/commit/
8ac53e0c022b7881f659e0838a25e91f2ec5c8c0
Ben Adams [Thu, 15 Aug 2019 14:54:57 +0000 (15:54 +0100)]
Use sealed securityContext in SecureChannel (dotnet/corefx#40265)
* Use sealed securityContext in SecureChannel
* Less asm
* Feedback
* Remove ternary
Commit migrated from https://github.com/dotnet/corefx/commit/
6e53bf857a5cbfa1a6b26be3173e00b7e032e819
Stephen Toub [Thu, 15 Aug 2019 14:36:01 +0000 (10:36 -0400)]
Remove duplicate code in WMIGenerator.ConvertToNumericValueAndAddToArray (dotnet/corefx#40346)
Commit migrated from https://github.com/dotnet/corefx/commit/
203b1fda97a7421b24a0a41ef9459e0fc31efe3d
buyaa-n [Thu, 15 Aug 2019 13:24:02 +0000 (06:24 -0700)]
Apply feedback to pal_x509chain.c fix from release/3.0
Commit migrated from https://github.com/dotnet/corefx/commit/
cc1f32affb828e1a34a4c91d8e7ba1474fe196b3
Stephen Toub [Thu, 15 Aug 2019 12:50:12 +0000 (08:50 -0400)]
Fix a few missing $s for string interpolation in tracing (dotnet/corefx#40322)
Commit migrated from https://github.com/dotnet/corefx/commit/
d116b2d4ee4041970943d6fffdf8a97446f8b6ff
Stephen Toub [Thu, 15 Aug 2019 12:17:46 +0000 (08:17 -0400)]
Fix non-ASCII characters across corefx (dotnet/corefx#40318)
* Fix several non-visible characters in test files
* Replace Unicode surrogate pairs with escaped hex values
* Fix non-ASCII characters in most C# files
Commit migrated from https://github.com/dotnet/corefx/commit/
027eb8e19c3498cc2c656931c3b879f5ddb63b0d