-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove hard-coded hashes from codegen tests #125963
Merged
bors
merged 1 commit into
rust-lang:master
from
workingjubilee:remove-hashes-from-codegen-tests
Jun 9, 2024
Merged
Remove hard-coded hashes from codegen tests #125963
bors
merged 1 commit into
rust-lang:master
from
workingjubilee:remove-hashes-from-codegen-tests
Jun 9, 2024
Conversation
This file contains 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
When things like our internal hashing or representations change, it is inappropriate for these tests to suddenly fail for no reason. The chance of error is reduced if we instead pattern-match.
rustbot has assigned @Mark-Simulacrum. Use |
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jun 4, 2024
workingjubilee
commented
Jun 4, 2024
workingjubilee
force-pushed
the
remove-hashes-from-codegen-tests
branch
from
June 5, 2024 21:30
81c0ae4
to
fb6fbf0
Compare
@bors r+ |
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
Jun 9, 2024
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Jun 9, 2024
…codegen-tests, r=Mark-Simulacrum Remove hard-coded hashes from codegen tests This removes hard-coded hashes from the codegen and assembly tests. These use FileCheck, which supports eliding part of the pattern being matched, including by capturing it as a pattern parameter for later matching-on. This is much more appropriate than asking contributors to engage with deliberately-opaque identifier schemes. In order to reduce the likelihood of error, every hash-coded segment I've touched now expects a certain length. This correctly represents these cases, as our hash outputs have a predetermined amount of entropy attached to them. This is not done for the UI test suite as those are comparatively easy to simply `--bless`, whereas that would be inappropriate for codegen tests. It is also not done for debuginfo tests as those tests do not support such elision in a correct and useful way.
This was referenced Jun 9, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 9, 2024
Rollup of 6 pull requests Successful merges: - rust-lang#125041 (Enable GVN for `AggregateKind::RawPtr`) - rust-lang#125253 (Add `FRAC_1_SQRT_2PI` constant to f16/f32/f64/f128) - rust-lang#125465 (bootstrap: vendor crates required by opt-dist to collect profiles ) - rust-lang#125470 (Add release notes for 1.79.0) - rust-lang#125963 (Remove hard-coded hashes from codegen tests) - rust-lang#126188 (Fix documentation for `impl_common_helpers` in `run-make-support`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 9, 2024
Rollup merge of rust-lang#125963 - workingjubilee:remove-hashes-from-codegen-tests, r=Mark-Simulacrum Remove hard-coded hashes from codegen tests This removes hard-coded hashes from the codegen and assembly tests. These use FileCheck, which supports eliding part of the pattern being matched, including by capturing it as a pattern parameter for later matching-on. This is much more appropriate than asking contributors to engage with deliberately-opaque identifier schemes. In order to reduce the likelihood of error, every hash-coded segment I've touched now expects a certain length. This correctly represents these cases, as our hash outputs have a predetermined amount of entropy attached to them. This is not done for the UI test suite as those are comparatively easy to simply `--bless`, whereas that would be inappropriate for codegen tests. It is also not done for debuginfo tests as those tests do not support such elision in a correct and useful way.
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.
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.
This removes hard-coded hashes from the codegen and assembly tests. These use FileCheck, which supports eliding part of the pattern being matched, including by capturing it as a pattern parameter for later matching-on. This is much more appropriate than asking contributors to engage with deliberately-opaque identifier schemes.
In order to reduce the likelihood of error, every hash-coded segment I've touched now expects a certain length. This correctly represents these cases, as our hash outputs have a predetermined amount of entropy attached to them.
This is not done for the UI test suite as those are comparatively easy to simply
--bless
, whereas that would be inappropriate for codegen tests. It is also not done for debuginfo tests as those tests do not support such elision in a correct and useful way.