Commit Graph
450 Commits
Author SHA1 Message Date
dotnet-bot d63a7b41df Update CoreFx to beta-24705-01
Commit migrated from https://github.com/dotnet/corefx/commit/c7603507fe200426130f10d6b2cc67dfeda2c83f
2016-11-05 02:22:03 +00:00
dotnet-bot 540789c36c Update CoreClr, CoreFx, External, ProjectNTfs to beta-24704-04, beta-24704-03, beta-24704-00, beta-24704-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/d75d49704cffb9652304a357750d7f3f357be6fc
2016-11-05 00:21:20 +00:00
Jose Perez Rodriguez 2db115c87d Updating corefx versions to beta-24703-01
Commit migrated from https://github.com/dotnet/corefx/commit/39b5977106283eb0017dbc43af7f4d6b195753b1
2016-11-03 10:23:38 -07:00
Eric Mellino b22982fb03 Merge pull request dotnet/corefx#13233 from mellinoe/fedora-24
Add full support build for test runs on Fedora 24

Commit migrated from https://github.com/dotnet/corefx/commit/31cb259750808d9f2c1e4788f4bf8a2ea1ab3695
2016-11-02 12:10:39 -07:00
Stephen Toub 183b074730 Fix HttpVersion conflicts
Added an HttpVersionInternal to be used by the higher-stack libraries that need things beyond HttpVersion.Version10/Version11 and/or that have builds targeting versioning of System.Net.Primitives that doesn't have the newly exposed HttpVersion.  This can be removed once all of those libraries have all of their builds targeting the updated primitives lib.


Commit migrated from https://github.com/dotnet/corefx/commit/119ae03ddc2ce49511f10b02fb39818aab0aa577
2016-11-01 19:42:30 -04:00
Stephen Toub 4ee10f7b6c Update CoreFx, ProjectNTfs to beta-24701-01, beta-24701-00, respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/1b2b88d11c6b0d226481c96b1a88d20bb8cefaf9
2016-11-01 19:42:30 -04:00
Eric Mellino 6a3b8fa4fd Support full test builds on fedora 24
Commit migrated from https://github.com/dotnet/corefx/commit/f3ae1c1cea4709252b48179fd1eed5a18740d8fc
2016-11-01 22:56:10 +00:00
Stephen Toub 66863565c9 Use nameof in more places
We previously made a pass through corefx to use nameof with argument exceptions.  Since then, a lot more code has come into the repo, and not all argument exceptions were converted at the time. We also previously missed a bunch of places where helpers were used to throw the exceptions.  This does another pass through corefx to catch most of the remaining occurrences.


Commit migrated from https://github.com/dotnet/corefx/commit/08609e84ab068d09a6e72b5906bb5282e444ae2e
2016-11-01 09:25:09 -04:00
Stephen Toub 5f0b53cb3c Update CoreFx to beta-24629-01 (master)
Commit migrated from https://github.com/dotnet/corefx/commit/63a1dbe34233c086f7fc6d28b1fefecfefc822ed
2016-10-29 22:41:56 -04:00
Stephen Toub bd966b970a Merge pull request dotnet/corefx#13134 from stephentoub/overhaul_net_logging
Overhaul System.Net library logging

Commit migrated from https://github.com/dotnet/corefx/commit/6b5ef121ebea45b14f489a177e2e3f27fce86781
2016-10-29 14:48:17 -04:00
tijoytom 621d86f057 Merge pull request dotnet/corefx#13140 from tijoytom/master
Moving HttpVersion to System.Net.Primitives.

Commit migrated from https://github.com/dotnet/corefx/commit/2d3a070a7a277a740a12fcd7f315760f6f45059a
2016-10-29 10:36:42 -07:00
Stephen Toub 7b2a531875 Add additional System.Net tracing tests
- Add tests that actually exercise the event sources, making sure that no event source errors are produced and that events are actually generated.
- Fix a few src issues found from these tests.


Commit migrated from https://github.com/dotnet/corefx/commit/2284f735df7ad8c072b7861980d205c4476709b8
2016-10-29 11:53:54 -04:00
Stephen Toub 9c38e533c4 Address PR feedback
- Fix a few copy-and-paste errors
- Rename DumpArray to DumpBuffer
- Prefix every NetEventSource usage with IsEnabled check (except for Fail, which represents a critical programming error)


