Skip to content

[libraries] Add ConditionalFact to wasm failing tests - #37822

Merged
mdh1418 merged 6 commits into
dotnet:masterfrom
mdh1418:mdhwang/skip_thread_not_supported_wasm
Jun 17, 2020
Merged

mdh1418 merged 6 commits into
dotnet:masterfrom
mdh1418:mdhwang/skip_thread_not_supported_wasm

Conversation

@mdh1418

@mdh1418 mdh1418 commented Jun 12, 2020

Copy link
Copy Markdown
Member

This PR looks to skip tests failing on wasm browser by adding ConditionalFact attributes to the failing tests based off of failing test names here

@ghost

ghost commented Jun 12, 2020

Copy link
Copy Markdown

Tagging subscribers to this area: @safern, @ViktorHofer
Notify danmosemsft if you want to be subscribed.

@mdh1418
mdh1418 requested a review from steveisok June 12, 2020 19:08
@mdh1418
mdh1418 force-pushed the mdhwang/skip_thread_not_supported_wasm branch from 9ef2081 to eb8c22e Compare June 12, 2020 19:11
@mdh1418
mdh1418 requested a review from vargaz June 12, 2020 19:20
@mdh1418
mdh1418 requested a review from akoeplinger June 12, 2020 19:20
@mdh1418
mdh1418 force-pushed the mdhwang/skip_thread_not_supported_wasm branch 3 times, most recently from 29f35ae to e7851ce Compare June 12, 2020 21:56
@akoeplinger akoeplinger changed the title [libraries] Add ConditionalFact to warm failing tests [libraries] Add ConditionalFact to wasm failing tests Jun 15, 2020

@akoeplinger akoeplinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few build failures to fix, looks good otherwise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a build failure in this file because it doesn't have using System; at the top so the PlatformDetection type isn't found.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other files also don't have using System; at the top, like src/libraries/System.Reflection.Metadata/tests/Utilities/AbstractMemoryBlockTests.cs and src/libraries/System.Collections.Concurrent/tests/ConcurrentDictionary/ConcurrentDictionaryTests.cs. Does RedactedLogValueIntegrationTest.cs need it specifically because its namespace is not part of Systems?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is PlatformDetection.IsThreadingSupported considered just as some common approach to disable all the failing tests at the moment regardless the area?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used for all tests that rely on starting new threads since WebAssembly doesn't support more than one thread. We have an exception with a message like "Cannot start threads on this runtime" when someone tries to start a new thread .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular Console test fails with PNSE. If we use conditional fact then I need to close #37645

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know which approach is preferred, but I can remove this change if #37645 is preferred. This PR was based solely off the failing test list, without looking into the test failures, so it could be that other tests fail with PNSE as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm we should only disable tests in this PR that failed with the "Cannot start threads on this runtime", not any PNSE, since we use PNSE for other cases that have nothing to do with threading. Thanks @MaximLipnin for noticing it.

@mdh1418
mdh1418 force-pushed the mdhwang/skip_thread_not_supported_wasm branch 2 times, most recently from 6300f89 to 340be0c Compare June 15, 2020 17:52
@mdh1418
mdh1418 force-pushed the mdhwang/skip_thread_not_supported_wasm branch from 340be0c to 113928a Compare June 16, 2020 19:07
public class DependencyCheckTest
{
[ConditionalFact(Helpers.OdbcNotAvailable)]
public static bool IsObdcNotAvailableAndThreadingSupported => Helpers.CheckOdbcNotAvailable() && PlatformDetection.IsThreadingSupported;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit add an extra line.

@safern

safern commented Jun 16, 2020

Copy link
Copy Markdown
Member

@mdh1418 do the current disabled tests are only tests that fail with: Cannot start threads on this runtime? Just making sure it was not just Console tests that failed with PNSE that slipped through: #37822 (comment)

@mdh1418

mdh1418 commented Jun 16, 2020

Copy link
Copy Markdown
Member Author

@safern I believe so. Others (@vargaz and @akoeplinger ) have grepped the failures for WASM: System.PlatformNotSupportedException : Cannot start threads on this runtime. and WASM: System.PlatformNotSupportedException : Cannot wait on monitors on this runtime. and found that the other exceptions outside of System.Console are threading related ones. As such, the System.Console changes were undone.

@mdh1418
mdh1418 merged commit 480c49b into dotnet:master Jun 17, 2020
@mdh1418
mdh1418 deleted the mdhwang/skip_thread_not_supported_wasm branch June 17, 2020 17:48
@mdh1418
mdh1418 restored the mdhwang/skip_thread_not_supported_wasm branch June 18, 2020 20:41
mdh1418 pushed a commit to mdh1418/runtime that referenced this pull request Jun 19, 2020
@mdh1418
mdh1418 deleted the mdhwang/skip_thread_not_supported_wasm branch September 11, 2020 15:43
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants