Commit Graph
462 Commits
Author SHA1 Message Date
Simon Nattress 0aa965eb67 Re-enable UAP builds (dotnet/corefx#27531)
* Build uapaot System.Numerics.Vectors

With `Vector<T>` now residing in System.Private.CoreLib, directly reference System.Private.Corelib instead of contracts just like netcoreapp does.

Add uapaot flavor since System.Private.CoreLib has a different strong name key on that platform.

* Make EnsureExtendedPrefixOverMaxPath available to UAP

Add the helper method `System.IO.PathInternal.EnsureExtendedPrefixOverMaxPath` to Common\src\System\IO\PathInternal.Windows.cs. It was previously not visible to UAP since  Common\src\CoreLib\System\IO\PathInternal.Windows.cs is not included in UAP compilation.

* Keep SocketsHttpHandler out of UAP builds

SocketsHttpHandler is not supported in uap and is currently leaking into UAP builds since they've been disabled for a few weeks. Adjust the contract so it's not available to UAP, and clean the implementation assembly so SocketsHttpHandler internals don't leak out into HttpClientHandler.Core.cs.

* Fix GetAddrInfoExSupportsOverlapped UAP build break

`System.Net.NameResolutionPal.GetAddrInfoExSupportsOverlapped` uses LoadLibraryExW which is not compatible with UAP (which only supports LoadLibrary of DLLs within a container). Refactor the helper so UAP returns false.

* Revert "Disable UAP legs per dotnet/corefx#26802 (dotnet/corefx#26822)"

This reverts commit dotnet/corefx@120dce456a.

* Revert "Disable UAP configurations in all configurations build"

This reverts commit dotnet/corefx@2202b4fd49.

* Revert "Disable UAP official builds (dotnet/corefx#26871)"

This reverts commit dotnet/corefx@ef79caf14c.

- Baseline the ApiCompat and GenFacades failures in System.Runtime.Extensions and System.Threading.ThreadPool.
- Adjust naming of files to match branch conventions
- Fix up some configuration issues with uap packaging. The CoreFX.Private.TestUtilities packaging needs updated build tools which can map between uwp6.0 and netstandard2.0.
- ifdef out Thread.GetCurrentProcessorId until we get a new System.Private.CoreLib.


Commit migrated from https://github.com/dotnet/corefx/commit/c9cdfba45e62eeac28ef554d8bbdfdd620a0fd15
2018-03-01 17:59:35 -08:00
Geoff Kizer 310db84738 Merge pull request dotnet/corefx#26926 from MarcoRossignoli/issues/26856_GetHostByName
Remove old GetHostByName logic

Commit migrated from https://github.com/dotnet/corefx/commit/643bccc7f2c24a897cc15c42486d4184e1f931eb
2018-02-19 11:10:00 -08:00
Marco Rossignoli 37098edadd Merge branch 'issues/26856_GetHostByName' of https://github.com/MarcoRossignoli/corefx into issues/26856_GetHostByName
Commit migrated from https://github.com/dotnet/corefx/commit/b2770e847169aba29f28496727be69acae12b4f6
2018-02-14 09:44:42 +00:00
Marco Rossignoli ad77904c24 clean unix
Commit migrated from https://github.com/dotnet/corefx/commit/92dbe7de2ced0f130e46f1bc42399837562d5b14
2018-02-14 09:41:59 +00:00
Marco Rossignoli 50103e674c remove ipv6 params
Commit migrated from https://github.com/dotnet/corefx/commit/12400ad4ebba3f062b85b55d84d69c79438a5e42
2018-02-13 15:52:05 +01:00
Marco Rossignoli bb0ff8abf4 remove duplicate code
Commit migrated from https://github.com/dotnet/corefx/commit/bee8ebcfe09631567c991a9200585bdb000c1dbd
2018-02-13 15:38:59 +01:00
Ubuntu 286c5eebd5 clean GetHostByAddr unix
Commit migrated from https://github.com/dotnet/corefx/commit/24b84faac5d3b48fb7bf0438a4a34f7aaca28f94
2018-02-13 14:21:12 +00:00
Marco Rossignoli 8148db7924 clean GetHostByAddr Windows
Commit migrated from https://github.com/dotnet/corefx/commit/0f0713f16a1e3cfb5e39003cde4ff785c685ab18
2018-02-13 12:42:42 +01:00
Stephen Toub f8e6f41b81 Clear initlocals in a bunch of assemblies (dotnet/corefx#26993)
* Clear initlocals in a bunch of assemblies

Sets
```XML
<ILLinkClearInitLocals>true</ILLinkClearInitLocals>
```
for the assemblies:
    - System.IO.FileSystem
    - System.IO.Pipes
    - System.Memory
    - System.Net.Http
    - System.Net.Http.WinHttpHandler
    - System.Net.NameResolution
    - System.Net.NetworkInformation
    - System.Net.Primitives
    - System.Net.Requests
    - System.Net.Security
    - System.Net.Sockets
    - System.Net.WebSockets
    - System.Net.WebSockets.Client
    - System.Net.WebSockets.WebSocketsProtocol
    - System.Private.Uri
    - System.Runtime
    - System.Runtime.Extensions

Eventually we'd ideally set the flag for the whole repo; these are just the ones I audited thus far.  In a few cases I had to make code changes to adapt, where the code was expecting stackallocs to be cleared.  I also looked at a few other projects (System.Collections, System.Runtime.Numerics) where there were more significant dependencies on clearing and I decided to leave those for later.

* Disable ILLinkClearInitLocals running on Unix until it works there


Commit migrated from https://github.com/dotnet/corefx/commit/f0a032e4a1c8a848574a5db3e69e8a6fa0aae91e
2018-02-13 06:30:25 -05:00
Marco Rossignoli 803158bb2b nit
Commit migrated from https://github.com/dotnet/corefx/commit/a7c62d744221e92e478f47181baf7c18cf14736e
2018-02-13 10:42:15 +01:00
Marco Rossignoli 2be1eef574 update DNS.cs
Commit migrated from https://github.com/dotnet/corefx/commit/e6c97f471fa3aa4794b2fc82cb8d3efbd7b7976d
2018-02-13 10:36:35 +01:00
Marco Rossignoli 121d0b3863 resolve conflict on src/System.Net.NameResolution/src/System/Net/DNS.cs
Commit migrated from https://github.com/dotnet/corefx/commit/01dd591141689870ce54dbf7507561260deba815
2018-02-13 09:26:37 +01:00
Jeff Cyr 34218ec971 Modified Dns.GetHostAddressesAsync to be truly async (dotnet/corefx#26850)
* Modified Dns.GetHostAddressesAsync to be truly async

* Applied code review recommendations

* Unix build fix

* Unix build fix dotnet/corefx#2

* Unix build fix dotnet/corefx#3

* NETFX build fix

* Fixed useGetHostByName logic

* Simplified ProcessResult code

* Cleaned up cancel code

* cleanup


Commit migrated from https://github.com/dotnet/corefx/commit/d3ff31e3b9e8c7b1e6003196650bae4a658ef889
2018-02-11 19:18:08 -05:00
Marco Rossignoli 932bf3d743 remove fallback code in InternalGetHostByAddress
Commit migrated from https://github.com/dotnet/corefx/commit/28cc257b8a5bd08f0fee411781e6512eb17ae5fc
2018-02-10 10:22:03 +01:00
Marco Rossignoli 0f26905cc5 fix source file reference
Commit migrated from https://github.com/dotnet/corefx/commit/b8327d3cd7db59e49e757f2e1270198cde1ecf05
2018-02-08 17:07:03 +01:00
MarcoRossignoli d6d040e2be clean unix
Commit migrated from https://github.com/dotnet/corefx/commit/af6ded473e1d2f45427531aa5013884488a72db0
2018-02-08 15:25:13 +01:00
Marco Rossignoli 3395f43456 clean win code
Commit migrated from https://github.com/dotnet/corefx/commit/4bb1dc2994cfb2680f97c45021d2a778b5f8f008
2018-02-08 11:26:43 +01:00
Max Kerr 6b353dd0e6 Re-Enable disabled DNS tests on OSX (dotnet/corefx#26949)
These were disabled a few days ago, but it looks like the issue may have been caused by problematic test infrastructure. One of the offending machines has been re-imaged, and the others have been rebooted.

Re-enabling the tests should allow us to determine if it was an infrastructure issue, or if there is a real problem here.

Fixes: dotnet/corefx#26789

Commit migrated from https://github.com/dotnet/corefx/commit/b60618197972da445ff5e675d425459fc9c0d3ae
2018-02-07 16:55:49 -08:00
Marco Rossignoli e50d86ac28 remove old GetHostByName logic
Commit migrated from https://github.com/dotnet/corefx/commit/f2db559e28078008dd60e009b3148fca5e8c3d0d
2018-02-07 17:57:40 +01:00
Stephen Toub c4f6f30155 Disable failing DNS tests on macOS (dotnet/corefx#26790)
Commit migrated from https://github.com/dotnet/corefx/commit/524f01c982407591051b69e6fb13d9ffbc0e36fa
2018-02-02 10:47:00 -05:00
Stephen Toub 13e1d101a7 Disable failing NameResolutionPalTests (dotnet/corefx#26747)
Commit migrated from https://github.com/dotnet/corefx/commit/0bc7246a14c0dea01926ba371009a3a14c557c0b
2018-02-01 13:52:11 -05:00
Jan Kotas e6c28ba3b1 Cleanup CodeContracts annotations (dotnet/corefx#26324)
Commit migrated from https://github.com/dotnet/corefx/commit/a3e4e241c7b7c33750258082969287b9cf45d757
2018-01-14 14:19:41 -05:00
Ahson Khan 7886be085d Convert uses of the Dangerous APIs to use MemoryMarshal.GetReference (dotnet/corefx#25936)
* Convert uses of the Dangerous APIs to use MemoryMarshal.GetReference

* Fix unresolved merge conflict.

* Add using directive

* Add missing using directives.

* Add references to System.Memory


Commit migrated from https://github.com/dotnet/corefx/commit/40cbd5636851093309b841db4d53af369b7ef1c6
2017-12-21 11:05:06 -08:00
Tim Seaward 0980dfbb66 Removed blocking from DNS tests (dotnet/corefx#25366)
* Removed blocking from DNS tests

* Reacting to review


Commit migrated from https://github.com/dotnet/corefx/commit/83aee560ad5eaeaaeb7ced8f6e192a74e42694d6
2017-11-20 10:28:18 -05:00
Ludovic Henry 2bc22c7dc6 Start switching System.Native from C++ to C (dotnet/corefx#25032)
* Move System.Native/pal_maphardwaretype.cpp to C

* Switch C compiler from C11 to C99

* Move System.Native/pal_errno.cpp to C

* Move System.Native/pal_tcpstate.cpp to C

* Move System.Native/pal_networkstatistics.cpp to C

* Move System.Native/pal_memory.cpp to C

* Move System.Native/pal_io.cpp to C

* Move System.Native/pal_networking.cpp to C

* Define c_static_assert for compiler that don't support static_assert


Commit migrated from https://github.com/dotnet/corefx/commit/6a9f579209491ae9041f208bfe34b89085c0279e
2017-11-16 08:45:26 -08:00
David Shulman 45cce025a2 Remove invalid NameResolution tests (dotnet/corefx#24147)
The Dns_GetHostEntryAsync_* are fundamentially invalid because it's
possible for the broadcast address, 255.255.255.255, to have an DNS
mapping via manually modifying the hosts file.  This was actually
happening on Mac systems as well as an virtual environment running on
top of that (i.e. Windows on Parallels).

Ref:
https://github.com/dotnet/corefx/issues/23992#issuecomment-330250642

Contributes to dotnet/corefx#23992

Commit migrated from https://github.com/dotnet/corefx/commit/e33bee86b4777a2de04bd0dc5b6e9e918bac302a
2017-09-19 12:10:21 -07:00
Lakshmi Priya Sekar 7b6c32e59b Add comment about change.
Commit migrated from https://github.com/dotnet/corefx/commit/43d57385ba00001db19b97e1f9840c15c84a5249
2017-09-14 13:22:40 -07:00
Lakshmi Priya Sekar 9096fde141 Fix Dns tests on OSX.
Commit migrated from https://github.com/dotnet/corefx/commit/02ce63d315590d85aaff63e78165f5651fe2a562
2017-09-14 12:00:34 -07:00
Stephen Toub 9ae4ec8aa7 Fix behavior of Dns.GetHost* with empty string (dotnet/corefx#23794)
On Windows, passing an empty string to gethostbyname/GetAddrInfoW results in the host's information being used; that behavior then bubble's up through (and is documented for) the Dns.GetHost* APIs in .NET.  On Unix, the native functions being used don't provide that same behavior, instead returning an error.

This just special-cases empty string in the Unix implementation.

Commit migrated from https://github.com/dotnet/corefx/commit/e9bd4c87e5032184c51ba03b81ef74328bbdfb1a
2017-09-05 13:04:59 -04:00
Brian Chavez 1135713030 Miscellaneous typo corrections. (dotnet/corefx#23698)
Commit migrated from https://github.com/dotnet/corefx/commit/e3b2c5491ac38efdfec5f017f72223b7d8c10f5d
2017-08-31 00:26:17 -04:00
Stephen Toub 867e90e8ca Avoid byte[] allocations for IPAddress in System.Net.Sockets (dotnet/corefx#23555)
Use the new span-based overloads to avoid byte[] allocations when constructing IPAddresses.

Commit migrated from https://github.com/dotnet/corefx/commit/98caf2d33eea9c6b6a973874968cd40d9ba396d4
2017-08-25 19:33:59 -04:00
Caesar Chen 77c7b4f16c Removing unused UAP code and SmtpClient HostName workaround (dotnet/corefx#21670)
Commit migrated from https://github.com/dotnet/corefx/commit/86d9e8fc0296d19779bc7f70127026a24fc75e4e
2017-07-04 13:46:48 -07:00
Cristian Pop 23a2417388 Tracking ETW UAP test failures against a single issue. Global mutex is not supported in UAP. (dotnet/corefx#21732)
* Removing Global mutex bug ID. Tracking ETW UAP test failures against a single issue.
* Disabling EKU tests for UAP.

Commit migrated from https://github.com/dotnet/corefx/commit/12632fd50d02c1b1934cac13edc8225304ac91a5
2017-06-29 16:22:14 -07:00
Eric St. John af62668426 Update build configurations
Commit migrated from https://github.com/dotnet/corefx/commit/7cfc4fcdbf659581c535f01202e24a6ceb335e31
2017-05-26 08:16:33 -07:00
Eric St. John af1d155bf6 Remove help VS comments
Many CSProjs included the comment
`<!-- Help VS understand available configurations -->`

These aren't handled well by the tooling that rewrites projects and weren't providing much value.

Remove them.


Commit migrated from https://github.com/dotnet/corefx/commit/5ba948d13e3177c2c7075b6b00791e574bfa0860
2017-05-25 11:10:27 -07:00
Caesar Chen 8ea0e18695 add uap target in VS work
Commit migrated from https://github.com/dotnet/corefx/commit/c4c03ed8085f7cc68b4910b80bf3be7a0b93dd18
2017-05-24 13:34:32 -07:00
Caesar Chen 87a2ed619e remove dependency on WinRT API
Commit migrated from https://github.com/dotnet/corefx/commit/03f15b255ba7ac0c814d86188d4718fb827618ca
2017-05-23 16:04:36 -07:00
Eric St. John e02c675179 Increment versions post 2.0
Commit migrated from https://github.com/dotnet/corefx/commit/6c5f87319a4785499008c95b2ff5e7f13a413d22
2017-05-16 14:12:16 -07:00
Atsushi Kanamori abb04679af Fix a bunch of random test failures on ILC (dotnet/corefx#19758)
* Fix a bunch of random test failures on ILC

- PlatformDetection - GetEnvironmentVariable() still
  returns null on ILC - but Environment.GetSpecialFolder()
  is fully functional (and it's a preferred idiom.)

- Other stuff is self-explanatory.

* Fix casing. Add comment.


Commit migrated from https://github.com/dotnet/corefx/commit/32310bbcb0a95be9e34e58eb31ac228e996f3554
2017-05-15 07:17:31 -07:00
Jiayi Li ab9698db27 Disable failed tests for 6 issues. (dotnet/corefx#19464)
Commit migrated from https://github.com/dotnet/corefx/commit/5efe9f60ffe252496ca6cf98cb94e29b7d088b49
2017-05-08 02:43:56 -07:00
Stephen Toub 99157db58e Merge pull request dotnet/corefx#18714 from jkotas/dead-code
Delete a few unnecessary files from Common

Commit migrated from https://github.com/dotnet/corefx/commit/e6a772260bee741570388c18f6920b59edf79b9b
2017-04-21 06:40:09 -04:00
Jan Kotas 4e09993f85 Delete a few unnecessary files from Common
Commit migrated from https://github.com/dotnet/corefx/commit/2cad4e6f9c933701f79fb18cf63d83ab0f094782
2017-04-21 00:31:48 -07:00
Stephen Toub 453267ea29 Fix System.Net.NameResolution tests on desktop
A bunch of the unit tests try to validate that sockets were correctly initialized.  They do so with fakes that intercept the calls.  But on desktop, the real methods were being used, bypassing that interception.  I've fixed it by making the unit tests on desktop compile like core so as to use the fakes.


Commit migrated from https://github.com/dotnet/corefx/commit/03b3d6aa1e9305269d146e5698e4a4b8297611a6
2017-04-20 12:03:49 -04:00
Wes Haggard 4185183e8c Updates how we define which key an assembly uses
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.

This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.

As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).

Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.

The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility


Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6
2017-04-10 12:51:50 -07:00
Steve Harter 5bc3c6f8dd Fix native error handling on Linux during host name resolution (dotnet/corefx#17574)
* Fix seg fault on Linux during host name resolution error cases

Commit migrated from https://github.com/dotnet/corefx/commit/87c006239a1c7daebe541cc60f43c70b88392978
2017-03-29 11:26:19 -05:00
Stephen Toub 55eb9731e1 Expose and use static ExceptionDispatchInfo.Throw (dotnet/corefx#17570)
Commit migrated from https://github.com/dotnet/corefx/commit/a44c93063d24e29971891bfc2cf8b0aa8771eae9
2017-03-27 21:45:34 -07:00
David Shulman f83a441edc Skip NetEventSource logging tests on .NET Framework
The 'NetEventSource' logging only works on .NET Core libraries. So, we
need to skip these tests when running on full .NET Framework.

Fixes dotnet/corefx#14989


Commit migrated from https://github.com/dotnet/corefx/commit/576efc3aa3c15f07a4e7c34f0241923204b69426
2017-03-21 13:08:43 -07:00
Dan Moseley 9d47195e42 Enable Pinvoke checker and baseline violations (dotnet/corefx#16704)
* Fix UWP Pinvoke checker condition

* analyzer baselines

* Remove redundant local define

* Remove redundant CA lines

* Special case Registry

* Fix BlockReflectionAttribute

* Replace NETNATIVE with uap define

* baselines

* Disable Pinvoke scan on specific projects

* Disable BlockReflectionAttribute on ilproj

* Revive 2 baselines

* Disable UWP validation on SQlClient

* Convert some defines to `uwp`

* Fix S.N.Primitives baseline

* Remove dead baselines

* Clean up NET_NATIVE defines

* Remove FEATURE_CORECLR except from shared sources

* Change Threading.Thread defines to just uapaot

* Fix comment

* Fix comment 2

* Change serialization uap defines to uapaot

* Rename EnableWinRT to UWPCompatible

* Fix UAP build for Console

* Fix uap condition in XML csproj

* Fix condition in XmlSerializer project

* Replace netcore50

* Remove dead #if

* Redundant console condition

* Redundant console condition2

* Trim baseline

* Revert Console baseline to pre UAP

* Fix MemoryMappedFiles uap build

* Fix S.Linq.Expressions build for UAP by temporarily disabling it

* Fix S.N.Sockets build for uap

* No plans to put SQLClient in UWP

* Fix RuntimeInformation build

* Fix MemoryMappedFiles build for Unix

* Add UWPCompatible to all netstandard versions

* Add EnablePinvokeAnalyzer to disable Pinvoke checking entirely for some reason

* Remove dead System.Xml.XmlSerializer.Tests.settings.targets

* Fix interop services build

* Remove last uap/uapaot define in Xml tests

* PInvoke check doc

* Fix PInvoke casing

* PInvoke file is case sensitive

* Remove unnecessary references to uapaot from projects that don't have uapaot configs

* Remove unnecessary uapaot from S.R.I.RI

* Replace UWPCompatible for TargetGroup in csproj conditions

* Reverse FileSystem edit as not ready to build for UWP


Commit migrated from https://github.com/dotnet/corefx/commit/b1865ea0847a7a86baefe8378b772ecf0b785681
2017-03-09 21:08:39 -08:00
Stephen Toub a724a5e2af Audit System.Net throws for losing stack traces
There are a bunch of places throughout the System.Net libraries where exceptions are captured and later thrown, using `throw e;`.  This overwrites their stack trace and bucket information, making it harder to diagnose problems when they occur.  Over time we've chipped away at these, so there are many fewer now than there used to be, but some still remain.

I've audited all of the System.Net libs, and fixed all the locations I found where this pattern was being employed, replacing them with usage of ExceptionDispatchInfo to avoid losing the call stack data.  There are still some `throw e`s I left, but those were typically of a form where it was obvious no data would be lost, e.g. the exception was just instantiated a few lines earlier.  There are likely also a few straggling cases, e.g. where `throw SomeFunction()` is used and `SomeFunction()` returns a cached exception instance, but we can address those on a case-by-case basis as we find them.


Commit migrated from https://github.com/dotnet/corefx/commit/c750cfc5357af44f913e122c25f0b32872eb456c
2017-03-09 08:27:02 -05:00
Lakshmi Priya Sekar 3ca8627090 Merge pull request dotnet/corefx#16867 from Priya91/addrinfo
Account for hostnotfound error from getaddrinfo.

Commit migrated from https://github.com/dotnet/corefx/commit/49c7b5ae946fe7562dc9e25697aff9dc4f38ac85
2017-03-08 16:42:47 -08:00