Skip to content

tests: fix: parallel frontend test failures: different alloc ids#156716

Merged
rust-bors[bot] merged 9 commits into
rust-lang:mainfrom
heinwol:fix-ui-tests-alloc-id-parallel-frontend
Jul 1, 2026
Merged

tests: fix: parallel frontend test failures: different alloc ids#156716
rust-bors[bot] merged 9 commits into
rust-lang:mainfrom
heinwol:fix-ui-tests-alloc-id-parallel-frontend

Conversation

@heinwol

@heinwol heinwol commented May 18, 2026

Copy link
Copy Markdown
Contributor

View all comments

Removed the //@ ignore-parallel-frontend different alloc ids directive from all the ui tests applicable and replaced it with //@ normalize-stderr so that all alloc ids mentions are converted into a single placeholder. Thus the tests are passed

Part of #154314

r? @petrochenkov

@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 May 18, 2026
@rustbot

This comment has been minimized.

@heinwol heinwol force-pushed the fix-ui-tests-alloc-id-parallel-frontend branch 2 times, most recently from f681281 to 5abbf45 Compare May 18, 2026 14:41
@heinwol heinwol changed the title fix: parallel frontend test failures: different alloc ids tests: fix: parallel frontend test failures: different alloc ids May 18, 2026
Comment thread tests/ui/const-generics/issues/issue-100313.rs Outdated
@petrochenkov

Copy link
Copy Markdown
Contributor

--bless needs to be run in single-threaded mode to avoid reordering diagnostics in .stderr files.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 18, 2026
@rustbot

rustbot commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@heinwol heinwol force-pushed the fix-ui-tests-alloc-id-parallel-frontend branch from 5abbf45 to bb760c1 Compare May 18, 2026 15:14
@heinwol

heinwol commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 18, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

r? @RalfJung
Is this a reasonable normalization?

My assumptions were that

  • specific numbers of allocation IDs in const evaluation are not that important
  • it's hard to make the ID assignment order reproducible if various parts of const evaluator can run in parallel

So it's better to just normalize the IDs away and enable these tests during parallel frontend testing, instead of ignoring them or waiting for some potential fix in the compiler.

@rustbot rustbot assigned RalfJung and unassigned petrochenkov May 18, 2026
@rustbot

rustbot commented May 18, 2026

Copy link
Copy Markdown
Collaborator

RalfJung is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@petrochenkov

Copy link
Copy Markdown
Contributor

tests/rustdoc-gui/toggle-click-deadspace.goml

Spurious failure.

@RalfJung

RalfJung commented May 24, 2026

Copy link
Copy Markdown
Member

A while back @oli-obk wrote some code somewhere to renumber AllocId while ensuring different ID remain differentiable. Those are the IDs that you are currently seeing in the test output (ALLOC0 etc). This code now applies a second round of normalization on top of the already existing normalization, which seems a bit silly. So at the very least, if we anyway remove all alloc IDs from the result, we should remove that code (or rather, replace it by a simple normalization that we apply everywhere so that one doesn't have to add so many //@ normalize-stderr).

On the one hand it is a bit unfortunate if we have no way of testing whether we actually print consistent IDs. On the other hand these IDs are mostly meaningless and using them in diagnostics isn't great to begin with.
@rust-lang/wg-const-eval what do you think?

Comment thread tests/ui/const-ptr/out_of_bounds_read.rs Outdated
@oli-obk

oli-obk commented May 25, 2026

Copy link
Copy Markdown
Contributor

Seems fine as a short term solution. Having it as a global filter does seem better than repeating it.

There's basically two orthogonal things that we should probably do:

  • parent the AllocIds properly (like disambiguators for many things defined in one parent)
  • add spanned notes to errors pointing to where the alloc was created instead of rendering their name (this may be enough on its own)

@petrochenkov

petrochenkov commented May 25, 2026

Copy link
Copy Markdown
Contributor
  • add spanned notes to errors pointing to where the alloc was created instead of rendering their name (this may be enough on its own)

@heinwol could you try this today?
Hopefully, obtaining the "where the alloc was created" span is already possible in the current infra.

@oli-obk

oli-obk commented May 25, 2026

Copy link
Copy Markdown
Contributor

Hopefully, obtaining the "where the alloc was created" span is already possible in the current infra.

Unfortunately not. There are obvious ones like the ones pointing to statics or fns, but we don't have spans in AllocExtra of the compile_time_machine macro decl. I don't know about the perf impact of doing that, but with relative spans it could just be zero

@rust-log-analyzer

This comment has been minimized.

@RalfJung

Copy link
Copy Markdown
Member

Yeah getting span info is a Project on its own. It'd be nice to have but shouldn't block the parallel frontend IMO.

Personally I could live with normalizing all AllocId away.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 27, 2026
heinwol added 9 commits June 29, 2026 12:44
in `tests/ui/consts/const-eval/raw-bytes.rs` as we now handle this in
our modified regex in `runtest`
Specifically, all `//@ ignore-parallel-frontend different alloc ids`
across other tests because they fail with our
normalization strategy: `ALLOC0` -> `ALLOC$ID`
@heinwol heinwol force-pushed the fix-ui-tests-alloc-id-parallel-frontend branch from f63e293 to c7a0991 Compare July 1, 2026 12:09
@heinwol

heinwol commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 1, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

r=me after squashing commits.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 1, 2026
@petrochenkov

petrochenkov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

r=me after squashing commits. @rustbot author

Or actually not, there're no back and forth changes, just multiple steps.
@bors r+

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c7a0991 has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 1, 2026
…llel-frontend, r=petrochenkov

tests: fix: parallel frontend test failures: different alloc ids

Removed the `//@ ignore-parallel-frontend different alloc ids` directive from all the ui tests applicable and replaced it with `//@ normalize-stderr` so that all alloc ids mentions are converted into a single placeholder. Thus the tests are passed

Part of [rust-lang#154314](rust-lang#154314)

r? @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #150075 (Implement clamp_to)
 - #156716 (tests: fix: parallel frontend test failures: different alloc ids)
 - #158397 (delegation: support simplest output `Self` mapping)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
 - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #158294 (Use .drectve for MSVC DLL exports)
 - #156716 (tests: fix: parallel frontend test failures: different alloc ids)
 - #158397 (delegation: support simplest output `Self` mapping)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
 - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
@rust-bors rust-bors Bot merged commit 9b11acc into rust-lang:main Jul 1, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jul 1, 2026
rust-timer added a commit that referenced this pull request Jul 1, 2026
Rollup merge of #156716 - heinwol:fix-ui-tests-alloc-id-parallel-frontend, r=petrochenkov

tests: fix: parallel frontend test failures: different alloc ids

Removed the `//@ ignore-parallel-frontend different alloc ids` directive from all the ui tests applicable and replaced it with `//@ normalize-stderr` so that all alloc ids mentions are converted into a single placeholder. Thus the tests are passed

Part of [#154314](#154314)

r? @petrochenkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

6 participants