Commit migrated from https://github.com/dotnet/corefx/commit/3b251eb0632d1a1b70bdeb928c86d45b2bb2b897
2016-10-29 10:01:53 -04:00
Stephen Toub 78652d624e Overhaul System.Net library logging
This PR overhauls how logging is accomplished in the System.Net libraries.

There are a few problems with the existing solution:
1. In the original sources, logging was split across a GlobalLog class and a Logging class.  Global-related tracing went to GlobalLog, and library-specific tracing went to Logging.  When the sources were moved to corefx, this evolved into multiple EventSource-based types, most of which were in Common and were then src-included into each System.Net assembly.  This has a significant problem, though, which is that the name/Guid identity of an EventSource can only exist once in a process, and subsequent EventSource instances with the same identity fail.  This means that whichever assembly ends up logging something first wins, and all other tracing from other System.Net assemblies ends up being lost.
2. The split also may have made sense when all components shared the same GlobalLog, but now that GlobalLog is included as a unique EventSource instance in each assembly, it's no longer global.  This means that we're not only loading multiple EventSources unnecessarily (each has its own costs), but we're also duplicating logging, as some logging is done to one or the other, but some logging is done to both.
3. Due to sharing the Logging class, which evolved into an EventSource-based type, many logging calls had to include which component they came from as an enum value, leading to bloating at the call sites.
4. Additionally, many logging operations included the name of the method in which the calling was being done, which meant both longer call sites as well as stale values as members got renamed over time.
5. Call sites ended up getting fairly long due to lots of string concatenation operations and other manipulations in the logging call.  This also then led to most call sites needing to be guarded behind checks for IsEnabled, leading to lots of code at every call site and obscuring the actual information being traced.
6. An additional requirement that got added with the move to corefx was that certain failure conditions should both Debug.Fail and do tracing, leading to some tracing operations taking upwards of 10 lines of code.

All of these issues are addressed by this PR.

- Each System.Net assembly that needs to log now loads a single NetEventSource type for doing logging, each with its own identity.
- That implementation is split across a common, partial NetEventSource.Common.cs file used by all such assemblies, and then a per-assembly partial NetEventSource.AssemblyName.cs file used by the individual assembly.  The former file contains most of the logging implementation.  The latter files typically contain just the partial class declaration along with the [EventSource] attribute that gives that assembly's NetEventSource its unique identity / name.
- The logging operations in NetEventSource.Common.cs use a variety of relatively-recent language enhancements to improve the logging.  Each operation uses a [CallerMemberName] so that the call sites don't need to specify the caller.  FormattableString is used so that call sites can use string interpolation while still providing the logging implementation the flexibility to format the individual components in a desired fashion (e.g. IntPtrs are formatted as hex, SafeHandles are rendered in a way that includes their name+hashcode+handle, etc.), along with a mechanism that allows individual libraries to add additional formatting rules.  Each operation allows the this reference (or another this-like context object) to be passed in, to simply identify the source of the call (in concert with the caller member name).  A debug-only mechanism is included in the tracing to help find potential perf issues due to misuse of the logger.  Etc.
- A Fail logging operation is included that both traces and does a Debug.Fail.

With these changes, most call sites are greatly simplified.  Some examples:
Before:
```C#
if (GlobalLog.IsEnabled)
{
    GlobalLog.AssertFormat("ContextAwareResult#{0}::ContextCopy|Called on completed result.", LoggingHash.HashString(this));
}
Debug.Fail("ContextAwareResult#" + LoggingHash.HashString(this) + "::ContextCopy |Called on completed result.");
```
After:
```C#
NetEventSource.Fail(this, "Called on completed result.");
```

Before:
```C#
if (NetEventSource.Log.IsEnabled()) NetEventSource.Enter(NetEventSource.ComponentType.Http, this, ".ctor", handler);
```
After:
```C#
NetEventSource.Enter(this, handler);
```

Etc.

