-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Enable test hang support for libraries tests #126272
Copy link
Copy link
Open
Labels
area-Infrastructure-librariesuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
We have next to no support for dumps of hanging tests/child processes in libraries test runs. (there is a little bit in RemoteExecutor that only works on Windows)
On xunit v2 the answer would likely be wrapping with vstest which has timeout/dump feature. But once #125019 is merged and libraries are on xunit v3 it seems adding full hang support is straightforward. here is the work to do then:
- merge Move libraries tests to xunit3 #125019 to get onto xunit v3 (by far the hard part)
- add
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Version="..." />toxunit.propsor whatever - add
--hangdump --hangdump-timeout 10m --hangdump-type Full --hangdump-filename $HELIX_DUMP_FOLDER/hangdump.dmpwhere timeout is a bit less than the Helix timeout (which varies by arch) toxunit.console.targets - for the dump code in
RemoteExecutortoday we have two options
a. remove it, because HangDump dumps all the processes in the tree on a test hang
b. keep it, because it gives us a fine grained timeout, and a dump with only a single test failure, other tests continue, that is really nice. If we do this option, we should move from the current Win32 minidump API to useDiagnosticsClient(https://github.com/dotnet/diagnostics/blob/3d151d818166737df8a248d1f7a14f958012ebd5/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs#L169) the same asHangDumpdoes, which would give us dumps on all OS. And optionally-optionally, consider dumps on indirect children here.
==== unrelated ===
- there is also Microsoft.Testing.Extensions.CrashDump package but it's not clear what this would add (if anything) over our current use of DOTNET_DbgEnableMiniDump=1
- how CoreCLR gets hang dumps today - they wrap corerun executions in a timeout that then gets the dumps - ultimately through the same IPC that dotnet dump etc does. What we need to do for libraries is something analogous that fits around xunit/remote exec
- for crash dumps -- DOTNET_DbgEnableMiniDump=1 gets us these for all processes - -the test process, child processes, on all OS today. Nothing to do
summarizing notes from #121873
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-Infrastructure-librariesuntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner