Skip to content

Commit b4913ba

Browse files
authored
[browser][MT] enable more tests (#97391)
1 parent f532ff6 commit b4913ba

File tree

15 files changed

+16
-29
lines changed

15 files changed

+16
-29
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ jobs:
130130
# Always run for runtime-wasm because tests are not run in runtime
131131
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
132132

133-
# NOTE - Since threading is experimental, we don't want to block mainline work
134-
shouldContinueOnError: true
135133
scenarios:
136134
- WasmTestOnBrowser
137135
#- WasmTestOnNodeJS - this is not supported yet, https://github.com/dotnet/runtime/issues/85592

src/libraries/System.Linq.Parallel/tests/ExchangeTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public static IEnumerable<object[]> AllMergeOptions_Multiple()
9090

9191
[ConditionalTheory]
9292
[MemberData(nameof(PartitioningData), new[] { 0, 1, 2, 16, 1024 })]
93-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
9493
public static void Partitioning_Default(Labeled<ParallelQuery<int>> labeled, int count, int partitions)
9594
{
9695
if (partitions > 1 && !PlatformDetection.IsThreadingSupported)

src/libraries/System.Private.Xml/tests/XmlReader/Tests/AsyncReaderLateInitTests.cs

-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ public static void ReadAfterInitializationWithTextReaderOnAsyncReaderDoesNotThro
6969
}
7070

7171
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
72-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
7372
public static void ReadAsyncAfterInitializationWithUriThrows()
7473
{
7574
using (XmlReader reader = XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = true }))
@@ -79,7 +78,6 @@ public static void ReadAsyncAfterInitializationWithUriThrows()
7978
}
8079

8180
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
82-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
8381
public static void ReadAfterInitializationWithUriOnAsyncReaderTrows()
8482
{
8583
using (XmlReader reader = XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = true }))
@@ -89,7 +87,6 @@ public static void ReadAfterInitializationWithUriOnAsyncReaderTrows()
8987
}
9088

