Commit Graph
750 Commits
Author SHA1 Message Date
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
Alexander Radchenko a4d0abc32d Fixed netfx System.Threading.Tasks.Tests fails on non-English Windows (dotnet/corefx#28351)
* Fixed netfx System.Threading.Tasks.Tests fails on non-English Windows

* Removed RemoteInvoke. Replaced Contains on pattern match.

* Removed RemoteInvoke. Replaced Contains on pattern match.


Commit migrated from https://github.com/dotnet/corefx/commit/3e5bf71568a4235ccbf91b9e5207bedd34e80d79
2018-03-22 22:38:06 -04:00
Stephen Toub a6932f9f28 Ensure SocketsHttpHandler throws TaskCanceledExceptions instead of OperationCanceledExceptions (dotnet/corefx#28075)
To increase compatibility, as other handlers often throw the derived type instead of the base type, as a side-effect of how they were implemented.

Commit migrated from https://github.com/dotnet/corefx/commit/1f93d2a1c5f3bdeb8c091863236fe2071e5e66f5
2018-03-22 22:11:23 -04:00
Stephen Toub c3b14cf792 Re-enable several task awaiting tests (dotnet/corefx#27940)
Commit migrated from https://github.com/dotnet/corefx/commit/1126fc248e051af44b79ef9f2d736421582f8079
2018-03-10 19:35:44 -05:00
Stephen Toub d3f8c4afbd Add tests for completing tasks in non-default contexts (dotnet/corefx#27819)
Prior to .NET Core 2.1, if a task was awaited in a default context (or if ConfigureAwait(false) was used), and if the task is then completed on a non-default context, the continuation is not inlined by default.  Optimizations added in 2.1 erroneously end up bypassing those checks, leading to continuations getting inlined in places they weren't previously.  This adds regression tests for that behavior.

Commit migrated from https://github.com/dotnet/corefx/commit/4dc401be87a7662132973ac4f43309b3dc534926
2018-03-07 14:20:41 -05:00
Stephen Toub 10ded4a0c4 Add async method tests for decimal caching (dotnet/corefx#27478)
* Add async method tests for decimal caching

* Skip decimal test on netfx


Commit migrated from https://github.com/dotnet/corefx/commit/0eef005290abd2fbf562d04790f778debeaa2967
2018-02-27 23:23:29 -05:00
Wes Haggard fc9b090ef0 Update references assemblies to include private fields for structs
Contributes to https://github.com/dotnet/corefx/issues/6185.


Commit migrated from https://github.com/dotnet/corefx/commit/2e97d43060dfb589907a15dbfef0cc7db6e90546
2018-01-12 08:53:41 -08:00
Jan Kotas 27d98c0776 Delete unnecessary SecurityCritical and SecuritySafeCritical annotations
Commit migrated from https://github.com/dotnet/corefx/commit/0bb106232745aedfc0d0c5a84ff2b244bf190317
2017-11-19 10:37:38 -08:00
Santiago Fernandez Madero b9d768589e Fix System.Data.Odbc configurations for support package and run UpdateVSConfigurations (dotnet/corefx#24752)
* Fixed odbc configurations for compat package

* Run UpdateVSConfigurations

* Remove Default Configurations to help VS... comment from csproj's

* Remove from System.Buffers as well


Commit migrated from https://github.com/dotnet/corefx/commit/bcc59b2e74090cfbcc4d6e7c245c172744e9d46b
2017-10-23 18:24:28 -07:00
Stephen Toub 2e63d7bd35 Use CancellationTokenRegistration.Token in PipeCompletionSource
Shrinks each instance by the size of a reference.


Commit migrated from https://github.com/dotnet/corefx/commit/7e050b7408ec88b07ad81d296a57a14fc644dada
2017-10-06 09:46:12 -04:00
Stephen Toub a78466de40 Expose/test CancellationTokenRegistration.Token
Commit migrated from https://github.com/dotnet/corefx/commit/2ac4caae413b4a734a0df48aee847611577cb021
2017-10-06 08:31:09 -04:00
Koundinya Veluri 0f3a2abcfa Reenable Task stack guard tests (dotnet/corefx#24087)
Fixed by https://github.com/dotnet/coreclr/pull/14015
Reenables tests in and closes https://github.com/dotnet/corefx/issues/23201

Commit migrated from https://github.com/dotnet/corefx/commit/9d02dcf8fb6035a4958e36117b857f80b5436874
2017-10-02 23:55:23 -04:00
Brian Chavez 232a1dfac0 Grammar check - "a [a,e]" rule. (dotnet/corefx#23697)
* Grammar check - "a [a,e]" rule.

* Corrected "a attributes" to "an attribute"


Commit migrated from https://github.com/dotnet/corefx/commit/be75987c628347e1d44bba15c5272ade3dcfa65c
2017-08-31 09:29:39 -04:00
Brian Chavez caeee5a506 XML doc spelling corrections - Q through Z. (dotnet/corefx#23655)
Commit migrated from https://github.com/dotnet/corefx/commit/723c7feed515abbeece068e05fdf2f918a74ca85
2017-08-29 15:40:48 -07:00
Stephen Toub fe21ecf3e3 Disable hanging "stack guard" tests (dotnet/corefx#23339)
Commit migrated from https://github.com/dotnet/corefx/commit/0547375d71a7b0ea8e81e7690e2e6b0ceb6c70e6
2017-08-17 11:14:11 -04:00
Stephen Toub 655d2e22d6 Expose ValueTask from System.Runtime in netcoreapp (dotnet/corefx#22559)
ValueTask will be used/exposed by types in System.Runtime, so it also needs to be exposed from there.  This also requires pulling down a few related types.

Commit migrated from https://github.com/dotnet/corefx/commit/f080986157a9a7edd083ef85a3316f745e5da6ad
2017-07-25 16:03:45 -04:00
Hugh Bellamy 98b18432b7 Move AssertExtensions to Corefx.Private.TestUtilities (dotnet/corefx#21799)
* Move AssertExtensions to Corefx.Private.TestUtilities

* Update csprojs

* Fix Linq.Expressions uapaot build


Commit migrated from https://github.com/dotnet/corefx/commit/7e3b0db2892c56a431f8e99af9cd9381adec385a
2017-07-03 09:27:30 -07:00
Hugh Bellamy 7cdcaf5fc5 Convert Assert.Throws<ArgumentException> to AssertExtensions (dotnet/corefx#21491)
Commit migrated from https://github.com/dotnet/corefx/commit/868f123881e520285ab09600380e38abdd457a06
2017-06-27 21:13:26 -07:00
Stephen Toub 4c19d2b5f6 Fix parameter name in Throws assert
Commit migrated from https://github.com/dotnet/corefx/commit/0620493efbd0156da46627beddd8cc0545be3600
2017-06-23 21:54:18 -04:00
Hugh Bellamy 7cbcd5ed85 Convert most Assert.Throws<ArgumentException> without param name to AssertExtensions (dotnet/corefx#21455)
* Registry

* Collections

* ComponentModel

* Configuration

* Data

* Globalization

* Drawing

* Diagnostics

* IO

* Linq

* Add System.Net param names in tests

* Move ArgumentExceptions in System.Private.Xml to AssertExtensions

* Add System.Reflection.* ArgumentException param names

* Add param names for System.Runtime* ArgumentExceptions

* Add ArgumentException param names to System.Security.*

* Add ArgumentException param names to System.Text.*

* Add param names to ArgumentExceptions in misc projects

* Add System.Threading.* ArgumentException param names

* Fix missing files

* Fixes for unix and netfx

* Fix more failures and revert a IdnaConformance tests to avoid merge conflicts with dotnet/corefx#21463


Commit migrated from https://github.com/dotnet/corefx/commit/59915687bb261efeae70565d0ca8990ac45ceb9c
2017-06-23 12:33:47 -07:00
Hugh Bellamy 6881a911b9 Fix naming
Commit migrated from https://github.com/dotnet/corefx/commit/a303589ca9ad13016dc9b4e8752f5e49ea07715b
2017-06-18 08:04:43 +07:00
Hugh Bellamy 3f9c72749e Fixup instances of [ThreadStatic] in test code
Commit migrated from https://github.com/dotnet/corefx/commit/a51ea85fe292d2c481fdffa33755a6cfa8d26135
2017-06-18 07:08:25 +07:00
Anton Lapounov af72240416 Disable TestEtw and GetTaskSchedulersForDebugger tests for UapAot (dotnet/corefx#21099)
Disable TestEtw test due to issue dotnet/corefx#20592.
Disable GetTaskSchedulersForDebugger tests due to use of reflection.

Commit migrated from https://github.com/dotnet/corefx/commit/2d791e68ff0d1945998b5912a6b7e19cb2f8f26f
2017-06-15 13:48:59 -07:00
Anton Lapounov 7479d4192f Disable 4 AsyncTaskMethodBuilder tests due to a codegen optimization issue. (dotnet/corefx#21002)
Commit migrated from https://github.com/dotnet/corefx/commit/b4d106a1817a4cfddcff786946bd78ce0e7eef77
2017-06-13 18:03:08 -04:00
Anton Lapounov 88e6ab6e20 Fix TaskRtTests.RunFromResult test for uapaot.
Commit migrated from https://github.com/dotnet/corefx/commit/9198e731b631c7741bfeacbeeef1b03dc9d5f88b
2017-06-12 21:35:16 -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
Wes Haggard 3968a70735 Refresh VS Configurations
Commit migrated from https://github.com/dotnet/corefx/commit/39d309a9be077e110bab4f05f4196bad95f0d5b4
2017-05-03 09:36:31 -07:00
Stephen Toub 4015f4de69 Disable several task tests on desktop requiring a newer version
Commit migrated from https://github.com/dotnet/corefx/commit/c0d8b3eae929ce67e0d9c9ae4a54f7e599c8cef2
2017-04-26 12:52:06 -04:00
Stephen Toub 876ce9c240 Expose Task.IsCompletedSuccessfully
Commit migrated from https://github.com/dotnet/corefx/commit/5f7986c01ee2a31abe0b54f89d5f2387c64110e5
2017-04-19 08:07:24 -04:00
Stephen Toub 63e588bc23 Disable System.Threading.Tasks tests for netfx
Commit migrated from https://github.com/dotnet/corefx/commit/87bdbd66dfb5e4568b57b64afb50d5abfe209121
2017-04-18 10:54:53 -04:00