Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

HangDump extension is currently broken under dotnet test because IsEnabledAsync() checks !IsOptionSet(ServerOptionKey), which returns false when --server is set (as it is with dotnet test).

Test Added

Added an integration acceptance test HangDump_WithDotnetTest_CreateDump to Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs that demonstrates the bug.

The test:

  • Runs dotnet test with hangdump options passed after the -- separator
  • Sets environment variables to trigger a hang scenario (same as existing HangDump tests)
  • Verifies that a dump file is created when running under dotnet test
  • Currently fails because HangDump is disabled under dotnet test (demonstrating the bug)

Test Command

dotnet test "{project}" -p:Configuration=Release -- --hangdump --hangdump-timeout 8s --results-directory "{resultDirectory}"

Current Broken Logic

public Task<bool> IsEnabledAsync() => Task.FromResult(
    _commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
    !_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey));

Expected Pattern

Should match RetryOrchestrator pattern to support dotnet test:

!(_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey) && 
  !_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.DotNetTestPipeOptionKey))

This differentiates between generic server mode (disabled) and dotnet test mode (enabled).

Note: Per issue instructions, only a test was added to demonstrate the bug. Production code changes require separate PR.

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Add test for hangdump for dotnet test</issue_title>
<issue_description>I think this is currently broken and the hangdump extension is never enabled under dotnet test.

public Task<bool> IsEnabledAsync() => Task.FromResult(_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey));

</issue_description>

<agent_instructions>Do not change production code. Only attempt to add a test.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Youssef1313 Note: there is another use of `IsOptionSet(ServerOptionKey)` in the constructor. @Youssef1313 We have similar usage in `HangDumpEnvironmentVariableProvider` @Youssef1313 We should probably use `_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey) && !_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.DotNetTestPipeOptionKey)` instead. Or, alternatively, rely on the actual value of `--server` (for dotnet test, it's `dotnettestcli`), similar to what we do in TestHostBuilder:
        bool hasServerFlag = commandLineHandler.TryGetOptionArgumentList(PlatformCommandLineProvider.ServerOptionKey, out string[]? protocolName);
        bool isJsonRpcProtocol = protocolName is null || protocolName.Length == 0 || protocolName[0].Equals(PlatformCommandLineProvider.JsonRpcProtocolName, StringComparison.OrdinalIgnoreCase);
```</comment_new>
</comments>

Original prompt

This section details on the original issue you should resolve

<issue_title>Add test for hangdump for dotnet test</issue_title>
<issue_description>I think this is currently broken and the hangdump extension is never enabled under dotnet test.

public Task<bool> IsEnabledAsync() => Task.FromResult(_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey));

</issue_description>

<agent_instructions>Do not change production code. Only attempt to add a test.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Youssef1313 Note: there is another use of `IsOptionSet(ServerOptionKey)` in the constructor. @Youssef1313 We have similar usage in `HangDumpEnvironmentVariableProvider` @Youssef1313 We should probably use `_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey) && !_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.DotNetTestPipeOptionKey)` instead. Or, alternatively, rely on the actual value of `--server` (for dotnet test, it's `dotnettestcli`), similar to what we do in TestHostBuilder:
        bool hasServerFlag = commandLineHandler.TryGetOptionArgumentList(PlatformCommandLineProvider.ServerOptionKey, out string[]? protocolName);
        bool isJsonRpcProtocol = protocolName is null || protocolName.Length == 0 || protocolName[0].Equals(PlatformCommandLineProvider.JsonRpcProtocolName, StringComparison.OrdinalIgnoreCase);
```</body></comment_new>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add test for hangdump in dotnet test Add tests demonstrating HangDump is disabled under dotnet test Nov 21, 2025
Copilot AI requested a review from Youssef1313 November 21, 2025 13:26
Copilot finished work on behalf of Youssef1313 November 21, 2025 13:26
Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

@copilot This needs to be an integration acceptance test, not unit test.

Copy link
Contributor Author

Copilot AI commented Nov 21, 2025

@copilot This needs to be an integration acceptance test, not unit test.

