rust-lang / rust-lang/rust

compiletest can fail spuriously when the same file is an aux file and a test file by itself

Open
#144,237 1 comment 0 reactions 1 assignee View on GitHub

@jieyouxu is already working on this.

Since Jul 21, 2025.

A-compiletest C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Image

This is a problem because when there are multiple test threads and multiple rustc processes, it's possible for two rustc processes to fs race -- one thread might be trying to build the aux'd main test as a main test, the other might be trying to build the aux'd main test as an aux... And other interesting behaviors.

We'd probably need to do something like:

  • (1) Have one of the main test under question not aux-build another main test.
  • (2) See if we can "quarantine" aux build directories, as multiple test threads could have multiple rustc processes trying to... produce artifacts in the same aux build directory.
  • (3) As part of the longer-term changes, see if we can perform some kind of build graph validation to reject cases like this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.