Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[browser][MT] enable all MT library tests on the runtime CI pipeline #91536

Merged
merged 30 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b3fb210
Non-smoke MT tests.
ilonatommy Sep 4, 2023
e0783a2
Disable tests: System.Timer, Threading, Local
ilonatommy Sep 4, 2023
7ed786e
System.Threading.Tasks is mostly fleaky, cannot block one by one.
ilonatommy Sep 5, 2023
a88c9de
Threading.Task.Parallel - ParallelForeachPartitioner and ParallelForT…
ilonatommy Sep 5, 2023
ee69cc8
No tests can be run in MT.
ilonatommy Sep 5, 2023
a5cff8c
Fails even when no tests enabled.
ilonatommy Sep 5, 2023
d908c3e
System.Runtime disable failing tests.
ilonatommy Sep 5, 2023
ab5472c
To be reverted! Apply tmp dev speedup suggested.
ilonatommy Sep 5, 2023
55d02ed
System.Runtime.Serialization.Xml.Tests disabled.
ilonatommy Sep 6, 2023
1dd26bf
System.Runtime.Extensions.Tests disabled.
ilonatommy Sep 6, 2023
147f8dd
System.Private.Xml.Tests disabled.
ilonatommy Sep 6, 2023
5dc0e52
System.Linq.Parallel.Tests disabled.
ilonatommy Sep 6, 2023
b940999
ystem.IO.Pipelines.Tests disabled
ilonatommy Sep 6, 2023
fd3da2a
System.Globalization.Tests disabled.
ilonatommy Sep 6, 2023
997426d
System.Composition.Tests disabled.
ilonatommy Sep 6, 2023
b8505f0
System.ComponentModel.TypeConverter.Tests disabled.
ilonatommy Sep 6, 2023
7eb32f5
System.Collections.NonGeneric.Tests disabled.
ilonatommy Sep 6, 2023
9dde6c3
System.Collections.Concurrent.Tests cannot define which tests are fa…
ilonatommy Sep 6, 2023
6176ab9
Microsoft.Extensions.Logging.Console.Tests disabled.
ilonatommy Sep 6, 2023
f5a8480
Microsoft.Extensions.Http.Tests disabled.
ilonatommy Sep 6, 2023
00ce2e6
Microsoft.Extensions.HostFactoryResolver.Tests disabled.
ilonatommy Sep 6, 2023
bb82483
Microsoft.Extensions.Configuration.Functional.Tests disabled.
ilonatommy Sep 6, 2023
706f516
Microsoft.Extensions.Configuration.EnvironmentVariables.Tests disabled.
ilonatommy Sep 6, 2023
3cf1ba6
Disable samples on mt.
ilonatommy Sep 6, 2023
42bf351
For non-mt it should stay excluded.
ilonatommy Sep 6, 2023
2b28b8a
Revert ab5472c6a1dcaae5289ddee2f5b200b64482eb47
ilonatommy Sep 6, 2023
6167fd5
Fix a copy-paste error.
ilonatommy Sep 7, 2023
da7cab2
Default: only smoke.
ilonatommy Sep 7, 2023
c572eaa
Duplicated job suffix, after disabling failing tests we should fail o…
ilonatommy Sep 8, 2023
55190df
Feedback - revert shouldContinueOnError removal.
ilonatommy Sep 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,14 @@ jobs:
- WasmTestOnBrowser
- WasmTestOnNodeJS

# Smoke tests only with full threading
# Library tests - full threading
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
parameters:
platforms:
- browser_wasm
#- browser_wasm_win
nameSuffix: _Threading_Smoke
nameSuffix: _Threading
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:_WasmPThreadPoolSize=8 /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
shouldRunSmokeOnly: true
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
# Always run for runtime-wasm because browser testing is not on runtime
Expand Down
5 changes: 2 additions & 3 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,13 @@ extends:
alwaysRun: ${{ variables.isRollingBuild }}
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)

