Commit Graph
1547 Commits
Author SHA1 Message Date
Viktor Hofer 9b88ca1d72 Remove UAP target (dotnet/corefx#41759)
* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a
2019-10-17 15:04:39 +02:00
Stephen Toub 7ff3a1100a Reduce RemoteInvoke usage in tests (dotnet/corefx#41741)
Many of our RemoteInvokes are there purely because of needing to change the current thread culture but on UAP that actually impacting the whole process.  Until that's addressed, we can at least avoid the RemoteInvoke on all platforms other than UAP. There are also some RemoteInvokes that can be avoided by just serializing all of the (small number of) tests in a test assembly. And there's some additional cleanup to be done as well around not explicitly returning an exit code unless required.

This helps measurably with test performance.  Consider the System.ComponentModel.Annotations test suite.  On my machine, prior to these changes, it took ~25 seconds; after these changes, it takes ~0.3. It helps even more when running against a checked runtime, where all of our test costs are magnified.  With a checked runtime, prior to these changes, it takes ~196 seconds; after these changes, it takes ~2.5 seconds.  This should help measurably with CI time in coreclr.

Commit migrated from https://github.com/dotnet/corefx/commit/cd18bafbabf7fe47601f6f790d157409034a2477
2019-10-15 12:09:06 -04:00
Viktor Hofer 641a23ecf3 Enable TargetFrameworkName attribute (dotnet/corefx#40924)
* Enable TargetFrameworkName attribute

Remove the opt-out of the TargetFrameworkName attribute generation and
fix the existing test to actually test the custom attribute being set
and read correctly by the AppContext class.


Commit migrated from https://github.com/dotnet/corefx/commit/437d9bc76489ff18bd9ce04f287e07591f6bc38c
2019-10-13 13:05:47 +02:00
Stephen Toub 6adeb9be60 Change some internal async Task methods to be async ValueTask (dotnet/corefx#40527)
We have some internal and private `async Task` methods that are only ever `await`ed.  Today there's no benefit to making them `async ValueTask` methods, so we've kept them as `async Task`.  However, if we end up changing the implementation of `async ValueTask` to pool underlying objects, there becomes a potential benefit to using `async ValueTask` for these instead of `async Task`.  This PR changes those in a variety of libraries where we care more about performance and allocations.  There are likely a few more methods we'd want to convert based on profiling, but I believe this represents the bulk of them.

Commit migrated from https://github.com/dotnet/corefx/commit/97d9fb9d6c7e1d50f527e290ef8e18767dbc6bbf
2019-10-10 06:04:01 -04:00
Viktor Hofer f1f9323236 Remove obsolete CodeCoverageAssemblyAttribute (dotnet/corefx#41674)
Commit migrated from https://github.com/dotnet/corefx/commit/e0ad7cfd08719242c4613ffb9574cd77328a7ba6
2019-10-09 09:27:48 -04:00
Stephen Toub 25b777b240 Fix HtmlEncode handling of surrogate pairs (dotnet/corefx#41576)
Due to a regression that came as part of changing the code from using pointers to using spans, when the surrogate pair isn't at the beginning of the the input, it's incorrectly encoded.

Commit migrated from https://github.com/dotnet/corefx/commit/6de42378223c6cb138d28f812c440092718c7a19
2019-10-05 22:33:18 -04:00
dotnet-maestro[bot] 8e0feec09d [master] Update dependencies from dotnet/coreclr (dotnet/corefx#41089)
* Update dependencies from https://github.com/dotnet/coreclr build 20190912.7

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

* Fix Environment.WorkingSet tests for coreclr update


Commit migrated from https://github.com/dotnet/corefx/commit/a3dbe06e55084c12450288db4ea12a1e7fd36144
2019-09-13 19:53:32 +00:00
Viktor Hofer d5079dda17 Remove ProjectGUIDs from project files and Project and Name attributes from P2Ps (dotnet/corefx#40926)
* Remove ProjectGUIDs from P2Ps

* Remove ProjectGUIDs from project files

Commit migrated from https://github.com/dotnet/corefx/commit/c22714d65151968a17c3b232748880d5e7961dee
2019-09-09 18:21:25 +02:00
Stephen Toub f08a1c9c9b Pass a CancellationToken in a few more places (dotnet/corefx#40715)
Most of these to WaitAsync shouldn't actually matter, as the semaphores being used are there for corner cases or to protect erroneous usage, but if there's no contention, passing a token won't hurt, and if there is contention, passing the token makes it more robust.

Commit migrated from https://github.com/dotnet/corefx/commit/14a7adb23569363b94d575d64b7cb1f38cda3e4a
2019-09-03 15:24:08 -04:00
Stephen Toub 4fc5d8971d Contribute to IDE0055 (fix formatting)
Commit migrated from https://github.com/dotnet/corefx/commit/b49a8a9be1d53cd9e50cb68fd8540be25c65d433
2019-08-24 07:47:35 -04:00
Stephen Toub cae3309c0a 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
2019-08-15 08:17:46 -04:00
Stephen Toub 9548bea38a Make many fields readonly or const across corefx (dotnet/corefx#40298)
* Make many fields readonly or const

* Address PR feedback

- Updated asn.xslt
- Regenerated .xml.cs files


Commit migrated from https://github.com/dotnet/corefx/commit/0cc22ccba707d7552159363d586262fa9c4e8a2a
2019-08-14 14:19:30 -04:00
Stephen Toub 6a988c7d03 Enable StyleCop rules 1205, 1411, 1026, and 1000 (dotnet/corefx#40254)
* Fix StyleCop warning SA1411 (attribute ctor shouldn't use unnecessary parens)

* Fix StyleCop warning SA1026 (new[] spacing)

* Fix StyleCop warning SA1000 (consistent spacing around if, for, switch, etc.)

* Fix StyleCop warning SA1205 (partial elements should declare an access modifier)


Commit migrated from https://github.com/dotnet/corefx/commit/0c4c234a918254d569ffb0f6a607f98193608646
2019-08-12 22:45:34 +02:00
Stephen Toub 2a47457139 Make several local functions static (dotnet/corefx#40251)
Commit migrated from https://github.com/dotnet/corefx/commit/d3155017e1fe6acdb72e2d1b30c5b2e36cf21af8
2019-08-12 15:08:18 -04:00
Viktor Hofer cbf5ee9f39 Upgrade Windows Nano Server to 1809 (dotnet/corefx#39734)
* Upgrade Windows Nano Server to 1809

* Handle ERROR_CALL_NOT_IMPLEMENTED in PlatformDetection.IsInAppContainer

* Disable TextInfo test on Nano server

* Disable EnvironmentVariable tests on user scope


Commit migrated from https://github.com/dotnet/corefx/commit/61c5e96b70fd14621ec71aee356b1b520696a3c9
2019-08-11 14:19:01 +02:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub c8df52dd02 Re-enable xunit warning 1026 (unused theory arguments) (dotnet/corefx#40079)
* Re-enable xunit warning 1026 (unused theory arguments)

Some of these were addressed by explicitly discarding theory arguments, generally in cases where either a) the argument was being used as a description to aid in debugging failures, or b) the argument was part of a member data that was used by some theories and not by others all sharing the same member data.

However, there are quite a few legitimate bugs being fixed here, enough that highlights it's worthwhile to have the rule enabled.  Some are cases where the argument was supposed to be used but wasn't.  Some are cases where the argument isn't used at all, and in many cases where we end up running the same test over and over and wasting cycles.  Some are cases where we're unnecessarily including irrelevant inputs to the tests and making the input data more complicated than it needs to be.  Etc.

(Along the way, I also fixed some cases where VS was warning about lambdas being used instead of local functions, and in cases where I agreed I fixed them, via auto-fixers.)

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/daf93ee0e5e5233141eb762c64b6049cfd7d123e
2019-08-07 08:00:27 +02:00
Roman Marusyk 7c7dcb190a Change exception throwing in Path.GetRelativePath (dotnet/corefx#38388)
* Fix Path.GetRelativePath throws ArgumentNullException when relativeTo is empty string

* Code review fixes


Commit migrated from https://github.com/dotnet/corefx/commit/249b5122a33ea08d2d00581ed691642c18ce1448
2019-08-02 14:55:38 -07:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Stephen Toub f78cb0b72c Re-enable xunit warning 2005 (dotnet/corefx#39866) (dotnet/corefx#39864)
Commit migrated from https://github.com/dotnet/corefx/commit/9142b477f9355ed184df326d7cd1de4963631228
2019-07-30 08:45:39 -04:00
Stephen Toub d24aa292ac Re-enable xunit warning 2009 (dotnet/corefx#39847)
Commit migrated from https://github.com/dotnet/corefx/commit/6737565ccbb8ceb484d349bd6844f7470bf23248
2019-07-29 09:42:13 -04:00
Ganbarukamo41 9be9c570be Enable analyzer for xUnit2000 (Constants and literals should be the expected argument) (dotnet/corefx#39842)
* Enable xUnit2000 analyzer

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

* Fix mistakes

* Fix missed errors for unix


Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4
2019-07-28 15:47:52 -07:00
Zoey McCulloughandJeremy Barton 6820071ac0 Re-enable xunit warning 2002 dotnet/corefx#39696 (dotnet/corefx#39706)
* Removed null checks on value types and enabled xunit 2002

* Updated Fill_OpenDataReader_Throws to use range check

Updated Fill_OpenDataReader_Throws to use range check for passing path

* Removed uneeded asserts and updated others

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

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

Co-Authored-By: Jeremy Barton <[email protected]>

* Update src/System.Reflection/tests/AssemblyNameTests.cs

Co-Authored-By: Jeremy Barton <[email protected]>

* Fixed failing reflection tests and removed Assert.NotNull for enum

* Pulled ruleset up from master to merge

* Cleaned up assert ordering for TestGuid

* Updated TestResponseWithoutContentEvents

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


Commit migrated from https://github.com/dotnet/corefx/commit/c96e389f803b043753558878fefb575f3f85c934
2019-07-26 09:58:06 -04:00
Stephen Toub bf9054c38c Re-enable xUnit1025 (duplicate InlineData) (dotnet/corefx#39737)
Commit migrated from https://github.com/dotnet/corefx/commit/47d96f89df41ce18d3ba77b38007ec68f7f66fc6
2019-07-25 10:45:20 +02:00
Stephen Toub 47f8f6d47d Re-enable xunit warning 2003 (dotnet/corefx#39696)
* Replace "Assert.Equal(null, " with "Assert.Null("

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

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

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


Commit migrated from https://github.com/dotnet/corefx/commit/6de660a02e335eefebfcc3c81ecb0013e2a8148e
2019-07-23 15:49:33 -04:00
Stephen Toub 38367a5d58 Re-enable all DisableXUnitAnalyzer test projects (dotnet/corefx#39674)
* Re-enable all DisableXUnitAnalyzer test projects

* Remove TODO comment


Commit migrated from https://github.com/dotnet/corefx/commit/16f3eef83d6df4c9dbc0e2992dafbc9553db363d
2019-07-22 16:56:01 -04:00
Hugh Bellamy c6b2130ef0 Fix NullReferenceExceptions in IndentedTextWriter without writer (dotnet/corefx#39584)
Commit migrated from https://github.com/dotnet/corefx/commit/52f0a9192d1fcf624252c79e1fe5aa057f1db719
2019-07-20 20:59:51 -04:00
Santiago Fernandez Madero 1b4cf22dd1 Make all events nullable (dotnet/corefx#39578)
Commit migrated from https://github.com/dotnet/corefx/commit/ba2d62a24ea8574f40c43cd27cc384f079958a0c
2019-07-17 20:07:03 -07:00
Stephen Toub 97d1516fdf Remove stale nullable !s and pragmas (dotnet/corefx#39376)
Also update TODO-NULLABLE comments to be more specific where appropriate.

Commit migrated from https://github.com/dotnet/corefx/commit/1ea12d43e92e9ceb0c28157d81ffd6224cf05706
2019-07-11 08:51:57 -04:00
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00
Hugh Bellamy 11336e2a2f Fix typos in test names (dotnet/corefx#39025)
Commit migrated from https://github.com/dotnet/corefx/commit/59d4a3ed40125b377083b10c8cb58d5f48522c0a
2019-06-28 09:17:49 -04:00
Santiago Fernandez Madero 86b3ad0d03 Tweak custom nullable attributes based on API Review (dotnet/corefx#38977)
Commit migrated from https://github.com/dotnet/corefx/commit/7dce7868e3b3023ee96edebb96042ca01a8ec368
2019-06-27 09:58:49 -04:00
Jan Kotas 7504b72af1 Improve test coverage for Convert.FromBase64 (dotnet/corefx#38724)
Commit migrated from https://github.com/dotnet/corefx/commit/707b15859af2fb23e17acfdc915d4cb5ee9112ad
2019-06-20 11:15:44 -07:00
Viktor Hofer 2862b45d28 Update sln configurations (dotnet/corefx#38698)
Commit migrated from https://github.com/dotnet/corefx/commit/5ec88f81af71d253cfa74f9982abf748ccbd529b
2019-06-19 23:28:19 +02:00
Stephen Toub 312caa9574 Try to make MonitoringIsEnabled more stable (dotnet/corefx#38651)
Add a GC.Collect call to ensure the GC.GetMemoryInfo sees the object being kept alive.

Commit migrated from https://github.com/dotnet/corefx/commit/471edf259604905535f147ddfb2c8fe5a37ce81d
2019-06-18 18:08:20 -04:00
Viktor Hofer 5f98ba6a2b Enable project restore for test projects (dotnet/corefx#38151)
* Factor out repo restore into seperate props/targets

* Use configuration system msbuild sdk

* Remove XUnit.Runtime.depproj

* Remove TargetGroup usages in test projects

* Fix ILLink configuration

The ILLink package contains netcoreapp2.0 assets which are compatible
with netstandard2.0. Removing the old TargetFramework to restore
successfully.

* Remove usages from TargetGroup in Directory.Build.props

* Remove dead net4* configurations

* Change tests.builds to tests.proj sdk proj

* Make externals dir proj an sdk project

* Consume Microsoft.DotNet.CoreFxTesting as an msbuild sdk

* Use runtimeconfig.template.json

* Remove SupplementalTestData

* Map shared framework version to product version

* Stop binplacing tests

* Move some tool depprojs to targets during restore

* Remove dead code

* Use PackageReference instead of RefFromRuntime in test

* Disable using an apphost

* Copy compression testdata manually cause unicode bug

* Remove target batching in optimizationData

* Reference packaging tools from CoreFx.Private.TestUtilities


Commit migrated from https://github.com/dotnet/corefx/commit/c4c1985531cc1f25c805bbc4801b85c98e0dfee0
2019-06-15 21:27:13 +02:00
Viktor Hofer a5d5b91672 Delete dead uapaot code (dotnet/corefx#38330)
* Delete dead uapaot code

Commit migrated from https://github.com/dotnet/corefx/commit/8c2be7893fa585cba9c094c27b69d7c8e0822ef3
2019-06-14 15:12:42 +02:00
Stephen Toub 37806d0f7b Update corefx for compiler nullable attribute updates
Commit migrated from https://github.com/dotnet/corefx/commit/3c129ac0340a3843ab5b00a9c730730e7b60729b
2019-06-13 18:26:36 -04:00
Santiago Fernandez Madero 50ff71f5a2 Add nullable annotations to System.Runtime.Extensions ref (dotnet/corefx#37905)
* Add nullable annotations to System.Runtime.Extensions ref

* Reflect nullable annotations now with attributes

* Address feedback from API Review

* Fix build errors after re-base

* Fix FrameworkName IEquatable implementation to be oblivous


Commit migrated from https://github.com/dotnet/corefx/commit/8ef985fa7c4fd2333a2d905e3f1f9f93e49c002f
2019-06-12 21:00:32 -04:00
Steve MacLean 3cbef1bcea Add AppDomain.CurrentDomain event asserts (dotnet/corefx#38351)
Add assets related to AppDomain events
Remove ApiCompat workaround

Commit migrated from https://github.com/dotnet/corefx/commit/f5399d9d24536697a3bc36339e13ba085fc28938
2019-06-12 02:12:34 -04:00
Santiago Fernandez Madero 749b2c80db Address System.Runtime and System.Runtime.Extensions nullable feedback (dotnet/corefx#38459)
* Address System.Runtime and System.Runtime.Extensions nullable feedback

* PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/e3dd986b1ba2ec80bba84aee5a4b4527db087ce2
2019-06-11 16:52:22 -05:00
Stephen Toub ab3ee8ae86 Add nullable attributes to partial facade implementations (dotnet/corefx#38309)
* Add nullable attributes to partial facade implementations

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/3ea7b55e275fb6367f67e7fb0432be4bb3902f09
2019-06-06 21:54:11 -04:00
Viktor Hofer cacc1ff968 Remove NetNative uapaot support (dotnet/corefx#38170)
* Remove NetNative uapaot support

* Remove uapaot assets from packages

* Disable emit lightweight and ilgen version check


Commit migrated from https://github.com/dotnet/corefx/commit/ab58ff6e649852b85fdb99b15992a2fa3a7d8834
2019-06-06 21:39:46 +02:00
Marco Rossignoli c73d292218 fix tests (dotnet/corefx#38096)
Commit migrated from https://github.com/dotnet/corefx/commit/c84b3861a3ff8f0843b1da64ae88fb712f4af57d
2019-06-03 11:25:09 -04:00
Dan Moseley 9de0c8dafa Fix tests to match exception output change (dotnet/corefx#38145)
Commit migrated from https://github.com/dotnet/corefx/commit/360621af9620de205193f627ae84c41ddec60551
2019-06-02 20:25:37 -04:00
dotnet-maestro[bot] 10f72f160b [master] Update dependencies from dotnet/coreclr (dotnet/corefx#38099)
* Update dependencies from https://github.com/dotnet/coreclr build 20190530.2

- Microsoft.NET.Sdk.IL - 3.0.0-preview6.19280.2
- Microsoft.NETCore.ILAsm - 3.0.0-preview6.19280.2
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19280.2

* Expose, test, and use Environment.TickCount64

* Back out change to WinInetProxyHelper.cs


Commit migrated from https://github.com/dotnet/corefx/commit/06f25eaa8592b49c65373d0cdcbdac9a4bdf0f35
2019-05-31 13:25:15 -07:00
William Godbe 903e8cc3b9 Add tests for double-encoded URLs to both UrlDecode() methods (dotnet/corefx#37881)
* Add tests for double-encoded URLs to both UrlDecode() methods

* Make test cases more clear


Commit migrated from https://github.com/dotnet/corefx/commit/b2fd315c40330e09d34d269792884f6544ab3fe6
2019-05-31 11:48:31 -07:00
Viktor Hofer 1e6c01263c Merge remote-tracking branch 'upstream/master' into NSTestRemoval
Commit migrated from https://github.com/dotnet/corefx/commit/1743e47216aa698ffe91148f4db2078accf6030a
2019-05-31 00:21:15 +02:00
dotnet-maestro[bot] 11077218ad [master] Update dependencies from dotnet/coreclr (dotnet/corefx#38057)
* Update dependencies from https://github.com/dotnet/coreclr build 20190529.4

- Microsoft.NET.Sdk.IL - 3.0.0-preview6.19279.4
- Microsoft.NETCore.ILAsm - 3.0.0-preview6.19279.4
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview6.19279.4

* Expose TrimEndingDirectorySeparator

* Disable new tests on Unix


Commit migrated from https://github.com/dotnet/corefx/commit/88f4967b84d20f6ea6da037cef6fd82119e76900
2019-05-30 15:15:38 -04:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00