Commit Graph
444 Commits
Author SHA1 Message Date
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
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
Lakshmi Priya Sekar fdf4dcfdac Add pal test to verify native dns apis with external host.
Commit migrated from https://github.com/dotnet/corefx/commit/979086062fa2db52f16c8f749f2101916cbbbb78
2017-03-08 15:46:03 -08:00
Lakshmi Priya Sekar 736ebc1780 Account for hostnotfound error from getaddrinfo.
Commit migrated from https://github.com/dotnet/corefx/commit/d06134f84bd45d2e503b8e0cd4e4ffb8fa04770a
2017-03-08 11:30:29 -08:00
Stephen Toub 8d97ffa2d8 Fix Dns_GetHostEntryAsync_NoneIPAddress_Fail test on Unix
The APIs appear to be working fine; it's just that on Linux we're throwing an internal exception derived from SocketException that contains more details, and the test was expecting exactly a SocketException.  Fixed the test. On macOS, the OS successfully resolves IPAddress.None to broadcasthost, producing a valid GetHostEntry result, so I've left the test as platform-specific to not run on macOS, and added one for macOS.


Commit migrated from https://github.com/dotnet/corefx/commit/1765888965a8ed5ff0fa6bdf4807be6e46d800d0
2017-03-08 11:30:07 -05:00
Lakshmi Priya Sekar 781a006568 Merge pull request dotnet/corefx#16549 from Priya91/nettest
Update test issues to match current issue database.

Commit migrated from https://github.com/dotnet/corefx/commit/107efe7f5c980572617bf4012b52877c82831681
2017-03-01 17:08:28 -08:00
Lakshmi Priya Sekar 509a7956c8 Handle hostnotfound on Unix getnameinfo.
Commit migrated from https://github.com/dotnet/corefx/commit/92e50dcf8b4ef4cddab2409d43c61e37cc543535
2017-03-01 16:01:42 -08:00
Jan Kotas 7829b42fd6 Convert some uses of Marshal.SizeOf to sizeof (dotnet/corefx#16556)
sizeof has many times better performance characteristics

Commit migrated from https://github.com/dotnet/corefx/commit/52bab6669b5cdf90161fc5d1b71c3d9a0f3854eb
2017-03-01 13:03:22 -08:00
Lakshmi Priya Sekar acf1e5d259 Update test issues to match current issue database.
Commit migrated from https://github.com/dotnet/corefx/commit/8071a99c5a38ed5f0e3aca6ba41a86688e9141b7
2017-02-28 16:09:49 -08:00
Wes Haggard bef5635826 Set EnableWinRT property in configuration system. (dotnet/corefx#16423)
EnableWinRT is set based on netcore50/uap target frameworks.

Removed mscorlib.WinRt-Facade project which is no longer needed.

Commit migrated from https://github.com/dotnet/corefx/commit/db6e8c950c3c7c35034cf8fd6346cdf0c198f238
2017-02-23 16:37:58 -08:00
Dan Moseley 44ac2dd747 Remove dead string resources (dotnet/corefx#16284)
Commit migrated from https://github.com/dotnet/corefx/commit/6b4423f47d5048b4c1437aaefe87859b258c89b7
2017-02-18 06:01:59 -08:00
Wes Haggard eb1f0e0530 Remove all .builds files under pkg/ref/src/tests library folders
Commit migrated from https://github.com/dotnet/corefx/commit/b60cbe5a2edb5ef3b88a7738507822d13d125d62
2017-02-15 16:32:03 -08:00
Tarek Mahmoud Sayed addda8630e Enable tests to compile with netstandard (dotnet/corefx#15956)
* Enable tests to compile with netstandard

Most of the tests have netstandard configurations and it doesn't compile. the changes here is to fix the configurations and the tests to compile.
This is important step to get netfx tests compile too as we are in most of the time netfx fallback to netstandard configuration

The changes include some fixes to compile teh sources too.

* Fix System.Collections.Immutable

* update src configuration

* remove netstandard17 defines

* Split netcoreapp code to its own files

* Remove 17 from the test class name


Commit migrated from https://github.com/dotnet/corefx/commit/15b4f51c2f3cb924840e5407bb8d5fe03bb282ea
2017-02-08 15:32:53 -08:00
Jose Perez Rodriguez d9c497be12 Prepare uap package (dotnet/corefx#15866)
Prepare uap package

Commit migrated from https://github.com/dotnet/corefx/commit/afaaf450d1869992dcf4f51c627f16145cf9c974
2017-02-08 10:39:37 -08:00
Tarek Mahmoud Sayed 77cad86b1e Remove versioned configuration from test projects (dotnet/corefx#15879)
The changes onclude some other minor clean up in the test project files

Commit migrated from https://github.com/dotnet/corefx/commit/62212cca900081173fce70991c3a0b30393994a3
2017-02-06 13:52:11 -08:00
Justin Van Patten 90e7825333 Avoid unnecessary branches when fixing non-null/empty arrays (dotnet/corefx#15597)
* Avoid unnecessary branches when fixing non-null/empty arrays

* Address PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/bfac45af5dddcbd70b6935fcf92b4b8755f3cd1c
2017-02-04 16:29:55 -05:00
Wes Haggard f2fd0ea78a Update Solution files to use windows path slashes.
Commit migrated from https://github.com/dotnet/corefx/commit/f8ba7c412d06d8e4d4e6278502d4dd771a0f10bb
2017-02-03 16:31:48 -08:00
Eric St. John c2dc83e56a Sync BuildConfiguration with project PropertyGroups
Commit migrated from https://github.com/dotnet/corefx/commit/758a0e16e8c5af8741d14043f4bef1d15a79a377
2017-02-03 08:34:24 -08:00
Tarek Mahmoud Sayed 7395af32ad Enable compiling the test projects against the configuration (dotnet/corefx#15743)
* Enable compiling the test projects against the configuration

The tests were compiled using the vertical configuration and not the best configuration picked from Configurations.props. this change is fix that and have all test projects configured accordingly.
This change ensuring netcoreapp runs successfully and we'll have another rounds later for other configurations like netfx, UAP...etc.

* Fix openssl test project on Linux distros

* Update the project configurations

* Update VS solution files

* update solution files


Commit migrated from https://github.com/dotnet/corefx/commit/e79912f8b77bc22abfd85e94b74c06e5d99e8381
2017-02-02 17:54:40 -08:00
Wes Haggard c4e17cd362 Update all solution files using solution generation tool
Commit migrated from https://github.com/dotnet/corefx/commit/a822a266821cf79df96cdd77d2a3d44f1510d9a0
2017-02-02 15:44:45 -08:00