Skip to content

normalize *.long-type.txt paths for compare-mode tests #136310

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

lqd
Copy link
Member

@lqd lqd commented Jan 30, 2025

When using a compare mode, the name of the test + compare-mode is embedded in some of rustc's output, like the location where a long type bla.long-type(-some-hash)?.txt is written to. That generally makes these tests fail under all compare-modes.

This PR fixes this by normalizing the compare-mode suffix away in the stderr output. We can also see some remnants of the long-removed nll compare mode being normalized away ^^.

I did this to fix some failures with --compare-mode next-solver (but it also fixes them with e.g. --compare-mode polonius of course):

  • it makes 9 new tests pass with the new solver
  • however, 3 tests I changed here still don't pass with the new solver (IIRC there were 2 ICEs, and some duplicate errors for the 3rd one)

(There was also one that triggered slowness in the new solver while triggering the long type failure, I'll mention this on zulip. )

this allows compare-mode to share the same subdirectory and removes
differences due to that
@rustbot
Copy link
Collaborator

rustbot commented Jan 30, 2025

r? @chenyukang

rustbot has assigned @chenyukang.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 30, 2025
@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 30, 2025

📌 Commit 4fcae66 has been approved by compiler-errors

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 Jan 30, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 31, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#132156 (When encountering unexpected closure return type, point at return type/expression)
 - rust-lang#133429 (Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle)
 - rust-lang#136281 (`rustc_hir_analysis` cleanups)
 - rust-lang#136297 (Fix a typo in profile-guided-optimization.md)
 - rust-lang#136300 (atomic: extend compare_and_swap migration docs)
 - rust-lang#136310 (normalize `*.long-type.txt` paths for compare-mode tests)
 - rust-lang#136312 (Disable `overflow_delimited_expr` in edition 2024)
 - rust-lang#136313 (Filter out RPITITs when suggesting unconstrained assoc type on too many generics)
 - rust-lang#136323 (Fix a typo in conventions.md)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4e64180 into rust-lang:master Jan 31, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 31, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 31, 2025
Rollup merge of rust-lang#136310 - lqd:long-types, r=compiler-errors

normalize `*.long-type.txt` paths for compare-mode tests

When using a compare mode, the name of the test + compare-mode is embedded in some of rustc's output, like the location where a long type `bla.long-type(-some-hash)?.txt` is written to. That generally makes these tests fail under all compare-modes.

This PR fixes this by normalizing the compare-mode suffix away in the stderr output. We can also see some remnants of the long-removed `nll` compare mode being normalized away ^^.

I did this to fix some failures with `--compare-mode next-solver` (but it also fixes them with e.g. `--compare-mode polonius` of course):
- it makes 9 new tests pass with the new solver
- however, 3 tests I changed here still don't pass with the new solver (IIRC there were 2 ICEs, and some duplicate errors for the 3rd one)

(There was also one that triggered slowness in the new solver while triggering the long type failure, I'll mention this on zulip. )
@lqd lqd deleted the long-types branch January 31, 2025 12:35
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 4, 2025
Fix last compare-mode false negatives in tests

This PR is a continuation of rust-lang#136310 and fixes the last remaining cases of false negatives when running tests under a compare-mode.

With these normalizations, all the compare-mode failures in `next-solver` (and `polonius`) should now be real, actual differences in diagnostics.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
Rollup merge of rust-lang#136504 - lqd:more-compare-modes, r=jieyouxu

Fix last compare-mode false negatives in tests

This PR is a continuation of rust-lang#136310 and fixes the last remaining cases of false negatives when running tests under a compare-mode.

With these normalizations, all the compare-mode failures in `next-solver` (and `polonius`) should now be real, actual differences in diagnostics.
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#132156 (When encountering unexpected closure return type, point at return type/expression)
 - rust-lang#133429 (Autodiff Upstreaming - rustc_codegen_ssa, rustc_middle)
 - rust-lang#136281 (`rustc_hir_analysis` cleanups)
 - rust-lang#136297 (Fix a typo in profile-guided-optimization.md)
 - rust-lang#136300 (atomic: extend compare_and_swap migration docs)
 - rust-lang#136310 (normalize `*.long-type.txt` paths for compare-mode tests)
 - rust-lang#136312 (Disable `overflow_delimited_expr` in edition 2024)
 - rust-lang#136313 (Filter out RPITITs when suggesting unconstrained assoc type on too many generics)
 - rust-lang#136323 (Fix a typo in conventions.md)

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants