Skip to content

Adjust MTP exit code logic#52402

Merged
Youssef1313 merged 2 commits intomainfrom
dev/ygerges/exitcode
Jan 19, 2026
Merged

Adjust MTP exit code logic#52402
Youssef1313 merged 2 commits intomainfrom
dev/ygerges/exitcode

Conversation

@Youssef1313
Copy link
Member

Related to #52107

But this won't change the behavior described there. This PR will only cause exit code to be transformed to generic failure only in case it would have been a success otherwise.

But if all test apps exited with the same non-success exit code, we will preserve that.

Copilot AI review requested due to automatic review settings January 12, 2026 10:48
@Youssef1313 Youssef1313 requested a review from a team as a code owner January 12, 2026 10:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adjusts the exit code logic for Microsoft Testing Platform (MTP) test runs to preserve specific non-success exit codes when handshake failures occur. Previously, any handshake failure would override the exit code with ExitCode.GenericFailure, but this change only sets GenericFailure when the exit code would have been Success. This addresses issue #52107 where users expect the specific exit code to be preserved when all test applications fail with the same non-zero exit code.

Changes:

  • Modified the handshake failure exit code handling to conditionally set GenericFailure only when the current exit code is Success, preserving specific failure codes otherwise

@Youssef1313 Youssef1313 merged commit 93a9a5a into main Jan 19, 2026
26 checks passed
@Youssef1313 Youssef1313 deleted the dev/ygerges/exitcode branch January 19, 2026 09:20
@Youssef1313
Copy link
Member Author

/backport to release/10.0.2xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.2xx (link to workflow run)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants