Skip to content

compiletest: Less special handling of debugger/test discovery in debuginfo mode #134673

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

Open
Zalathar opened this issue Dec 23, 2024 · 2 comments
Labels
A-compiletest Area: The compiletest test runner A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

Comments

@Zalathar
Copy link
Contributor

Currently there is special code in compiletest that detects Mode::DebugInfo and responds by creating three different clones of the compiletest config, each configured to use one of cdb/gdb/lldb if the corresponding debugger can be found.

This complicates config handling and test discovery in the top-level parts of compiletest, because parts of the code need to be aware of multiple configs just to handle this one use-case.

In principle, debugger discovery and selection should be handled out in bootstrap, which then invokes compiletest up to three times, with each invocation explicitly specifying a debugger path and debugger kind. This is somewhat analogous to how x test coverage invokes compiletest twice on the same directory with two different modes, though in this case it would instead be the same directory and mode with different debugger settings.

(Given bootstrap's own maintenance headaches, whether this would be a net improvement in the short-term is an open question.)

@Zalathar Zalathar added A-compiletest Area: The compiletest test runner A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) 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. labels Dec 23, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 23, 2024
@Zalathar
Copy link
Contributor Author

See also #134629, which adds a --debugger flag for explicitly testing only one flavour of debugger, but doesn't change the default auto-discovery behaviour.

@jieyouxu
Copy link
Member

jieyouxu commented Dec 23, 2024

I think that could make sense -- it's really the same test suite source with three debuginfo suites in a trenchcoat.

(But may have to experiment to see)

@jieyouxu jieyouxu added C-cleanup Category: PRs that clean code up or issues documenting cleanup. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Dec 23, 2024
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-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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
Development

No branches or pull requests

3 participants