Skip to content

dotnet test --blame-crash collects crash DMP even after successful test runs #14578

@AArnott

Description

@AArnott

⚠ This is a regression in the .NET 5 SDK and blocks adoption of the .NET 5 SDK by this template repo and others.

When running dotnet test --blame-crash, a dmp file is produced at the conclusion of each test run even though no crash or timeout occurred.

Repro steps

git clone https://github.com/aarnott/library.template
cd library.template
git checkout c234c68d0b45e5cc621db26063c199b51b4a45fd
dotnet test --blame-crash

Observed output is below. Notice lines such as:

D:\git\lib.template\test\Library.Tests\TestResults\5d81aeb2-f632-461f-b151-7f96f9b8005f\testhost_22312_20201117T083038_crashdump.dmp

 dotnet test --blame-crash
  Determining projects to restore...
  All projects are up-to-date for restore.
  Library -> D:\git\lib.template\bin\Library\Debug\netstandard2.0\Library.dll
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
  Library.Tests -> D:\git\lib.template\bin\Library.Tests\Debug\net472\Library.Tests.dll
  Library.Tests -> D:\git\lib.template\bin\Library.Tests\Debug\netcoreapp3.1\Library.Tests.dll
  Library.Tests -> D:\git\lib.template\bin\Library.Tests\Debug\netcoreapp2.1\Library.Tests.dll
Microsoft (R) Test Execution Command Line Tool Version 16.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.

Attachments:
  D:\git\lib.template\test\Library.Tests\TestResults\98a4200c-be91-4880-917b-9633e603c62f\testhost_35340_20201117T083036_crashdump.dmp
Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 3 ms - Library.Tests.dll (netcoreapp3.1)
Test run for D:\git\lib.template\bin\Library.Tests\Debug\netcoreapp2.1\Library.Tests.dll (.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 16.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.

Attachments:
  D:\git\lib.template\test\Library.Tests\TestResults\5d81aeb2-f632-461f-b151-7f96f9b8005f\testhost_22312_20201117T083038_crashdump.dmp
Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 6 ms - Library.Tests.dll (netcoreapp2.1)
Test run for D:\git\lib.template\bin\Library.Tests\Debug\net472\Library.Tests.dll (.NETFramework,Version=v4.7.2)
Microsoft (R) Test Execution Command Line Tool Version 16.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Data collector 'Blame' message: All tests finished running, Sequence file will not be generated.

Attachments:
  D:\git\lib.template\test\Library.Tests\TestResults\22ff3440-7aec-4a15-b81e-a90ef4f607ca\testhost.net472.x86_12208_20201117T083041_crashdump.dmp
Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 8 ms - Library.Tests.dll (net472)

Build succeeded.

D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1512: Single-line comments should not be followed by blank line [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
D:\git\lib.template\test\Library.Tests\CalculatorTests.cs(14,5): warning SA1005: Single line comment should begin with a space. [D:\git\lib.template\test\Library.Tests\Library.Tests.csproj]
    6 Warning(s)
    0 Error(s)

Time Elapsed 00:00:09.54

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions