Skip to content

Conversation

@clubby789
Copy link
Contributor

@clubby789 clubby789 commented Nov 16, 2025

Fixes #149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore NotFound errors.

@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Nov 16, 2025
@rustbot rustbot added 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 Nov 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2025

r? @Zalathar

rustbot has assigned @Zalathar.
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

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jieyouxu
Copy link
Member

r? me @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 17, 2025

📌 Commit c287f6e has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot assigned jieyouxu and unassigned Zalathar Nov 17, 2025
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
bors added a commit that referenced this pull request Nov 17, 2025
Rollup of 6 pull requests

Successful merges:

 - #147760 ([Debugger Visualizers] Unify `*-gnu` and `*-msvc` enum output)
 - #148505 (add larger test for `proc_macro` `FromStr` implementations)
 - #148855 (Error if an autodiff user does not set lto=fat)
 - #148958 (Run codegen tests on a 32-bit target in PR CI)
 - #149004 (compiletest: Avoid race condition in file deletion)
 - #149008 (triagebot: remove jsha from notifications for rustdoc HTML)

r? `@ghost`
`@rustbot` modify labels: rollup
JaclynCodes added a commit to JaclynCodes/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

compiletest tries to delete .stdout file twice when introducing revisions to the test

6 participants