9189
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
92-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
9390
public static void InitializationWithUriOnNonAsyncReaderThrows()
9491
{
9592
Assert.Throws<System.Net.Http.HttpRequestException>(() => XmlReader.Create("http://test.test/test.html", new XmlReaderSettings() { Async = false }));

src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateMisc.cs

-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ public TCValidateAfterAddInvalidSchema(ITestOutputHelper output) : base(output)
419419
[InlineData("SCHEMA", "schB1_a.xsd", 1, 3, 3)]
420420
[InlineData("SCHEMA", "schM2_a.xsd", 1, 3, 3)]
421421
[InlineData("SCHEMA", "schH2_a.xsd", 1, 3, 3)]
422-
[ActiveIssue("https://github.com/dotnet/runtime/issues/75132", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
423422
public void AddValid_Import_Include_Redefine(string testDir, string testFile, int expCount, int expCountGT, int expCountGE)
424423
{
425424
string xsd = Path.Combine(path, testDir, testFile);

src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/MethodCoverage.cs

-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ public static async Task Task_WhenAny_TwoTasks_WakesOnFirstCompletion()
279279
}
280280

281281
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
282-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
283282
public static void CancellationTokenRegitration()
284283
{
285284
ManualResetEvent mre = new ManualResetEvent(false);
@@ -297,7 +296,6 @@ public static void CancellationTokenRegitration()
297296
/// verify that the taskawaiter.UnsafeOnCompleted is invoked
298297
/// </summary>
299298
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
300-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
301299
public static void TaskAwaiter()
302300
{
303301
ManualResetEvent mre = new ManualResetEvent(false);

src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/Task/AsyncEnumerableToBlockingEnumerableTests.cs

-3
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ static async IAsyncEnumerable<int> CreateSourceEnumerable()
7070
}
7171

7272
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
73-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
7473
public static void AsyncEnumerableWithDelays()
7574
{
7675
var source = new InstrumentedAsyncEnumerable<int>(CreateSourceEnumerable());
@@ -105,7 +104,6 @@ static async IAsyncEnumerable<int> CreateSourceEnumerable()
105104
}
106105

107106
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
108-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
109107
public static void AsyncEnumerableWithException()
110108
{
111109
var source = new InstrumentedAsyncEnumerable<int>(CreateSourceEnumerable());
@@ -134,7 +132,6 @@ static async IAsyncEnumerable<int> CreateSourceEnumerable()
134132
}
135133

136134
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
137-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
138135
public static void AsyncEnumerableWithCancellation()
139136
{
140137
var source = new InstrumentedAsyncEnumerable<string>(CreateSourceEnumerable());

src/libraries/System.Runtime/tests/System.Threading.Tasks.Tests/Task/TaskContinueWithTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,6 @@ public static void LongContinuationChain_Unwrap_DoesNotStackOverflow()
12551255
}
12561256

12571257
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
1258-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
12591258
public static void LongContinuationChain_Await_DoesNotStackOverflow()
12601259
{
12611260
const int DiveDepth = 12_000;

src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,7 @@ public static void RunParallelLoopCancellationTests()
12131213
/// Test to ensure that the task ID can be accessed from inside the task
12141214
/// </summary>
12151215
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
1216+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91583", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
12161217
public static void TaskIDFromExternalContextTest()
12171218
{
12181219
int? withinTaskId = int.MinValue;

src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitioner1Chunk.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static void oneMoveNext(int length, bool isOrderable)
101101
/// </summary>
102102
/// <param name="length"></param>
103103
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
104-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
104+
[ActiveIssue("https://github.com/dotnet/runtime/issues/97396", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
105105
public static void IterationsWithDependency()
106106
{
107107
static void iterationsWithDependency(int length, int dependencyIndex)

src/libraries/System.Threading.Tasks.Parallel/tests/RangePartitionerTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace System.Threading.Tasks.Tests
1010
public static class RangePartitionerTests
1111
{
1212
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
13-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
13+
[ActiveIssue("https://github.com/dotnet/runtime/issues/97440", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
1414
public static void RunPartitionerStaticTest_SingleChunking()
1515
{
1616
CountdownEvent cde = new CountdownEvent(2);

src/libraries/System.Threading/tests/MonitorTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ public static void WaitTest()
447447
Monitor.Pulse(obj);
448448
}
449449
Monitor.Exit(obj);
450+
t.Join(500);
450451
}
451452

452453
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]

src/libraries/System.Threading/tests/ReaderWriterLockSlimTests.cs

+2
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ public static void ReleaseReadersWhenWaitingWriterTimesOut()
446446
// Typical order of execution: 7
447447

448448
writeWaiterThread.Join();
449+
readerThreads[0].Join();
450+
readerThreads[1].Join();
449451
}
450452
}
451453

src/libraries/System.Threading/tests/SemaphoreSlimTests.cs

-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public static void RunSemaphoreSlimTest1_Wait_NegativeCases()
7272
}
7373

7474
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
75-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
7675
public static void RunSemaphoreSlimTest1_WaitAsync()
7776
{
7877
// Infinite timeout
@@ -91,7 +90,6 @@ public static void RunSemaphoreSlimTest1_WaitAsync()
9190
}
9291

9392
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
94-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
9593
public static void RunSemaphoreSlimTest1_WaitAsync_NegativeCases()
9694
{
9795
// Invalid timeout
@@ -464,7 +462,6 @@ private static void RunSemaphoreSlimTest7_AvailableWaitHandle_Helper(int initial
464462
/// <param name="finalCount">The final semaphore count</param>
465463
/// <returns>True if the test succeeded, false otherwise</returns>
466464
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
467-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
468465
[InlineData(5, 1000, 50, 50, 50, 0, 5, 1000)]
469466
[InlineData(0, 1000, 50, 25, 25, 25, 0, 500)]
470467
[InlineData(0, 1000, 50, 0, 0, 50, 0, 100)]
@@ -531,7 +528,6 @@ public static void RunSemaphoreSlimTest8_ConcWaitAndRelease(int initial, int max
531528
/// <param name="finalCount">The final semaphore count</param>
532529
/// <returns>True if the test succeeded, false otherwise</returns>
533530
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
534-
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
535531
[InlineData(5, 1000, 50, 50, 50, 0, 5, 500)]
536532
[InlineData(0, 1000, 50, 25, 25, 25, 0, 500)]
537533
[InlineData(0, 1000, 50, 0, 0, 50, 0, 100)]

src/libraries/System.Transactions.Local/tests/AsyncTransactionScopeTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,7 @@ public void VerifyBYOTOpenConnSimulationTest()
11231123
}
11241124

11251125
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
1126+
[ActiveIssue("https://github.com/dotnet/runtime/issues/97513", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
11261127
public async Task VerifyBYOTSyncTSNestedAsync()
11271128
{
11281129
string txId1;

src/libraries/tests.proj

+9-10
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
<HighAOTResourceRequiringProject Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />
4141
</ItemGroup>
4242

43-
<!-- Samples which are too complex for CI -->
4443
<ItemGroup Condition="'$(TargetOS)' == 'browser'">
44+
<!-- Samples which are too complex for CI -->
4545
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\console-node-ts\Wasm.Console.Node.TS.Sample.csproj" />
4646
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\browser-webpack\Wasm.Browser.WebPack.Sample.csproj" />
4747
<ProjectExclusions Include="$(MonoProjectRoot)sample\wasm\node-webpack\Wasm.Node.WebPack.Sample.csproj" />
@@ -50,6 +50,10 @@
5050

5151
<!-- These tests are completely disabled on wasm -->
5252
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Generators.Tests/System.Text.RegularExpressions.Generators.Tests.csproj" />
53+
54+
<!-- Issue: https://github.com/dotnet/runtime/issues/97295 -->
55+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Tensors\tests\System.Numerics.Tensors.Tests.csproj" />
56+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Tensors\tests\Net8Tests\System.Numerics.Tensors.Net8.Tests.csproj" />
5357
</ItemGroup>
5458

5559
<!-- Samples that require a multi-threaded runtime -->
@@ -395,10 +399,8 @@
395399
</ItemGroup>
396400

397401
<ItemGroup Condition="'$(TargetOS)' == 'browser' and '$(MonoWasmBuildVariant)' == 'multithread' and '$(RunDisabledWasmTests)' != 'true'">
398-
<!-- Issue: https://github.com/dotnet/runtime/issues/74411 -->
399-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
400-
<!-- Issue: https://github.com/dotnet/runtime/issues/74413 -->
401-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
402+
<!-- Until: https://github.com/dotnet/runtime/pull/97441 -->
403+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\tests\System.Runtime.InteropServices.JavaScript.UnitTests\System.Runtime.InteropServices.JavaScript.Tests.csproj" />
402404
<!-- Issue: https://github.com/dotnet/runtime/issues/95795 -->
403405
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Globalization.Tests\Hybrid\System.Globalization.Hybrid.WASM.Tests.csproj" />
404406
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Globalization.Calendars.Tests\Hybrid\System.Globalization.Calendars.Hybrid.WASM.Tests.csproj" />
@@ -605,14 +607,11 @@
605607
<!-- Don't want the default smoke tests - just verify that threading works -->
606608
<SmokeTestProject Remove="@(SmokeTestProject)" />
607609
<SmokeTestProject Include="$(MonoProjectRoot)sample\wasm\browser-threads\Wasm.Browser.Threads.Sample.csproj" />
608-
<!-- this sample is messy sandbox right now
609-
<SmokeTestProject Include="$(MonoProjectRoot)sample\wasm\browser-threads-minimal\Wasm.Browser.Threads.Minimal.Sample.csproj" />
610-
-->
611610
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/96628
612-
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
613611
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices.JavaScript\tests\System.Runtime.InteropServices.JavaScript.UnitTests\System.Runtime.InteropServices.JavaScript.Tests.csproj" />
614-
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
615612
-->
613+
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
614+
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
616615
</ItemGroup>
617616

618617
<!--

0 commit comments

Comments
 (0)