Skip to content

Fix last compare-mode false negatives in tests #136504

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 3 commits into from
Feb 4, 2025

Conversation

lqd
Copy link
Member

@lqd lqd commented Feb 3, 2025

This PR is a continuation of #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.

lqd added 3 commits February 3, 2025 19:38
- duplicates of crateresolve1 are used in a couple error-codes tests
- also fix the note in crateresolve1 to link to these other duplicates,
  now that E0523 has been merged into E0464
@rustbot
Copy link
Collaborator

rustbot commented Feb 3, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
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 Feb 3, 2025
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.

The test changes themselves look reasonable to me. However, I don't quite understand the underlying problem. These normalizations look very easy to forgor. Do we have an issue somewhere to track the compare-mode false-negative problems? That is, adding new tests look super easy to neglect doing these compare-mode normalizations, right?

@jieyouxu
Copy link
Member

jieyouxu commented Feb 3, 2025

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned BoxyUwU Feb 3, 2025
@lqd
Copy link
Member Author

lqd commented Feb 3, 2025

The problem is described in my ted talk in #136328 (comment) and I don't have a satisfying fix in mind between compiletest/rustc/tests. Maybe you will have one?

Though, it'd be cool not to be blocked on a complete compiletest fix in the meantime.

That is, adding new tests look super easy to neglect doing these compare-mode normalizations, right?

Absolutely, unfortunately.

@jieyouxu
Copy link
Member

jieyouxu commented Feb 3, 2025

The problem is described in my ted talk in #136328 (comment) and I don't have a satisfying fix in mind between compiletest/rustc/tests. Maybe you will have one?

Ah right, I completely failed to make the connection. Opened a new issue #136510. Haven't looked deeply into this yet, but that doesn't need to block this PR that is an immediate relief.

You can r=me after PR CI is green of course.

@jieyouxu
Copy link
Member

jieyouxu commented Feb 3, 2025

(To be brutally honest: I have no idea what a compare-mode is, this is a specific corner of compiletest that I have not yet looked into lmao)

@lqd
Copy link
Member Author

lqd commented Feb 3, 2025

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Feb 3, 2025

📌 Commit 62d0771 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 Feb 3, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#136398 (add UnsafeCell direct access APIs)
 - rust-lang#136465 (Some `rustc_middle` cleanups)
 - rust-lang#136479 (std::fs: further simplify dirent64 handling)
 - rust-lang#136504 (Fix last compare-mode false negatives in tests)
 - rust-lang#136511 (Add `cast_signed` and `cast_unsigned` methods for `NonZero` types)
 - rust-lang#136518 (Add note about `FnPtr` trait being exposed as public bound)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9d563bb into rust-lang:master Feb 4, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 4, 2025
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.
@lqd lqd deleted the more-compare-modes branch February 4, 2025 17:55
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request Mar 11, 2025
Rollup of 6 pull requests

Successful merges:

 - rust-lang#136398 (add UnsafeCell direct access APIs)
 - rust-lang#136465 (Some `rustc_middle` cleanups)
 - rust-lang#136479 (std::fs: further simplify dirent64 handling)
 - rust-lang#136504 (Fix last compare-mode false negatives in tests)
 - rust-lang#136511 (Add `cast_signed` and `cast_unsigned` methods for `NonZero` types)
 - rust-lang#136518 (Add note about `FnPtr` trait being exposed as public bound)

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