Skip to content

compiletest: track LLDB inputs in up-to-date checks - #160137

Closed
ArshLabs wants to merge 1 commit into
rust-lang:mainfrom
ArshLabs:fix/compiletest-lldb-input-freshness
Closed

compiletest: track LLDB inputs in up-to-date checks#160137
ArshLabs wants to merge 1 commit into
rust-lang:mainfrom
ArshLabs:fix/compiletest-lldb-input-freshness

Conversation

@ArshLabs

@ArshLabs ArshLabs commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

the compiletest was not tracking all the files used by LLDB tests. so because of that, when those files would be changed the compiletest can skip the test and reuse an outdated successful result. the PR makes those changes trigger a proper test run.

@rustbot

rustbot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 29, 2026
@rustbot

rustbot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @jieyouxu, @oli-obk, @wesleywiser, bootstrap
  • @jieyouxu, @oli-obk, @wesleywiser, bootstrap expanded to 8 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu, oli-obk, wesleywiser

@Mark-Simulacrum Mark-Simulacrum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems potentially OK but I'd like someone more familiar with the debuginfo story we're constructing right now to take a look.

r? @jieyouxu

View changes since this review

Comment on lines +232 to +233
stamp.add_path(&lldb_batchmode);
stamp.add_dir(&lldb_batchmode);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this makes me wonder if we should make add_path detect whether you're adding a directory and recursively add in that case. It's not obvious to me why you would only want to stamp the directory itself, and it seems easy to not notice that you're doing a partial stamp.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that feels broadly more reasonable

let lldb_input = test_dir.join("lldb_input");
if lldb_input.is_dir() {
inputs_stamp.add_path(&lldb_input);
inputs_stamp.add_dir(&lldb_input);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files look potentially generated? E.g., looking at tests/debuginfo/basic-types/lldb_input/non_windows.json I see bless_metadata which doesn't look written by humans... maybe we should include a __comment field in those files with some annotation of what they are?

I'm not clear from the PR description that added these files (#158298) on whether they are always 'outputs' from some process or true inputs.

cc @Walnut356 @jieyouxu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're intended to be generated (as in the JSON files). The bless metadata was intended to be a record of how the metadata was produced, and without reblessing, bless metadata shouldn't participate in the "diff" of the JSONs. I think __comment could make sense, or maybe we could try to have a bit more elaboration in r-d-g about what the general sections are for these.

cc @Kobzol too

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just renaming lldb_input to something like lldb_output, lldb_generated, or something like that, would make it more obvious?

@rustbot rustbot assigned jieyouxu and unassigned Mark-Simulacrum Aug 8, 2026
@rustbot

rustbot commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

jieyouxu is currently at their maximum review capacity.
They may take a while to respond.

@jieyouxu

Copy link
Copy Markdown
Member

Please also don't use LLM to write the PR description, see our LLM usage policy.
@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2026
@rustbot

rustbot commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

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

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 14, 2026
@ArshLabs

Copy link
Copy Markdown
Contributor Author

please feel free to take this further, my apologies I'm busy with something else
add_path seems good but test_dir may need to remain shallow otherwise top level LLDB tests could recursively track all the files in the shared tests/debuginfo directory & rerun after unrelated changes @jieyouxu

@jieyouxu

Copy link
Copy Markdown
Member

Yeah, I think we'll need to see how better to handle this, so closing this for now. Thanks for the PR.

@jieyouxu jieyouxu closed this Aug 15, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 15, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 30, 2026
Rerun `tests/debuginfo` tests if repr data has changed

Resolves rust-lang#161138

This also includes the necessary checking for GDB's data even though none exists atm (rust-lang#160377 will contain the first set). The extra handling doesn't hurt anything since we have to account for all the other tests that don't have repr data anyway.

In a followup, I can rename the `lldb_input` directory to something else (see: rust-lang#160137 (comment)). Doing so requires me to touch a bunch of other places where the name is used, so it should probably be it's own PR. Making sure the tests rerun when the data changes is higher priority though atm.

r? @jieyouxu , @Kobzol

cc @Mark-Simulacrum
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 30, 2026
Rerun `tests/debuginfo` tests if repr data has changed

Resolves rust-lang#161138

This also includes the necessary checking for GDB's data even though none exists atm (rust-lang#160377 will contain the first set). The extra handling doesn't hurt anything since we have to account for all the other tests that don't have repr data anyway.

In a followup, I can rename the `lldb_input` directory to something else (see: rust-lang#160137 (comment)). Doing so requires me to touch a bunch of other places where the name is used, so it should probably be it's own PR. Making sure the tests rerun when the data changes is higher priority though atm.

r? @jieyouxu , @Kobzol

cc @Mark-Simulacrum
rust-bors Bot pushed a commit that referenced this pull request Aug 30, 2026
Rollup merge of #161967 - Walnut356:stamp_repr_data, r=jieyouxu

Rerun `tests/debuginfo` tests if repr data has changed

Resolves #161138

This also includes the necessary checking for GDB's data even though none exists atm (#160377 will contain the first set). The extra handling doesn't hurt anything since we have to account for all the other tests that don't have repr data anyway.

In a followup, I can rename the `lldb_input` directory to something else (see: #160137 (comment)). Doing so requires me to touch a bunch of other places where the name is used, so it should probably be it's own PR. Making sure the tests rerun when the data changes is higher priority though atm.

r? @jieyouxu , @Kobzol

cc @Mark-Simulacrum
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 T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants