-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
compiletest: Remove the -test
suffix from normalize directives
#134759
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
//@ normalize-stderr-64bit: "18446744073709551615" -> "SIZE" | ||
//@ normalize-stderr-32bit: "4294967295" -> "SIZE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact, this hasn't needed normalization since #106873.
This comment has been minimized.
This comment has been minimized.
Archaeological note: The two remaining tests that use conditional normalization are:
In both cases, there seems to have been a deliberate attempt to use pointer-size-dependent types, so for now I haven't disturbed them. It's possible that we could just restrict them to |
This comment has been minimized.
This comment has been minimized.
…ieyouxu Add more `begin_panic` normalizations to panic backtrace tests Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace. The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1. The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation. --- Will conflict with rust-lang#134759.
This is going to take me a bit of time to review (scheduled for tmrw). |
…ieyouxu Add more `begin_panic` normalizations to panic backtrace tests Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace. The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1. The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation. --- Will conflict with rust-lang#134759.
Rollup merge of rust-lang#134781 - Zalathar:backtrace, r=SparrowLii,jieyouxu Add more `begin_panic` normalizations to panic backtrace tests Since rust-lang#123244, these tests have started failing locally on some systems (rust-lang#133997) due to minor variations in how `begin_panic` is printed in the backtrace. The variation appears to occur on macOS when `rust.debuginfo-level = "line-tables-only"` is set, which is the default in `config.compiler.toml`. It does not occur when the debuginfo level is set to 1. The variation doesn't seem relevant to these tests, so this PR simply adds another custom normalization rule to account for the variation. --- Will conflict with rust-lang#134759.
☔ The latest upstream changes (presumably #134795) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased due to conflicts with #134781 (which added some more normalize directives); no changes. |
Added some FIXMEs for things I noticed but didn't clean up in this PR, since touching hundreds of tests is enough change for one PR (diff). |
This is a little more verbose, but also more explicit, and avoids invoking the full condition engine when only the pointer-width conditions are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
- I reviewed the test diffs manually.
- The normalization rule is a bit wonky still, but that's pre-existing so.
This modifies quite a lot of tests, so giving a higher p due to conflict-prone-ness @bors r+ rollup p=1 |
(It can be rolled up if someone is doing rollups) |
Rollup of 8 pull requests Successful merges: - rust-lang#134606 (ptr::copy: fix docs for the overlapping case) - rust-lang#134622 (Windows: Use WriteFile to write to a UTF-8 console) - rust-lang#134759 (compiletest: Remove the `-test` suffix from normalize directives) - rust-lang#134787 (Spruce up the docs of several queries related to the type/trait system and const eval) - rust-lang#134806 (rustdoc: use shorter paths as preferred canonical paths) - rust-lang#134815 (Sort triples by name in platform_support.md) - rust-lang#134816 (tools: fix build failure caused by PR rust-lang#134420) - rust-lang#134819 (Fix mistake in windows file open) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134759 - Zalathar:normalize, r=jieyouxu compiletest: Remove the `-test` suffix from normalize directives This suffix was an artifact of using the same condition-checking engine as the `ignore-*` and `only-*` directives, but in practice we have only 2 tests that legitimately use a condition, and both of them only care about 32-bit vs 64-bit. This PR detaches `normalize-*` directives from the condition checker, and replaces it with a much simpler system of four explicit `NormalizeKind` values. It then takes advantage of that simplicity to get rid of the `-test` suffix. --- Addresses one of the points of rust-lang#126372. The new name-checking code is a bit quaint, but I think it's a definite improvement over the status quo. --- The corresponding dev-guide update is rust-lang/rustc-dev-guide#2172. r? jieyouxu
This suffix was an artifact of using the same condition-checking engine as the
ignore-*
andonly-*
directives, but in practice we have only 2 tests that legitimately use a condition, and both of them only care about 32-bit vs 64-bit.This PR detaches
normalize-*
directives from the condition checker, and replaces it with a much simpler system of four explicitNormalizeKind
values. It then takes advantage of that simplicity to get rid of the-test
suffix.Addresses one of the points of #126372.
The new name-checking code is a bit quaint, but I think it's a definite improvement over the status quo.
The corresponding dev-guide update is rust-lang/rustc-dev-guide#2172.
r? jieyouxu