In addition to fixing up all of the event sources, I of course also fixed up all usage in order to clean up the call sites.  However, this was a rather mechanical change: I did not remove existing logging (other than duplication) nor did I add new logging.  At some point, we should review the actual logging being done to determine what's missing and what's not needed.  I also did not revise the additional existing events on the sockets and security event sources, but we may want to remove those (or some of those) in favor of just using the shared events.


Commit migrated from https://github.com/dotnet/corefx/commit/92fd5c0814bcc0c03acfa9f3ad857661828b35a6
2016-10-29 10:01:53 -04:00
Tijoy Tom Kalathiparambil fc0c590e7e Moving HttpVersion to System.Net.Primitives.
Contributes to https://github.com/dotnet/corefx/issues/12510
All private copies of HttpVersion from other
projects need to be removed.I am not sure how to
use an unpublished API , the doc talks about adding
direct csproj reference , but not clear if i can check-in
that way.


Commit migrated from https://github.com/dotnet/corefx/commit/614680e53a1712116e3849be96f982dfb034243d
2016-10-28 15:29:20 -07:00
dotnet-bot ad2c08f972 Update CoreFx to beta-24628-03
Commit migrated from https://github.com/dotnet/corefx/commit/e634b174854638f226c81ebd5a2b6d22afca83de
2016-10-28 19:01:25 +00:00
dotnet-bot 519246eb66 Update CoreClr, CoreFx to beta-24628-03, beta-24628-02, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/56c61a5a1158ef9f1c84c87442f39015d9042491
2016-10-28 16:27:01 +00:00
dotnet-bot 5eb2424d89 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24628-02, beta-24628-01, beta-24628-00, beta-24628-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/56b92839e58ab41582e98eaf87452ec4b50712b4
2016-10-28 09:16:27 +00:00
dotnet-bot 4ed327f131 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24627-05, beta-24627-05, beta-24627-00, beta-24627-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/b030c0a58466c70ca34b56933903b31e580e6189
2016-10-27 22:28:54 +00:00
Alex Ghiondea 81e93c452c Re-enable tests for issues that have already been resolved.
Commit migrated from https://github.com/dotnet/corefx/commit/51394d7ca62027468d488b25a4ab87f4a12dc5ba
2016-10-26 15:00:58 -07:00
dotnet-bot a196fb6572 Update CoreFx to beta-24626-02
Commit migrated from https://github.com/dotnet/corefx/commit/ffd454cef1f7dd4a2f6969747cf45a4729e6387c
2016-10-26 14:46:03 +00:00
dotnet-bot de5dd7cba0 Update CoreClr, CoreFx, ProjectNTfs to beta-24626-01, beta-24625-02, beta-24625-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/ff859b462ada317c02c96b93918ec0e2d072459e
2016-10-26 00:20:25 +00:00
Stephen Toub 5d5270b6e2 Merge pull request dotnet/corefx#13000 from stephentoub/remove_todos
Remove lots of P2P references / TODOs from projects

Commit migrated from https://github.com/dotnet/corefx/commit/b31132f9ab392444c4f5f0c2eaa3f68355f05e95
2016-10-25 17:37:39 -04:00
Matt Galbraith caa6424cab Merge pull request dotnet/corefx#13002 from MattGal/Another_TestSuite_update
Update Microsoft.DotNet.BuildTools.TestSuite, Microsoft.xunit.netcore.extensions

Commit migrated from https://github.com/dotnet/corefx/commit/0aabd695fe32d69a143ea7f245842bc4483e5c1b
2016-10-25 13:16:01 -07:00
Stephen Toub 39a5e7b0b8 Merge pull request dotnet/corefx#12986 from alecont/master
Add missing members in System.Net.Sockets.SocketException

Commit migrated from https://github.com/dotnet/corefx/commit/25e7abc5c274f89603a373149c739c2ea241ad9d
2016-10-25 16:09:16 -04:00
Stephen Toub 717be8860f Remove lots of P2P references / TODOs from projects
Now that packages have been updated, we should be able to remove these temporary P2P references.


Commit migrated from https://github.com/dotnet/corefx/commit/b391fd73d1f93958d07c58ef0cf6efad04d1cba6
2016-10-25 15:14:02 -04:00
Ale Contenti 6cdfdf2ea9 Add missing members in System.Net.Sockets.SocketException
Fixes dotnet/corefx#12459


