Skip to content

Conversation

@NachoEchevarria
Copy link
Collaborator

@NachoEchevarria NachoEchevarria commented Nov 19, 2025

Summary of changes

We get some CI errors in tests caused by a non 0 exit code from a sample but we get no output from the sample itself.

This PR improves error reporting when tests fail due to non-zero exit codes by ensuring that process stdout and stderr are logged to the test output before assertions fail. This makes debugging CI failures significantly easier, especially for signal-related crashes (SIGABRT, SIGSEGV, etc.).

Reason for change

Implementation details

Test coverage

Other details

@NachoEchevarria NachoEchevarria marked this pull request as ready for review November 20, 2025 10:31
@NachoEchevarria NachoEchevarria requested review from a team as code owners November 20, 2025 10:31
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

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

Thanks!


if (Process.ExitCode != 0)
{
_output.WriteLine($"[DebuggerSampleProcessHelper] Process exited with code {Process.ExitCode} (0x{Process.ExitCode:X})");
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if _output is always non null? 🤔 If it is this is all good, otherwise we should maybe add a null check in the if block 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should never be null. If it is, something pretty weird is going on.

Copy link
Collaborator

@gleocadie gleocadie left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants