diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 5199430949475..d6009aca5b521 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "1.0.0-prerelease.20352.2", + "version": "1.0.0-prerelease.20403.2", "commands": [ "xharness" ] diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 62948380391f6..ef6271c1e2eba 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -186,13 +186,13 @@ https://github.com/mono/linker 7c9b806037e88df7eb40a8151808730133676668 - + https://github.com/dotnet/xharness - 2cb87a26217ee107e7d764770c44d986b4333c10 + abc6d581ce00214ef763fb8510d1ba0aa54e7717 - + https://github.com/dotnet/xharness - 2cb87a26217ee107e7d764770c44d986b4333c10 + abc6d581ce00214ef763fb8510d1ba0aa54e7717 diff --git a/eng/Versions.props b/eng/Versions.props index dac2f73712b32..6a05c5233477c 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -131,8 +131,8 @@ 4.9.4 16.8.0-preview-20200730-03 - 1.0.0-prerelease.20402.1 - 1.0.0-prerelease.20402.1 + 1.0.0-prerelease.20403.2 + 1.0.0-prerelease.20403.2 2.4.1 2.4.2 1.3.0 diff --git a/src/libraries/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs b/src/libraries/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs index eb1def0b9cd2e..d929d30d22d64 100644 --- a/src/libraries/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs +++ b/src/libraries/System.Threading.Tasks.Extensions/tests/AsyncValueTaskMethodBuilderTests.cs @@ -399,7 +399,6 @@ async ValueTask ValueTaskReturningAsyncMethod(int result) } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public static async Task AwaitTasksAndValueTasks_InTaskAndValueTaskMethods() { for (int i = 0; i < 2; i++) @@ -522,7 +521,6 @@ async ValueTask ValueTaskInt32ReturningMethod() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task NonGeneric_ConcurrentBuilders_WorkCorrectly() { await Task.WhenAll(Enumerable.Range(0, Environment.ProcessorCount).Select(async _ => @@ -540,7 +538,6 @@ static async ValueTask ValueTaskAsync() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_ConcurrentBuilders_WorkCorrectly() { await Task.WhenAll(Enumerable.Range(0, Environment.ProcessorCount).Select(async _ => diff --git a/src/libraries/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs b/src/libraries/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs index 4f3e9366b5ff3..b43ca1f952db8 100644 --- a/src/libraries/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs +++ b/src/libraries/System.Threading.Tasks.Extensions/tests/ManualResetValueTaskSourceTests.cs @@ -11,7 +11,6 @@ namespace System.Threading.Tasks.Sources.Tests public class ManualResetValueTaskSourceTests { [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task ReuseInstanceWithResets_Success() { var mrvts = new ManualResetValueTaskSource(); @@ -84,7 +83,6 @@ public async Task SetResult_BeforeOnCompleted_ResultAvailableSynchronously() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task SetResult_AfterOnCompleted_ResultAvailableAsynchronously() { var mrvts = new ManualResetValueTaskSource(); @@ -133,7 +131,6 @@ public async Task SetException_BeforeOnCompleted_ResultAvailableSynchronously() } [Fact] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task SetException_AfterOnCompleted_ResultAvailableAsynchronously() { var mrvts = new ManualResetValueTaskSource(); @@ -415,7 +412,6 @@ protected override void QueueTask(Task task) [InlineData(false, true)] [InlineData(true, false)] [InlineData(true, true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task AsyncEnumerable_Success(bool awaitForeach, bool asyncIterator) { IAsyncEnumerable enumerable = asyncIterator ? diff --git a/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs b/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs index 41325575f978c..9d4d485b2c618 100644 --- a/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs +++ b/src/libraries/System.Threading.Tasks.Extensions/tests/ValueTaskTests.cs @@ -371,7 +371,6 @@ public void Generic_CreateFromValueTaskSource_AsTaskNotIdempotent() // validates [Theory] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task NonGeneric_CreateFromValueTaskSource_Success(bool sync) { var vt = new ValueTask(sync ? ManualResetValueTaskSourceFactory.Completed(0) : ManualResetValueTaskSourceFactory.Delay(1, 0), 0); @@ -386,7 +385,6 @@ public async Task NonGeneric_CreateFromValueTaskSource_Success(bool sync) [Theory] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_CreateFromValueTaskSource_Success(bool sync) { var vt = new ValueTask(sync ? ManualResetValueTaskSourceFactory.Completed(42) : ManualResetValueTaskSourceFactory.Delay(1, 42), 0); @@ -401,7 +399,6 @@ public async Task Generic_CreateFromValueTaskSource_Success(bool sync) [Theory] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task NonGeneric_CreateFromValueTaskSource_Faulted(bool sync) { var vt = new ValueTask(sync ? ManualResetValueTaskSourceFactory.Completed(0, new FormatException()) : ManualResetValueTaskSourceFactory.Delay(1, 0, new FormatException()), 0); @@ -420,7 +417,6 @@ public async Task NonGeneric_CreateFromValueTaskSource_Faulted(bool sync) [Theory] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_CreateFromValueTaskSource_Faulted(bool sync) { var vt = new ValueTask(sync ? ManualResetValueTaskSourceFactory.Completed(0, new FormatException()) : ManualResetValueTaskSourceFactory.Delay(1, 0, new FormatException()), 0); @@ -439,7 +435,6 @@ public async Task Generic_CreateFromValueTaskSource_Faulted(bool sync) [Theory] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task NonGeneric_CreateFromValueTaskSource_Canceled(bool sync) { var vt = new ValueTask(sync ? ManualResetValueTaskSourceFactory.Completed(0, new OperationCanceledException()) : ManualResetValueTaskSourceFactory.Delay(1, 0, new OperationCanceledException()), 0); @@ -458,7 +453,6 @@ public async Task NonGeneric_CreateFromValueTaskSource_Canceled(bool sync) [Theory] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_CreateFromValueTaskSource_Canceled(bool sync) { var vt = new ValueTask(sync ? ManualResetValueTaskSourceFactory.Completed(0, new OperationCanceledException()) : ManualResetValueTaskSourceFactory.Delay(1, 0, new OperationCanceledException()), 0); @@ -578,7 +572,6 @@ ValueTask Create() => [InlineData(null)] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task NonGeneric_CreateFromTask_Await_Normal(bool? continueOnCapturedContext) { var t = new ValueTask(Task.Delay(1)); @@ -593,7 +586,6 @@ public async Task NonGeneric_CreateFromTask_Await_Normal(bool? continueOnCapture [InlineData(null)] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_CreateFromTask_Await_Normal(bool? continueOnCapturedContext) { var t = new ValueTask(Task.Delay(1).ContinueWith(_ => 42)); @@ -608,7 +600,6 @@ public async Task Generic_CreateFromTask_Await_Normal(bool? continueOnCapturedCo [InlineData(null)] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task CreateFromValueTaskSource_Await_Normal(bool? continueOnCapturedContext) { var mre = new ManualResetValueTaskSource(); @@ -625,7 +616,6 @@ public async Task CreateFromValueTaskSource_Await_Normal(bool? continueOnCapture [InlineData(null)] [InlineData(false)] [InlineData(true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_CreateFromValueTaskSource_Await_Normal(bool? continueOnCapturedContext) { var mre = new ManualResetValueTaskSource(); @@ -815,7 +805,6 @@ await Task.Run(async () => [InlineData(CtorMode.Result, true)] [InlineData(CtorMode.Task, true)] [InlineData(CtorMode.ValueTaskSource, true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_Awaiter_ContinuesOnCapturedContext(CtorMode mode, bool sync) { await Task.Run(async () => @@ -854,7 +843,6 @@ await Task.Run(async () => [InlineData(CtorMode.Result, false, true)] [InlineData(CtorMode.Task, false, true)] [InlineData(CtorMode.ValueTaskSource, false, true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task NonGeneric_ConfiguredAwaiter_ContinuesOnCapturedContext(CtorMode mode, bool continueOnCapturedContext, bool sync) { await Task.Run(async () => @@ -893,7 +881,6 @@ await Task.Run(async () => [InlineData(CtorMode.Result, false, true)] [InlineData(CtorMode.Task, false, true)] [InlineData(CtorMode.ValueTaskSource, false, true)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/38931", TestPlatforms.Browser)] public async Task Generic_ConfiguredAwaiter_ContinuesOnCapturedContext(CtorMode mode, bool continueOnCapturedContext, bool sync) { await Task.Run(async () => diff --git a/src/mono/netcore/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs b/src/mono/netcore/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs index 776935b3de7e2..475f0c8af1edd 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs @@ -33,7 +33,12 @@ private TimerQueue(int id) // Called by mini-wasm.c:mono_set_timeout_exec private static void TimeoutCallback() { - Run(); + int shortestWaitDurationMs = PumpTimerQueue(); + + if (shortestWaitDurationMs != int.MaxValue) + { + SetTimeout((int)shortestWaitDurationMs, 0); + } } private bool SetTimer(uint actualDuration) @@ -53,14 +58,18 @@ private bool SetTimer(uint actualDuration) return true; } - private static void Run() + private static int PumpTimerQueue() // NOTE: this method is called via reflection by test code { - int shortestWaitDurationMs; + if (s_scheduledTimersToFire == null) + { + return int.MaxValue; + } + List timersToFire = s_scheduledTimersToFire!; List timers; timers = s_scheduledTimers!; long currentTimeMs = TickCount64; - shortestWaitDurationMs = int.MaxValue; + int shortestWaitDurationMs = int.MaxValue; for (int i = timers.Count - 1; i >= 0; --i) { TimerQueue timer = timers[i]; @@ -94,10 +103,7 @@ private static void Run() timersToFire.Clear(); } - if (shortestWaitDurationMs != int.MaxValue) - { - SetTimeout((int)shortestWaitDurationMs, 0); - } + return shortestWaitDurationMs; } } }