Changed to integration acceptance test in commit eb7bc8d. The new test HangDump_WithDotnetTest_CreateDump runs dotnet test with hangdump options and verifies dump file creation.

Copilot AI changed the title Add tests demonstrating HangDump is disabled under dotnet test Add integration acceptance test demonstrating HangDump is disabled under dotnet test Nov 21, 2025
Copilot finished work on behalf of Youssef1313 November 21, 2025 15:29
Copilot AI requested a review from Youssef1313 November 21, 2025 15:29
@Youssef1313
Copy link
Member

Confirmed test is failing:

src/TestFramework/TestFramework/Assertions/Assert.AreEqual.cs(665,1): error : Assert.AreEqual failed. Expected:<7>. Actual:<0>. 'expected' expression: 'exitCode', 'actual' expression: 'testHostResult.ExitCode'. Expression 'AssertExitCodeIs' failed for member 'HangDump_WithDotnetTest_CreateDump' at line 57 of file '/_/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs'. Output of the dotnet muxer is:
Args: test --project "/mnt/vss/_work/1/s/artifacts/tmp/Debug/testsuite/PCxSP/AssetFixture" --hangdump --hangdump-timeout 8s --results-directory "/mnt/vss/_work/1/s/artifacts/tmp/Debug/testsuite/PCxSP/AssetFixture/da4b40007dfd4b7ea319f0021428af17/net9.0" -p:MSBuildTreatWarningsAsErrors=true -p:SuppressNETCoreSdkPreviewMessage=true -bl:"/mnt/vss/_work/1/s/artifacts/tmp/Debug/testsuite/HangDump_WithDotnetTest_CreateDump-22.binlog"
ExitCode: 0
StandardOutput: Telemetry is: Disabled
Running tests from /mnt/vss/_work/1/s/artifacts/tmp/Debug/testsuite/PCxSP/AssetFixture/bin/Debug/net9.0/HangDump.dll (net9.0|x64)
[�[32m+0�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(0s)
[�[32m+0�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(1m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(2m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(3m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(4m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(5m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(6m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(7m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(8m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 02s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 05s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 08s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 11s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 14s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 17s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 20s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 23s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 26s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 29s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 32s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 35s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 38s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 41s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 44s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 47s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 50s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 53s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 56s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(9m 59s)
[�[32m+1�[m/�[31mx0�[m/�[33m?0�[m] HangDump.dll (net9.0|x64)(10m 02s)
�[m/mnt/vss/_work/1/s/artifacts/tmp/Debug/testsuite/PCxSP/AssetFixture/bin/Debug/net9.0/HangDump.dll (net9.0|x64) �[32mpassed�[m �[90m(10m 04s 101ms)�[m
�[32mTest run summary: Passed!
�[m  total: 2
  failed: 0
�[32m  succeeded: 2
�[m  skipped: 0
  duration: 10m 04s 660ms

@Youssef1313 Youssef1313 changed the title Add integration acceptance test demonstrating HangDump is disabled under dotnet test Fix hangdump not working under dotnet test with .NET 10 SDK Nov 21, 2025
@Youssef1313 Youssef1313 marked this pull request as ready for review November 21, 2025 16:46
@Youssef1313 Youssef1313 requested a review from nohwnd November 21, 2025 16:47
[TestMethod]
public async Task HangDump_WithDotnetTest_CreateDump()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
Copy link
Member

Choose a reason for hiding this comment

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

Nit: we can use the oscondition attribute here instead

_clock = clock;
if (_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName) &&
!_commandLineOptions.IsOptionSet(PlatformCommandLineProvider.ServerOptionKey))
if (_commandLineOptions.IsOptionSet(HangDumpCommandLineProvider.HangDumpOptionName))
Copy link
Member

Choose a reason for hiding this comment

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

The description mentions checking both server and pipe cli options but the 2 parts of the implementation don't do that. Is this expected?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's worth any special casing here at all. Even if this ended up being used in Test Explorer and it doesn't work, I don't think it's a big concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test for hangdump for dotnet test

3 participants