# Build and Smoke Tests only - Wasm Threading Legs
# Wasm Library tests - Threading Legs
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
parameters:
platforms:
- browser_wasm
nameSuffix: _Threading_Smoke
nameSuffix: _Threading
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:_WasmPThreadPoolSize=8 /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
shouldRunSmokeOnly: true
ilonatommy marked this conversation as resolved.
Show resolved Hide resolved
alwaysRun: ${{ variables.isRollingBuild }}
scenarios:
- WasmTestOnBrowser
Expand Down
2 changes: 2 additions & 0 deletions src/libraries/Common/tests/System/TimeProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public static IEnumerable<object[]> TimersProvidersData()
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[MemberData(nameof(TimersProvidersData))]
public void TestProviderTimer(TimeProvider provider, int MaxMilliseconds)
{
Expand Down Expand Up @@ -215,6 +216,7 @@ private static void CancelAfter(TimeProvider provider, CancellationTokenSource c
#endif // NETFRAMEWORK

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[MemberData(nameof(TimersProvidersListData))]
public static void CancellationTokenSourceWithTimer(TimeProvider provider)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ public void AddEnvironmentVariablesUsingPrefixWithDoubleUnderscores_Bind_PrefixM
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void BindingDoesNotThrowIfReloadedDuringBinding()
{
var dic = new Dictionary<string, string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProvidersWithAb
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void CanOverrideValuesWithNewConfigurationProvider()
{
WriteTestFiles();
Expand Down Expand Up @@ -940,6 +941,7 @@ await WaitForChange(
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void BindingDoesNotThrowIfReloadedDuringBinding()
{
WriteTestFiles();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ public void ApplicationNameSetFromArgument()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(NoSpecialEntryPointPattern.Program))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/73420", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void NoSpecialEntryPointPatternCanRunInParallel()
{
var factory = HostFactoryResolver.ResolveServiceProviderFactory(typeof(NoSpecialEntryPointPattern.Program).Assembly, s_WaitTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ public async Task AddHttpClient_MessageHandler_Scope_TransientDependency()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddHttpClient_GetAwaiterAndResult_InSingleThreadedSynchronizationContext_ShouldNotHangs()
{
// Arrange
Expand Down Expand Up @@ -1367,6 +1368,7 @@ public void SuppressScope_True_InScope_DoesNotCreateScope()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91673", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddHttpClient_ConfigurePrimaryHttpMessageHandler_ApplyChangesPrimaryHandler()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ internal static (ConsoleLogger Logger, ConsoleSink Sink, ConsoleSink ErrorSink,
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded()
{
// Arrange
Expand All @@ -87,6 +88,7 @@ public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded()
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[MemberData(nameof(FormatterNames))]
public void InvalidLogLevel_Throws(string formatterName)
{
Expand All @@ -101,6 +103,7 @@ public void InvalidLogLevel_Throws(string formatterName)
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[MemberData(nameof(FormatterNamesAndLevels))]
public void NoMessageOrException_Noop(string formatterName, LogLevel level)
{
Expand All @@ -120,6 +123,7 @@ public void NoMessageOrException_Noop(string formatterName, LogLevel level)
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[MemberData(nameof(FormatterNamesAndLevels))]
public void Log_LogsCorrectTimestamp(string formatterName, LogLevel level)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void AddConsoleFormatter_NullConfigure_Throws()
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[MemberData(nameof(FormatterNames))]
public void AddConsole_ConsoleLoggerOptionsFromConfigFile_IsReadFromLoggingConfiguration(string formatterName)
{
Expand Down Expand Up @@ -155,6 +156,7 @@ private class CustomOptions : ConsoleFormatterOptions
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddSimpleConsole_ChangeProperties_IsReadFromLoggingConfiguration()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -185,6 +187,7 @@ public void AddSimpleConsole_ChangeProperties_IsReadFromLoggingConfiguration()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddSimpleConsole_OutsideConfig_TakesProperty()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -215,6 +218,7 @@ public void AddSimpleConsole_OutsideConfig_TakesProperty()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddSystemdConsole_ChangeProperties_IsReadFromLoggingConfiguration()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand All @@ -241,6 +245,7 @@ public void AddSystemdConsole_ChangeProperties_IsReadFromLoggingConfiguration()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddSystemdConsole_OutsideConfig_TakesProperty()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -271,6 +276,7 @@ public void AddSystemdConsole_OutsideConfig_TakesProperty()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -299,6 +305,7 @@ public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddJsonConsole_OutsideConfig_TakesProperty()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -333,6 +340,7 @@ public void AddJsonConsole_OutsideConfig_TakesProperty()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddConsole_NullFormatterNameUsingSystemdFormat_AnyDeprecatedPropertiesOverwriteFormatterOptions()
{
var configs = new[] {
Expand Down Expand Up @@ -378,6 +386,7 @@ public void AddConsole_MaxQueueLengthSetToNegativeOrZero_Throws(int invalidMaxQu
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddConsole_MaxQueueLengthLargerThanZero_ConfiguredProperly()
{
var configs = new[] {
Expand All @@ -399,6 +408,7 @@ public void AddConsole_MaxQueueLengthLargerThanZero_ConfiguredProperly()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddConsole_NullFormatterName_UsingSystemdFormat_IgnoreFormatterOptionsAndUseDeprecatedInstead()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -431,6 +441,7 @@ public void AddConsole_NullFormatterName_UsingSystemdFormat_IgnoreFormatterOptio
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void AddConsole_NullFormatterName_UsingDefaultFormat_IgnoreFormatterOptionsAndUseDeprecatedInstead()
{
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
Expand Down Expand Up @@ -470,6 +481,7 @@ public void AddConsole_NullFormatterName_UsingDefaultFormat_IgnoreFormatterOptio
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[InlineData("missingFormatter")]
[InlineData("simple")]
[InlineData("Simple")]
Expand Down Expand Up @@ -513,6 +525,7 @@ public void AddConsole_FormatterNameIsSet_UsingDefaultFormat_IgnoreDeprecatedAnd
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[InlineData("missingFormatter")]
[InlineData("systemd")]
[InlineData("Systemd")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class ConsoleLoggerProcessorTests
private const string _loggerName = "test";

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
public void LogAfterDisposeWritesLog()
{
// Arrange
Expand Down Expand Up @@ -63,6 +64,7 @@ public void LogsFlushedAfterDispose()
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
[InlineData(-1)]
[InlineData(0)]
public static void MaxQueueLength_SetInvalid_Throws(int invalidMaxQueueLength)
Expand Down
Loading
Loading