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

run-make: do not run test with the test sources directory as its CWD #126080

Closed
jieyouxu opened this issue Jun 6, 2024 · 0 comments · Fixed by #126097
Closed

run-make: do not run test with the test sources directory as its CWD #126080

jieyouxu opened this issue Jun 6, 2024 · 0 comments · Fixed by #126097
Assignees
Labels
A-compiletest Area: the compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Contributor

jieyouxu commented Jun 6, 2024

The original infra PR setting up rmake.rs version of run-make tests copied over the logic for the legacy Makefile version, which ran the test with the test sources directory as the CWD, which is Very Naughty because if you aren't careful with relative paths, you suddenly can produce output artifacts into your test sources directory. Oops.

We should stop doing that.

cc @Kobzol as they wanted to work on a fix for this.

@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. A-compiletest Area: the compiletest test runner labels Jun 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 6, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 6, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Jun 6, 2024
…jieyouxu

Do not use relative paths to Rust source root in run-make tests

Pre-requisite for rust-lang#126080.

Fixes: rust-lang#126071

r? `@jieyouxu`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 7, 2024
Rollup merge of rust-lang#126081 - Kobzol:run-make-relative-paths, r=jieyouxu

Do not use relative paths to Rust source root in run-make tests

Pre-requisite for rust-lang#126080.

Fixes: rust-lang#126071

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 8, 2024
Change how runmake v2 tests are executed

This PR makes execution of v2 runmake tests more sane, by executing each test in a temporary directory by default, rather than running it inside `tests/run-make`. This will have.. a lot of conflicts.

Fixes: rust-lang#126080
Closes rust-lang#125726, because it removes `tmp_dir`, lol.

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 8, 2024
Change how runmake v2 tests are executed

This PR makes execution of v2 runmake tests more sane, by executing each test in a temporary directory by default, rather than running it inside `tests/run-make`. This will have.. a lot of conflicts.

Fixes: rust-lang#126080
Closes rust-lang#125726, because it removes `tmp_dir`, lol.

r? `@jieyouxu`
bors added a commit to rust-lang-ci/rust that referenced this issue Jun 8, 2024
Change how runmake v2 tests are executed

This PR makes execution of v2 runmake tests more sane, by executing each test in a temporary directory by default, rather than running it inside `tests/run-make`. This will have.. a lot of conflicts.

Fixes: rust-lang#126080
Closes rust-lang#125726, because it removes `tmp_dir`, lol.

r? `@jieyouxu`

try-job: x86_64-msvc
@bors bors closed this as completed in cfdb617 Jun 8, 2024
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Change how runmake v2 tests are executed

This PR makes execution of v2 runmake tests more sane, by executing each test in a temporary directory by default, rather than running it inside `tests/run-make`. This will have.. a lot of conflicts.

Fixes: rust-lang/rust#126080
Closes rust-lang/rust#125726, because it removes `tmp_dir`, lol.

r? `@jieyouxu`

try-job: x86_64-msvc
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 C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants