Skip to content

[wasm][debugger] Fix some racy tests - #64712

Merged
radical merged 3 commits into
dotnet:mainfrom
radical:fix-exception-test
Feb 3, 2022
Merged

[wasm][debugger] Fix some racy tests#64712
radical merged 3 commits into
dotnet:mainfrom
radical:fix-exception-test

Conversation

@radical

@radicalradical commented Feb 3, 2022

Copy link
Copy Markdown
Member
  • tests that use late loaded assemblies
    DebuggerTests.MiscTests.DebugLazyLoadedAssemblyWithEmbeddedPdb
    DebuggerTests.BreakpointTests.BreakpointInAssemblyUsingTypeFromAnotherAssembly_BothDynamicallyLoaded

  • ExceptionTestAllWithReload

Fixes#62666
Fixes#62823
Fixes#62667

@ghostghost assigned radicalFeb 3, 2022
@ghostghost added the area-Debugger-mono label Feb 3, 2022
@ghost

ghost commented Feb 3, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author:radical
Assignees:radical
Labels:

area-Debugger-mono

Milestone:-

@radicalradical added the arch-wasm WebAssembly architecture label Feb 3, 2022
This test is set up to pause on all exceptions. So, it has some code to
hit `Debugger.resume` 100 times, hoping to skip all the non-user code
exceptions. But this can sometimes not be enough, and you might have
more exceptions which breaks rest of the test.
Instead, we try to resume till we won't get paused for a period of
10secs. And after that, we can call the user code, and execute rest of
the test.
Fixesdotnet#62666 .
`DebuggerTests.MiscTests.DebugLazyLoadedAssemblyWithEmbeddedPdb`
`DebuggerTests.BreakpointTests.BreakpointInAssemblyUsingTypeFromAnotherAssembly_BothDynamicallyLoaded`
These tests load assemblies dynamically, and depend on breakpoints in
those assemblies being resolved. But the tests don't wait for that to
happen. So, they can some times fail when the managed method is invoked
before the breakpoint being resolved.
Fixesdotnet#62823Fixesdotnet#62667
@radicalradical changed the title [wasm][debugger] Fix some more tests[wasm][debugger] Fix some racy testsFeb 3, 2022
@radical
radical marked this pull request as ready for review February 3, 2022 18:06
@radical
radical requested review from lewing, marek-safar and thaystg and removed request for marek-safarFebruary 3, 2022 18:06

@lewinglewing 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.

Looks good, should we add an explicit timeout option?

@radical

Copy link
Copy Markdown
MemberAuthor

should we add an explicit timeout option?

There is a per test timeout. Is that the one you meant?

@radical

Copy link
Copy Markdown
MemberAuthor

.. and I did test the case where the breakpoint is never hit, and the test fails with a timeout.

@radical

Copy link
Copy Markdown
MemberAuthor

Wasm (unrelated) test failures are because of #64769 .

The (unrelated) Mono minijit Pri0 Runtime Tests Run OSX x64 release, and Mono monointerpreter Pri0 Runtime Tests Run OSX x64 release are due to missing OSX helix queues.

@radical
radical merged commit 1af7e5d into dotnet:mainFeb 3, 2022
@radical
radical deleted the fix-exception-test branch February 3, 2022 21:39
@ghostghost locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-Debugger-mono

Projects

None yet

3 participants

@radical@lewing@thaystg