Commit Graph
779 Commits
Author SHA1 Message Date
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
Stephen Toub dc6e657497 Add tests to validate Task reference doesn't keep state alive (dotnet/corefx#32671)
Commit migrated from https://github.com/dotnet/corefx/commit/6bd0983cd6beaf872f3345c43c1783df82c75e50
2018-10-17 13:04:49 -04:00
Stephen Toub 05137086bc Add more CTR.Unregister/Dispose tests (dotnet/corefx#32492)
Validate the behavior of unregistering a callback during cancellation but before the callback has been invoked.

Commit migrated from https://github.com/dotnet/corefx/commit/2658efb0c432901ac8c24cd4c30f5bfe21bd7e63
2018-10-02 09:49:46 -04:00
Paulo Janotti c6efbc3cf4 Coverage do not target CoreLib in bulk (dotnet/corefx#32537)
* Coverage do not target CoreLib in bulk

* Fix 1 project add temp nop to 2 others

* PR feedback: reuse property to disable code coverage

* PR Feedback: add dedicated property to target runtime

* System.Transactions.Local.Tests taking too long on PR


Commit migrated from https://github.com/dotnet/corefx/commit/95eeecb5184e414810bc94fdb496c5748289a720
2018-10-02 06:05:11 -07:00
Jan Kotas 12171b348a Improve CoreLib test coverage (dotnet/corefx#32533)
Commit migrated from https://github.com/dotnet/corefx/commit/f14b3353a3d5ed410a1a16681a812ed09bd8932c
2018-09-28 17:22:37 -07:00
Morgan Brown abc0943945 Build managed code and packages for WebAssembly/netcoreappaot (dotnet/corefx#32045)
Adds support for a WebAssembly netcoreappaot configuration for building managed libraries and packages. This is enough to produce a package of libraries that CoreRT's WebAssembly implementation can consume.


Commit migrated from https://github.com/dotnet/corefx/commit/2b868f80c307a514dfafb7eb166dad3dbc2ed26b
2018-09-11 21:57:52 -07:00
Wes Haggard 6dcf8b8bfb Update the configurations properties in projects
Commit migrated from https://github.com/dotnet/corefx/commit/fea86686c620242ce7e1911418f2fba7c4d52d4d
2018-08-29 09:45:04 -07:00
Morgan Brown 5851b3de9a Add netcoreappaot target group (dotnet/corefx#30980)
Changes to add a new netcoreappaot target group, similar to netcoreapp but it builds against the .NET Native core libraries. A couple of libraries, such as System.Linq.Expressions, have aot-specific definitions that are enabled for netcoreappaot.

Commit migrated from https://github.com/dotnet/corefx/commit/3333166174e54ae9435c31e0a68a6784e9aacc41
2018-08-21 18:19:59 -07:00
Stephen Toub 6a2b913770 Expose/test CancellationTokenRegistration.Unregister (dotnet/corefx#31008)
* Expose/test CancellationTokenRegistration.Unregister

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/7e32ee3c9566e0273e479945e0b62750aedf069e
2018-07-12 14:52:31 -04:00
Eric Erhardt 779486884e Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ec546de620c5248f3662d6aaca989ed382b86b6b
2018-06-28 21:28:41 -05:00
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
Alexander Köplinger 0fc1c86157 Fix race in TaskCancelWaitTestCases.TaskCancelWait1() (dotnet/corefx#30615)
When `CancelChildren` is enabled (currently only in the `TaskCancelWait1` test)
we're hitting a race in `TaskCancelWaitTest.CreateTask()`:

1. Let's assume Task A is processing `node`
2. Task A spawns a new Task B for processing `node_1`
3. Task B starts and signals the `_countdownEvent`
4. `RealRun()` on the main thread exits the wait on `_countdownEvent`
5. `RealRun()` calls `Verify()` which loops through all the nodes and calls `VerifyCancel()`
6. We get an assertion because `CancellationToken.IsCancellationRequested` is false
7. Task A continues and sets the CancellationToken, but it is already too late by this point

To fix this race we wait on the task in `RealRun()` before proceeding to
the verification step.

This uncovered another issue:
Since `_countdownEvent` is accessed by multiple threads we have another
race between checking `_countdownEvent.IsSet` and `_countdownEvent.Signal()`.
This caused a `System.InvalidOperationException: Invalid attempt made to decrement the event's count below zero.`
Fixed it by locking access to the `_countdownEvent`.

Fixes https://github.com/dotnet/corefx/issues/20457
Fixes https://github.com/mono/mono/issues/6920

Commit migrated from https://github.com/dotnet/corefx/commit/69cf791e365c2be6f919929c5ae521b2e070aa5d
2018-06-22 21:56:53 -04:00
Eric Erhardt 2053139c9a merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/1c91f96ec67a78a33268181d99a73a736b48c13e
2018-06-15 22:24:40 -05:00
Eric Erhardt 1df03e5bbd Rename dir files to Directory.Build
dir.props => Directory.Build.props
dir.targets => Directory.Build.targets


Commit migrated from https://github.com/dotnet/corefx/commit/204a8dbbc23bfc51d419c93f2f2ddaf50db8020f
2018-06-15 17:07:48 -05:00
Stephen Toub 58c7bbe4b5 Add test for IncompleteAsyncMethod async event (dotnet/corefx#30409)
* Add test for IncompleteAsyncMethod async event

In 2.1, I added an event that's fired when an async method state machine object gets garbage collected without having reached a completed state.  Apparently I never added a test for that behavior.  This does.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/a04a52a452d4e3176e0c3a0f8d32f1bc1b029d13
2018-06-15 16:04:32 -04:00
Eric Erhardt 70091b9c8b Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ad505eb98c6a887db2d2932fec256d9e4e394169
2018-06-11 17:20:10 -05:00
Stephen Toub 20a51fa3cc Fix task tests to use Assert.Throw instead of Assert.ThrowsAsync
A bunch of asserts in the System.Threading.Tasks tests were nops because they were using Assert.ThrowsAsync and then not awaiting the result.  But they actually should never have been ThrowsAsync in the first place, as they were all validating that exceptions propagated out of the delegate synchronously.  So, I just changed them all to be Assert.Throws instead of Assert.ThrowsAsync.


Commit migrated from https://github.com/dotnet/corefx/commit/52c0125d1f9b8f3de2cb77f1b4acd69a4a17db2a
2018-06-05 09:32:56 -04:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Stephen Toub 50f16544b2 Add a few tests for Task.Yield in async methods (dotnet/corefx#28887)
Commit migrated from https://github.com/dotnet/corefx/commit/3b834c49b451fc23e04c9233d9c008e693a4fc9b
2018-04-06 10:27:21 -07:00
Stephen Toub 7ce937d20b Add regression test for Task handling of suppressed ExecutionContext flow (dotnet/corefx#28809)
Commit migrated from https://github.com/dotnet/corefx/commit/61ad2cb0d55785148350af5777a100d5222924ce
2018-04-05 05:48:55 -07:00
Jan Kotas a9ac47e983 Re-enable GetTaskSchedulersForDebugger test (dotnet/corefx#28564)
Fixes dotnet/corefx#28539

Commit migrated from https://github.com/dotnet/corefx/commit/5ffc9b3dd6a3ee0bd128c63e2698617101827d23
2018-03-29 17:41:07 -07:00
dotnet-maestro-bot 993c7e64be Update CoreClr, CoreFx, ProjectNTfs, ProjectNTfsTestILC to preview3-26328-02, preview3-26328-01, beta-26328-00, beta-26328-00, respectively (master) (dotnet/corefx#28536)
* Update CoreClr, CoreFx, ProjectNTfs, ProjectNTfsTestILC to preview3-26328-02, preview3-26328-01, beta-26328-00, beta-26328-00, respectively

* Disable test against active issue


Commit migrated from https://github.com/dotnet/corefx/commit/56d01836ac469b8f158608c9a101afe33465bfbe
2018-03-28 12:25:48 -07:00