Skip to content

--blame-hang equivalent for AoT testing #3095

@martincostello

Description

@martincostello

Summary

Add a similar capability to dotnet test's --blame-hang functionality to make it easier to diagnose the source of hanging tests.

Background and Motivation

I have a test suite using the new AoT test runner where sometimes something hangs in one of the tests, but only when it's running in native AoT. The effectively identical tests I have that use xunit via dotnet test don't exhibit the same behaviour where I could use --blame-hang.

Additionally, using [Timeout(...)] doesn't seem to be having any effect. I'd expect the hanging test to timeout and fail, not hang.

Proposed Feature

A similar (I assume identical would be too difficult within a native AoT environment) set of command-line switches to allow for dumps to be generated to identify tests that hang. For example:

my-aot-tests.exe --blame-hang --blame-hang-dump-type <DUMP_TYPE> --blame-hang-timeout <TIMESPAN>

Alternative Designs

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions