Commit Graph
801 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
Santiago Fernandez Madero ebce975828 Add missing dummy types to reference assemblies (dotnet/corefx#41147)
Commit migrated from https://github.com/dotnet/corefx/commit/4aea703673e942756c02b222e6b5babaf8612a25
2019-09-16 22:10:48 -07: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 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 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
Stephen Toub 0d8a87d1dd Enable stylecop warnings 1205, 1212, and 1617 (dotnet/corefx#39941)
* Enable stylecop warning 1617 (void return value should not be documented)

* Enable stylecop warning 1212 (get/set accessor ordering)

* Enable stylecop warning 1205 (modifier ordering)


Commit migrated from https://github.com/dotnet/corefx/commit/6074cfc995d7968fcdbc7f707acff0c6284c6ae9
2019-08-01 18:00:12 -04: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 423f255b6d Re-enable xunit warning 2005 (dotnet/corefx#39866)
Commit migrated from https://github.com/dotnet/corefx/commit/7b013c44b8d38df51f3ec8db64bdcb1f83a8b421
2019-07-29 20:56:11 -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
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04: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 51727a6ef6 Fix ordering of visibility and abstract/virtual/override (dotnet/corefx#39590)
To conform to expected style across corefx.

Commit migrated from https://github.com/dotnet/corefx/commit/b95ad3c0f9066fa426754bd6e3379fbaca24834e
2019-07-18 14:21:08 -04:00
Stephen Toub 88f96670f8 Disable TaskDropsExecutionContextUponCompletion test
Commit migrated from https://github.com/dotnet/corefx/commit/01e6dd5a99c8134f7c585758b8e0a71f2120728a
2019-07-09 08:42:16 -04:00
Stephen Toub c460b5a97d Disable AsyncMethodsDropsStateMachineAndExecutionContextUponCompletion test
Commit migrated from https://github.com/dotnet/corefx/commit/9f9b7c0930e8c8fcd9696410ce2bd0dbc9ac37ab
2019-07-09 08:41:12 -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
Stephen Toub 28f482731b Disable two Task GC tests for UWP (dotnet/corefx#39157)
They're sporadically failing in CI.

Commit migrated from https://github.com/dotnet/corefx/commit/7a9c2ab617229faad613fa5554b298df388f6fb7
2019-07-03 10:37:04 -04:00
Stephen Toub ffee4b2100 Add test for sync completion behavior with multiple awaits (dotnet/corefx#38812)
* Add test for sync completion behavior with multiple awaits

* Remove SkipOnTargetFramework for netfx


Commit migrated from https://github.com/dotnet/corefx/commit/cf5787ca4d7a29b0f34cd103c5b8207cd74a6216
2019-06-26 10:24:55 -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
Santiago Fernandez Madero 967f20ef34 Add nullable annotations to System.Threading.Tasks ref assembly (dotnet/corefx#38265)
Commit migrated from https://github.com/dotnet/corefx/commit/3f94d610c133440eeb06f418540be6d8fd782ca0
2019-06-13 23:13:21 -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
Santiago Fernandez Madero 83f0a624d4 Re-generate reference source against impl for System.Threading.Tasks (dotnet/corefx#38231)
Commit migrated from https://github.com/dotnet/corefx/commit/cb603ed5ec0249da022a96f9ec583f24c5a50fae
2019-06-05 09:28:23 -07: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
Tarek Mahmoud Sayed 8e774c42fb Use Thread instead of Task.Run in some Task tests (dotnet/corefx#37932)
Stephen Toub pointed that it is possible when using Task.Run, there could be some ThreadLocal fields on the thread executing the task holding a reference to the object we are trying to GC collect and finalize. The fix here is use Thread objects instead of Task.

Commit migrated from https://github.com/dotnet/corefx/commit/bf7dbd6d37285a147dd30f5dfca6582046dcabc7
2019-05-24 15:05:04 -07:00
Tarek Mahmoud Sayed 54dbd7274b Add logging at the Task timeout tests (dotnet/corefx#37874)
We need to get more info to understand what is going on when the test timeout. Also, we are now FailFast to have the test runs create a debugger dump at least when running on Linux platforms. Hopefully this can help in the diagnostics

Commit migrated from https://github.com/dotnet/corefx/commit/510ab9e6433ff0df29e0ae080140f4f2c1b69abd
2019-05-23 08:40:39 -07:00
Eric StJohn afd313db03 React to APICompat changes enabling reverse APICompat for facades (dotnet/corefx#37375)
* React to APICompat changes enabling reverse APICompat for facades

* Fix UAP and NETFX reverse APICompat issues

* Fix reverse APICompat baseline for allconfigurations build

* Manually update to latest APICompat

* Manually update to latest CoreCLR and fix issues

* Baseline System.Threading.Tasks

* Revert "Manually update to latest CoreCLR and fix issues"

This partially reverts commit dotnet/corefx@ee800617b6.

I'm keeping the baseline changes which will be needed when we get a new update.

* Temporarily baseline DiagnosticCounter API gaps

This can be removed when get a new CoreCLR

That's currently blocked due to regressions in tests.


Commit migrated from https://github.com/dotnet/corefx/commit/035343743c5a7f67be8a2a2f36913a3c43893b76
2019-05-07 19:46:58 -07:00
Stephen Toub 7fd65ca9c7 Move WithCancellation/ConfigureAwait extension methods (dotnet/corefx#37367)
Commit migrated from https://github.com/dotnet/corefx/commit/51478cf10e70e5bbb3577618452522d7f7a80e7b
2019-05-07 13:19:40 -04:00
Anirudh Agnihotry bc2d80c6f4 Removed netcoreappaot configuration from corefx (dotnet/corefx#36739)
* netcoreappaot-Windows_NT regex removed

* netcoreappaot-WebAssembly;\n regex removed

* netcoreappaot-Windows_NT-Debug;netcoreappaot-Windows_NT-Release;
regex removed

* netcoreappaot; regex removed

* netcoreappaot-Debug;netcoreappaot-Release; removed

* removing rest of occurences of netcoreappaot

* deleteing the netcoreappaot apicompat files


Commit migrated from https://github.com/dotnet/corefx/commit/e9d1a10ed1d38a8b1ed599b3b5be09b8349f8ea8
2019-04-09 14:07:31 -07:00
Vladimir Sadov 2008ac7438 Fix a race condition in a TaskStatusTest (dotnet/corefx#36645)
See:https://github.com/dotnet/coreclr/issues/20706

Commit migrated from https://github.com/dotnet/corefx/commit/d00fa24e3ee8f55c81589c4ba6841e5baf8cd646
2019-04-05 22:39:51 -04:00
Viktor 7e4b5f9b01 Update src folder
Commit migrated from https://github.com/dotnet/corefx/commit/817c36a05ef2d92e59ce6f5a37e2be50076361b3
2019-04-02 19:21:57 +02:00
Stephen Toub e7e11b10e1 Remove remaining usage of Contract.* (dotnet/corefx#36002)
Only remaining use of System.Diagnostics.Contracts in corefx is tests for the library itself, and usage of the [Pure] attribute.

Commit migrated from https://github.com/dotnet/corefx/commit/940ecee40b64ab93c92f87a7e8909771c013f1a5
2019-03-14 09:47:04 -04:00
Stephen Toub a973d08da5 Add await stack guard test (dotnet/corefx#35905)
* Add await stack guard test

* Fix typo

* Skip new test on netfx


Commit migrated from https://github.com/dotnet/corefx/commit/6d7126e0a329db795930ea17e84369eacb7bae5a
2019-03-10 23:19:09 -04:00
Viktor Hofer f8a8530d0f Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files

* Remove obsolete Project attributes

* Remove xml header and remove DefaultTargets


Commit migrated from https://github.com/dotnet/corefx/commit/c390ce7df50252e11f5d322276e9d19e046d1332
2019-03-03 18:55:25 +01:00
Ahson Khan 4fed6ab881 Auto-generate the reference assemblies and separate type forwards (dotnet/corefx#35557)
* Auto-generate the reference assemblies

* Add back type forwards.

* Revert "Add back type forwards."

This reverts commit dotnet/corefx@3acf74aabb.

* Add back TypeForwardedTo in .Forward.cs files

* Add new type forward files to the csproj files

* Add back if-defs and move TestUtilities comment from ref to source

* Remove duplicate definitions, delete unnecessary manual files,

* Fix build breaks

* Add back missing AsyncMethodBuilderAttr to S.Runtime ref

* Fix typo between XmlDocument and XPath.XDocument

* Add type forward fild missed from previous commit

* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1

* Remove "this type was moved to comments" from the type forwards.

* Add back the Xml and Debugger* attributes to Xml.ReaderWriter

* Add back struct layout attributes

* Add back attributes missing (highlighted from api compat)

* Add missing toolbox item attribute in s.data.common.

* Add missing struct layout attributes and remove unnecessary additions

* Add back InterfaceTypeAttribute


Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
2019-02-27 19:39:21 -08:00
Stephen Toub 69446f16b3 Expose/test IAsyncDisposable.ConfigureAwait (dotnet/corefx#34783)
Commit migrated from https://github.com/dotnet/corefx/commit/e6939de2997edf49444ac2c12ad22d5d5f6dea89
2019-01-31 10:21:30 -05:00
Stephen Toub 01d19b04a2 Add test for new CancellationTokenSource(0) (dotnet/corefx#34832)
Validate correct behavior when a CTS is constructed to be immediately canceled via a 0 timeout.

Commit migrated from https://github.com/dotnet/corefx/commit/fdf1d66f37cc09e2b9de05eadcaa14c9dd5fb223
2019-01-31 09:26:38 -05:00
Stephen Toub 1dbdaea6dd Test to validate that TaskCompletionSource doesn't capture ExecutionContext (dotnet/corefx#34587)
Commit migrated from https://github.com/dotnet/corefx/commit/db7daabdb592da062d8a80f27bbad1178c364530
2019-01-15 19:55:56 -05:00
Stephen Toub 25cc6616ef Undo workarounds for CoreLib types
Commit migrated from https://github.com/dotnet/corefx/commit/94c43e147d6aac8de3f9d6ad8f4db5881b1007df
2019-01-15 12:35:11 -05:00
Stephen Toub 09ec5df8fb Work around OperationStatus's move to CoreLib
In coreclr, but not yet in .NET Native


Commit migrated from https://github.com/dotnet/corefx/commit/19614806d5c8e01da387db704cd18a82d096354d
2019-01-12 09:39:09 -05:00
Stephen Toub 7f43f66da1 Temporarily work around lack of types in uapaot
Commit migrated from https://github.com/dotnet/corefx/commit/128c263061d157aaac1f34bf0e6163f76a436492
2019-01-12 09:39:09 -05:00
Stephen Toub feee3ccc2f Expose/test WithCancellation for async enumerables
Commit migrated from https://github.com/dotnet/corefx/commit/74a04273fb5219210c69d6d117fc29af26017721
2019-01-12 09:39:07 -05:00
Stephen Toub 7abb89f8dc Add test for CancellationTokenRegistration.Token after disposal (dotnet/corefx#33854)
Commit migrated from https://github.com/dotnet/corefx/commit/4216e74b3dbe13666a8023a339b95e0151c12b44
2018-12-10 06:43:35 -05:00
Stephen Toub 50a85578f4 Expose\test CancellationToken parameter to GetAsyncEnumerator
Commit migrated from https://github.com/dotnet/corefx/commit/27d9376f663f455672bf36a9de70fe8aebb4ecf7
2018-12-09 08:52:15 -05:00
Stephen Toub 8533f5b658 Expose\test IAsyncEnumerable.ConfigureAwait (dotnet/corefx#33337)
Commit migrated from https://github.com/dotnet/corefx/commit/f81db407ee3ee0f7de850cfebc5312d0ab50f11b
2018-11-08 13:09:03 -05:00
Stephen Toub 71e9d393fc Expose\test CancellationTokenRegistration.DisposeAsync
Commit migrated from https://github.com/dotnet/corefx/commit/779e42b421d2f802d5f57f9c739d30694c1849d3
2018-11-08 09:33:22 -05:00
Stephen Toub eec11eed6c Merge pull request dotnet/corefx#33104 from stephentoub/exposeasync
Expose async iterator-related types

Commit migrated from https://github.com/dotnet/corefx/commit/637e109e7d085b8c01b5ba22521c021f8204ff12
2018-11-07 21:14:46 -05:00
Wes Haggard 954fb511b3 Rename AssemblyKey properties to StrongNameKeyId as part of arcade work
Commit migrated from https://github.com/dotnet/corefx/commit/7edd861bf2dd59ecdb4284e0fd291d7458198a9d
2018-10-30 15:14:01 -07:00
Stephen Toub fcce7f8a6d Expose async iterator-related types
As well as new ManualResetValueTaskSourceCore


Commit migrated from https://github.com/dotnet/corefx/commit/9a35b16696da150bbb13fff62d7250e69e1fa5c4
2018-10-30 12:39:08 -04:00
Stephen Toub 724805f882 Expose CancellationToken.UnsafeRegister (dotnet/corefx#32743)
Commit migrated from https://github.com/dotnet/corefx/commit/d7ffabe619889fc6e4994a3a21c9201b5a0cdfc8
2018-10-19 08:36:37 -04:00