Commit migrated from https://github.com/dotnet/corefx/commit/5bb3dc558cf1db53eb27ffe1d8eb72e2e2cf4077
2016-10-25 11:49:24 -07:00
Matt Galbraith 499ac922d7 Update Microsoft.DotNet.BuildTools.TestSuite and Microsoft.xunit.netcore.extensions
Commit migrated from https://github.com/dotnet/corefx/commit/262cef73a95a6f743ce19abc0b42a80ff715ac52
2016-10-25 10:47:06 -07:00
dotnet-bot b943e5d281 Update CoreClr, CoreFx, External to beta-24625-02, beta-24625-01, beta-24625-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/e1bdcc213a47f4761a6a46e8e0d612d7bc237c9a
2016-10-25 08:19:47 +00:00
Ale Contenti 29d1e1c8e8 Add missing members in System.Net.Sockets.SocketException
Fixes dotnet/corefx#12459


Commit migrated from https://github.com/dotnet/corefx/commit/0a187a9c4769fe9a4e60a2c8bf053ba9b8f8d605
2016-10-24 23:31:52 -07:00
tijoytom a572e79b9c Merge pull request dotnet/corefx#12916 from tijoytom/cookie_exp
Port remaining methods in CookieCollection and CookieContainer

Commit migrated from https://github.com/dotnet/corefx/commit/1c3a3e6aad27daf3ce53edcae1022b69ef31866c
2016-10-24 20:51:19 -07:00
Jose Perez Rodriguez 132e478c7b Updating Corefx versions to beta-24624-01
Commit migrated from https://github.com/dotnet/corefx/commit/cd40177af397e309c41f2bbcec007e21761bb688
2016-10-24 12:01:45 -07:00
Tijoy Tom Kalathiparambil 2cc2114782 Port remaining methods in CookieCollection and CookieContainer
Fixes https://github.com/dotnet/corefx/issues/12125
The required methods already exists , but were
internal.This change just expose them from the
public contracts.


Commit migrated from https://github.com/dotnet/corefx/commit/46b4c483783b63305b18e246b3c616077c990797
2016-10-24 11:01:27 -07:00
Matt Galbraith 8cdd4afd6d A couple test fixes that fell out of recent bugs and package restore improvements:
Fix Xunit return code / file creation behavior:
- Update Xunit.console.netcore - now has same behavior as 2.2.0 Desktop version for exit codes
- Update Microsoft.DotNet.BUildTools to 1.0.26-prerelease-00921-01, to pick up a runner script that can honor the exit code from above instead of hide it.

Fix UWP tests:
- Update Microsoft.DotNet.BuildTools.TestSuite  1.0.0-prerelease-00921-01 - Pick up native compilation package
- Update microsoft.xunit.runner.uwp to 1.0.3-prerelease-00921-01 - Various fixes included in PR
- Microsoft.xunit.netcore.extensions to 1.0.0-prerelease-00920-01 - Same


Commit migrated from https://github.com/dotnet/corefx/commit/95f0052492a5a1086e2b23e209fd6eaa95334b3b
2016-10-24 09:28:51 -07:00
Stephen Toub 344ae45288 Update CoreFx dependencies to beta-24623-01
Commit migrated from https://github.com/dotnet/corefx/commit/617811c779e36848fb1af4c2e8d8b3b1dba42e83
2016-10-23 11:50:14 -04:00
Stephen Toub 5db5d05cc6 Fix CredentialCache arg names in implementation
The names of arguments to several CredentialCache members are different between the CredentialCache implementation and the CredentialCache in the ref contract (the one in the ref contract is "correct" in that it matches both what's in desktop and what's in netstandard).  Since the contract is correct, this isn't actually visible for a dev using the contract, but it is for a few exception types that end up including the name of the argument.  To match desktop (and to make sense to the dev), the exceptions should contain the name used in the ref contract.


Commit migrated from https://github.com/dotnet/corefx/commit/0161403af1db0d5775e685a32c02633f9b430794
2016-10-22 13:23:13 -04:00
Eric St. John 4a6c9bbb81 Update all projects to last stable packages
And remove imports.

Now that we have netstandard packages that support all targets we should
use them.  This means we don't need imports.

