Skip to content

Conversation

Zalathar
Copy link
Contributor

While working on some compiletest stuff, I noticed that when bootstrap prints a failed test's captured output, there's no indication of where that output actually ends.

In addition to indicating where the captured output ends, this end marker also makes it easier to see the relevant test name when scrolling upwards in terminal output.

@rustbot
Copy link
Collaborator

rustbot commented Aug 27, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
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 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 27, 2025
@Zalathar
Copy link
Contributor Author

Relevant output snippet before and after the change:

BEFORE
failures:

---- [coverage-run] tests/coverage/trivial.rs stdout ----
Saved the actual coverage to `/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/test/coverage/trivial.coverage-run/trivial.coverage`
diff of coverage:

1	   LL|       |//@ edition: 2021
-	   LL|       |
+	   LL|       |// (fake change)
3	   LL|      1|fn main() {}
4	
5	


The actual coverage differed from the expected coverage

error: an error occurred comparing coverage output.
status: exit status: 0
command: "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/llvm/bin/llvm-cov" "show" "--format=text" "--show-line-counts-or-regions" "--Xdemangler" "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/stage1-tools-bin/coverage-dump" "--Xdemangler" "--demangle" "--instr-profile" "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/test/coverage/trivial.coverage-run/default.profdata" "--object" "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/test/coverage/trivial.coverage-run/a"
--- stdout -------------------------------
    1|       |//@ edition: 2021
    2|       |// (fake change)
    3|      1|fn main() {}
------------------------------------------
stderr: none



failures:
    [coverage-run] tests/coverage/trivial.rs
AFTER
failures:

---- [coverage-run] tests/coverage/trivial.rs stdout ----
Saved the actual coverage to `/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/test/coverage/trivial.coverage-run/trivial.coverage`
diff of coverage:

1	   LL|       |//@ edition: 2021
-	   LL|       |
+	   LL|       |// (fake change)
3	   LL|      1|fn main() {}
4	
5	


The actual coverage differed from the expected coverage

error: an error occurred comparing coverage output.
status: exit status: 0
command: "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/llvm/bin/llvm-cov" "show" "--format=text" "--show-line-counts-or-regions" "--Xdemangler" "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/stage1-tools-bin/coverage-dump" "--Xdemangler" "--demangle" "--instr-profile" "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/test/coverage/trivial.coverage-run/default.profdata" "--object" "/Users/stuart/Dev/rust/rust/build/aarch64-apple-darwin/test/coverage/trivial.coverage-run/a"
--- stdout -------------------------------
    1|       |//@ edition: 2021
    2|       |// (fake change)
    3|      1|fn main() {}
------------------------------------------
stderr: none

---- [coverage-run] tests/coverage/trivial.rs stdout end ----

failures:
    [coverage-run] tests/coverage/trivial.rs

Copy link
Member

@hkBst hkBst left a comment

Choose a reason for hiding this comment

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

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.

@jieyouxu
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 28, 2025

📌 Commit 21de27c 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 28, 2025
bors added a commit that referenced this pull request Aug 28, 2025
Rollup of 6 pull requests

Successful merges:

 - #142472 (Add new `doc(attribute = "...")` attribute)
 - #145368 (CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`)
 - #145853 (Improve error messages around invalid literals in attribute arguments)
 - #145920 (bootstrap: Explicitly mark the end of a failed test's captured output)
 - #145937 (add doc-hidden to exports in attribute prelude)
 - #145965 (Move exporting of profiler and sanitizer symbols to the LLVM backend)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 347dd47 into rust-lang:master Aug 28, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 28, 2025
rust-timer added a commit that referenced this pull request Aug 28, 2025
Rollup merge of #145920 - Zalathar:failure-stdout, r=jieyouxu

bootstrap: Explicitly mark the end of a failed test's captured output

While working on some compiletest stuff, I noticed that when bootstrap prints a failed test's captured output, there's no indication of where that output actually ends.

In addition to indicating where the captured output ends, this end marker also makes it easier to see the relevant test name when scrolling upwards in terminal output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants