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

Include better context for "already exists" error in compiletest #111561

Merged
merged 1 commit into from
May 18, 2023

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented May 14, 2023

I encountered the following error from x.py test tests/ui today.

---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ----
thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 17, kind: AlreadyExists, message: "File exists" }', src/tools/compiletest/src/runtest.rs:134:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I found it impossible to unblock myself without knowing which directory it was stuck on.

Error message after this PR:

---- [ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs stdout ----
thread '[ui] tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs' panicked at 'called `Result::unwrap()` on an `Err` value: failed to create output base directory /git/rust/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes

Caused by:
    File exists (os error 17)', src/tools/compiletest/src/runtest.rs:139:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Now I was able to run rm build/x86_64-unknown-linux-gnu/test/ui/impl-trait/multiple-lifetimes/multiple-lifetimes and unblock myself.

Seems to be related to #109509 moving tests/ui/impl-trait/multiple-lifetimes.rs to tests/ui/impl-trait/multiple-lifetimes/multiple-lifetimes.rs.

@rustbot
Copy link
Collaborator

rustbot commented May 14, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@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 May 14, 2023
@rustbot
Copy link
Collaborator

rustbot commented May 14, 2023

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 18, 2023

📌 Commit 6b7b775 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 May 18, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request May 18, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#110884 (Support RISC-V unaligned-scalar-mem target feature)
 - rust-lang#111160 (Update serde in workspace and non-synced dependencies)
 - rust-lang#111168 (Specialize ToString implementation for fmt::Arguments)
 - rust-lang#111527 (add examples of port 0 binding behavior)
 - rust-lang#111561 (Include better context for "already exists" error in compiletest)
 - rust-lang#111633 (Avoid `&format("...")` calls in error message code.)
 - rust-lang#111679 (Remove libs message about ACPs from triagebot)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cdfaf69 into rust-lang:master May 18, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 18, 2023
@dtolnay dtolnay deleted the compiletestdirexists branch October 24, 2023 22:52
@dtolnay dtolnay added A-compiletest Area: The compiletest test runner A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. A-testsuite Area: The testsuite used to check the correctness of rustc labels Jan 14, 2025
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-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) 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.

4 participants