Skip to content

Enhance UI test output handling for runtime errors #145431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AMS21
Copy link

@AMS21 AMS21 commented Aug 15, 2025

When a UI test runs a compiled binary and an error/forbid pattern check fails, the failure message previously only showed compiler output, hiding the executed programs stdout/stderr. This makes it harder to see near-miss or unexpected runtime lines.

Fixed #141531
Supersedes #141977

@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2025

r? @Kobzol

rustbot has assigned @Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 15, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot

This comment has been minimized.

@Kobzol
Copy link
Member

Kobzol commented Aug 15, 2025

Makes sense to me. It would be nicer to return a tuple (String, ProcRes) from the if condition, but that would require cloning a ProcRes for all non-executed UI tests, which could add up a bit.

I'll let @jieyouxu leave comments, since you reviewed the previous variant of this PR.

@AMS21
Copy link
Author

AMS21 commented Aug 15, 2025

Makes sense to me. It would be nicer to return a tuple (String, ProcRes) from the if condition, but that would require cloning a ProcRes for all non-executed UI tests, which could add up a bit.

Yes, avoiding the clone was the exact reason I implemented it this way.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Seems fine, thanks. Just a tiny naming nit

@jieyouxu jieyouxu assigned jieyouxu and unassigned Kobzol Aug 15, 2025
When a UI test runs a compiled binary and an error/forbid pattern
check fails, the failure message previously only showed compiler output,
hiding the executed programs stdout/stderr. This makes it harder to
see near-miss or unexpected runtime lines.
@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 15, 2025

📌 Commit dbd5add has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2025
Kobzol added a commit to Kobzol/rust that referenced this pull request Aug 15, 2025
Enhance UI test output handling for runtime errors

When a UI test runs a compiled binary and an error/forbid pattern check fails, the failure message previously only showed compiler output, hiding the executed programs stdout/stderr. This makes it harder to see near-miss or unexpected runtime lines.

Fixed rust-lang#141531
Supersedes rust-lang#141977
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI tests that execute don't include the stdout/err of the executed program in the error message if they fail
5 participants