Skip to content
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

compiletest: "ignore-debug" tests are ignored even with debug-assertions-std = false #115171

Closed
RalfJung opened this issue Aug 24, 2023 · 1 comment · Fixed by #118132
Closed
Assignees
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Aug 24, 2023

Some tests need to be disabled when the standard library is built with debug assertions, since that can affect mir-opts codegen through inlining. For that purpose we have the ignore-debug clause in compiletest. However, unfortunately it seems like compiletest actually checks whether the compiler is built with debug assertions, even though that should not make any difference. I have

debug-assertions = true
debug-assertions-std = false

and these tests should not be ignored, but they are.

We should maybe rename the directive to ignore-debug-std to make it more clear what this is about.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 24, 2023
@RalfJung
Copy link
Member Author

This seems to be currently implemented here:

condition! {
name: "debug",
condition: cfg!(debug_assertions),
message: "when building with debug assertions",
}

so it really checks whether compiletest is built with debug assertions, which of course is not what tests actually care about. Though I guess one hacky way to resolve this then would be to build compiletest with debug assertions only if the standard library is built with debug assertions... but probably it would be better if bootstrap would set some sort of env var so that compiletest can know whether the standard library was built with debug assertions.

@albertlarsan68 albertlarsan68 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Aug 24, 2023
@fmease fmease added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 30, 2023
@onur-ozkan onur-ozkan self-assigned this Nov 8, 2023
@bors bors closed this as completed in b10cfcd Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants