Skip to content

Improve exit code reporting to detect runtime crashes #1246

@matouskozak

Description

@matouskozak

Currently, when app crashes and there is no exit code set, XHarness will report TCP_CONNECTION_FAILED.

// TCP errors are encounter all the time but they are not always the cause of the failure
// If the app crashed, TCP_CONNECTION_FAILED and there was not other exit code we will return TCP_CONNECTION_FAILED
if (defaultExitCode == ExitCode.APP_CRASH && tcpErrorFound)
{
return ExitCode.TCP_CONNECTION_FAILED;
}

If possible, we should distinguish between failures in establishing TCP connection (device not ready/offline) and sudden lost of connection (likely runtime crash).

E.g. https://dev.azure.com/dnceng-public/public/_build/results?buildId=764645&view=ms.vss-test-web.build-test-results-tab&runId=19449412&resultId=100007&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab reports
XHarness exit code: 92 (TCP_CONNECTION_FAILED) while net.dot.System.Runtime.Tests.log shows SEGFAULT at System.Threading.LazyInitializer:EnsureLockInitialized.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions