Skip to content

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

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

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

Copy link
Copy Markdown
Contributor

track LLDB's shared batch mode scripts and per test lldb_input data when
checking whether debuginfo tests are up to date.

previously changing these inputs could leave a successful LLDB test marked as
up to date, so compiletest would skip it unless --force-rerun was used.

also the test directory timestamp is also tracked so adding or removing the
lldb_input directory invalidates the cached result.

Tests:

  • python x.py fmt --check
  • python x.py test src/tools/compiletest --stage 0 --set build.compiletest-allow-stage0=true

@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

@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.

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-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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants