-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
coverage: Anonymize line numbers in run-coverage
test snapshots
#114875
Conversation
r? @ozkanonur (rustbot has picked a reviewer for you, use r? to override) |
9ec72a0
to
89155a8
Compare
Looks good to me, thanks! rollup=never for smoother rollbacks in case of any regressions or issues. @bors r+ |
📌 Commit 89155a84b9a17413e14b7c2f121629405670adf2 has been approved by It is now in the queue for this repository. |
@bors rollup=never |
⌛ Testing commit 89155a84b9a17413e14b7c2f121629405670adf2 with merge af6256d2309a27e05df159fef82a8b236d083870... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@rustbot author |
Ah, I forgot to update the @rustbot ready |
This makes the test snapshots less sensitive to lines being added/removed.
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (aa864a7): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 634.855s -> 634.832s (-0.00%) |
Prior to rust-lang#114875, these tests were very sensitive to lines being added/removed, so the migration to `run-coverage` in rust-lang#112300 tried hard to avoid disturbing the existing line numbers. That resulted in some awkward reshuffling when certain comments/directives needed to be added or moved. Now that we don't have to worry about preserving line numbers, we can rearrange those comments into a more conventional layout.
…crum coverage: Tidy up `run-coverage` tests in several small ways Prior to rust-lang#114875 (anonymized line numbers), these tests were very sensitive to lines being added/removed, since doing so would change the line numbers in every subsequent line of output. Therefore they ended up with a few small style issues that weren't worth the hassle of fixing. Now that we can freely rearrange lines without needing to re-bless the entire output, we can tidy up the tests in various trivial ways.
LLVM's coverage reporter always prints line numbers in its coverage reports.
For testing purposes this is slightly inconvenient, because it means that adding or removing a line in a test file causes all subsequent lines in the snapshot to change. That makes it harder to see the actually meaningful changes in the re-blessed snapshot.
This change fixes that by adding another normalization pass that replaces all line numbers in the coverage reports with
LL
, which is similar to what UI tests tell the compiler to do when emitting line numbers in error messages.