Compiletest: Fix compare-output-by-lines directive#153797
Open
Ozzy1423 wants to merge 1 commit intorust-lang:mainfrom
Open
Compiletest: Fix compare-output-by-lines directive#153797Ozzy1423 wants to merge 1 commit intorust-lang:mainfrom
Ozzy1423 wants to merge 1 commit intorust-lang:mainfrom
Conversation
Fixes: rust-lang#148235 This was checking that the blessed stderr was a subset of the stderr. Additionally, when re-blessing it would re-bless the subset that matched. So, when an extra line or comment was added and the line numbers changed, it would bless it without the line numbers.
Collaborator
|
Some changes occurred in src/tools/compiletest cc @jieyouxu |
jieyouxu
reviewed
Mar 13, 2026
Member
|
@rustbot author |
Collaborator
|
Reminder, once the PR becomes ready for a review, use |
teor2345
reviewed
Mar 13, 2026
Contributor
Author
|
@rustbot ready |
Member
|
I think that reblessing-can-swap-order is not an ideal property, but don't want to block this PR on that. Thanks. |
Contributor
Contributor
Author
|
Note they will only swap order if you re-bless when there is an actual change. If the diagnostics only change order (due to -Zthreads), they will match by lines and won't be re-blessed. |
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 13, 2026
Compiletest: Fix compare-output-by-lines directive Fixes: rust-lang#148235 This was checking that the blessed stderr was a subset of the stderr. Additionally, when re-blessing it would re-bless the subset that matched. So, when an extra line or comment was added and the line numbers changed, it would bless it without the line numbers. I hope this is the intended behaviour now, my only concern is if the parallel frontend has cases where it sometimes emits less diagnostics than other times and so re-blessing the minimum was the intended behaviour? There used to be a flag called "compare-output-by-lines-subset" for this which used this logic. r? @jieyouxu
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 13, 2026
…uwer Rollup of 7 pull requests Successful merges: - #153650 (Streamline active job collection.) - #153707 (Remove `CycleErrorHandling`.) - #153384 (Add missing safety doc for CString::from_vec_unchecked and async_drop_in_place) - #153752 (fix(delegation): Filter Out Module Segments in Generic Args Inheritance) - #153797 (Compiletest: Fix compare-output-by-lines directive) - #153810 (compiletest: Use PYTHONPATH for lldb too, not only gdb) - #153820 (Rename `opt_span_diag_lint` into `opt_span_lint` and remove `emit_diag_lint`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #148235
This was checking that the blessed stderr was a subset of the stderr. Additionally, when re-blessing it would re-bless the subset that matched. So, when an extra line or comment was added and the line numbers changed, it would bless it without the line numbers.
I hope this is the intended behaviour now, my only concern is if the parallel frontend has cases where it sometimes emits less diagnostics than other times and so re-blessing the minimum was the intended behaviour? There used to be a flag called "compare-output-by-lines-subset" for this which used this logic.
r? @jieyouxu