I opted to use the stable packages rather than the LKG ones since this
will reduce churn in the product assemblies.

This has the added benefit of reducing download time for the repo.


Commit migrated from https://github.com/dotnet/corefx/commit/a330f3651c999b241d55ca25d9baa7fb0f247c5c
2016-10-21 06:32:53 -07:00
Stephen Toub a4b24a9204 Move System.Net.RequestCachePolicy/Level down to System.Net.Primitives
This allows us to remove the System.Xml dependency on System.Net.Requests.


Commit migrated from https://github.com/dotnet/corefx/commit/af5516e1d66eb4b7b228804e8634101b9d0d3bb9
2016-10-20 19:22:35 -04:00
Stephen Toub ecb88014aa Merge pull request dotnet/corefx#12830 from stephentoub/more_serialization
Add more serialization annotations/implementations

Commit migrated from https://github.com/dotnet/corefx/commit/2f53760681d35ad210f2b8f2397564dfd40d50f2
2016-10-20 15:29:54 -04:00
Matt Galbraith 960e2fba57 Merge pull request dotnet/corefx#12822 from MattGal/UpdateBuildToolsAndTestSuite
Putting back net46 specific dependencies (for Desktop Runs) 

Commit migrated from https://github.com/dotnet/corefx/commit/0578ba76212ab4eae6c8947f86069e6823f841c1
2016-10-20 11:23:43 -07:00
Stephen Toub 9eb4f8e739 Add System.Net.Primitives serialization
Commit migrated from https://github.com/dotnet/corefx/commit/5646db2a20d3b97b42a9b3c9c774629e5f9545b9
2016-10-20 08:56:39 -04:00
Stephen Toub fc416399f6 Update CoreFx to beta-24619-02 (master)
Commit migrated from https://github.com/dotnet/corefx/commit/85567505126195558e104adec718be1d6325e43f
2016-10-20 00:13:39 -04:00
Matt Galbraith d7565e6959 Putting back net46 specific dependencies (for Desktop Runs) by updating to fixed TestSuite and updating BuildToolsVersion (For publishtest.targets)
Commit migrated from https://github.com/dotnet/corefx/commit/09b70db52af43e3062055d6cb4e0f00615a9ccdd
2016-10-19 21:13:29 -07:00
Karthik Rajasekaran 9255a2e649 Combine test dependencies into a common project.json.
Restore this common project.json upfront to improve sync time and avoid download contention from nuget.


Commit migrated from https://github.com/dotnet/corefx/commit/654f5548f946659c694d110a4bbce8aa33f1a7a1
2016-10-18 11:39:53 -07:00
Stephen Toub bf51176a20 Update additional dependencies
Commit migrated from https://github.com/dotnet/corefx/commit/b0c0f372746dec30221b7d32883930d899f4d13f
2016-10-18 08:43:58 -04:00
Stephen Toub 7a1c0a4400 Remove NetworkInformationExceptions.cs from System.Net.Primitives pal tests
Commit migrated from https://github.com/dotnet/corefx/commit/d4685dcaa23dc7f9d3bc71fa038d4186207f5acd
2016-10-18 08:43:24 -04:00
dotnet-bot 94f229c6a7 Update CoreClr, CoreFx to beta-24617-03, beta-24617-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/4c6df2edbad3b5d8ec3914c0366f80ebb73f7c12
2016-10-18 08:43:24 -04:00
Stephen Toub 089b3ec545 Fix net unit/pal test failures
Commit migrated from https://github.com/dotnet/corefx/commit/d6f0cafdb42c33810804266658f8171368878b20
2016-10-17 23:26:59 -04:00
Stephen Toub 6faf58f3a0 Add System.Net.Primitives serialization
Commit migrated from https://github.com/dotnet/corefx/commit/93bde6d2b0cc0797ffb0dca470836ac7f86f876d
2016-10-17 23:26:57 -04:00
tijoytom 4b5606ec9f Merge pull request dotnet/corefx#12658 from tijoytom/master
Add System.Net.IPAddress missing members

Commit migrated from https://github.com/dotnet/corefx/commit/d0485be479bd3f27c4ef78932b3cfb20515940d7
2016-10-15 10:35:09 -07:00