Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Fixes #147063.

It adds a new option to bootstrap to allow to ignore //@ ignore-backends statements in tests.

cc @jieyouxu @antoyo
r? @Kobzol

@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@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 Oct 13, 2025
@Kobzol
Copy link
Member

Kobzol commented Oct 13, 2025

To provide more context here, I suggested this to allow gradual removal of ignore-backends: gcc in a more widespread manner. The idea is that the GCC backend will evolve over time, and hopefully it will be able to run more and more tests. It would be great if we had an ability to run tests that were failing before, and if they succeed now, remove ignore-backends: gcc from them.

That being said, now that I think about it, I wonder how would the workflow look like. If you use the option that this PR adds, it would just run all tests; some of them would fail, some of them would succeed. But it wouldn't be trivial to figure out which one of those that succeeded actually contain ignore-backends: gcc; I expect that GCC will usually resolve a bunch of previous test failures at once, not just individual tests, so going through them manually might be cumbersome, and at that point you could just comment out or remove ignore-backends: gcc yourself.

I guess what I really wanted was something like treat ignore-backends: gcc as "failure is expected" and do not apply the ignore mechanism. Then we would run these tests with the GCC backend, and those tests that would fail are essentially newly passing tests that should have their ignore-backends: gcc removed. Seems like this might be useful as a more general utility in compiletest, rather than hardcoding it for ignore-backends specifically?

@jieyouxu Let me know if you have any opinions on this.

@jieyouxu jieyouxu self-assigned this Oct 13, 2025
@antoyo
Copy link
Contributor

antoyo commented Oct 13, 2025

Here are the 3 use cases we currently have in the CI of cg_gcc I can think of:

  • Enable the LTO tests for the CI tasks where the sysroot is compiled with LTO.
  • Only run the ignored tests to know which tests now pass.
  • Run some specific ignored tests because they now pass.

We already have the logic to do this in the CI of cg_gcc, but we need a flag like --bypass-ignore-backends.

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.

Add bootstrap option to ignore ignore-backends option in tests

5 participants