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-pass-valgrind tests don't actually run in valgrind #44816

Closed
sfackler opened this issue Sep 24, 2017 · 3 comments · Fixed by #131351
Closed

run-pass-valgrind tests don't actually run in valgrind #44816

sfackler opened this issue Sep 24, 2017 · 3 comments · Fixed by #131351
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@sfackler
Copy link
Member

compiletest requires the --valgrind-path parameter to be set or it treats run-pass-valgrind tests as normal run-pass tests. It doesn't appear that the build infrastructure ever actually sets this, though.

@sfackler sfackler added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Sep 24, 2017
@TimNN TimNN added the C-bug Category: This is a bug. label Sep 26, 2017
@jethrogb
Copy link
Contributor

cc @aidanhs

@jyn514 jyn514 added the A-testsuite Area: The testsuite used to check the correctness of rustc label Feb 3, 2023
@jyn514
Copy link
Member

jyn514 commented Feb 3, 2023

Mentoring instructions: Add the --valgrind-path arg somewhere around

rust/src/bootstrap/test.rs

Lines 1429 to 1435 in e9e0908

// compiletest currently has... a lot of arguments, so let's just pass all
// of them!
cmd.arg("--compile-lib-path").arg(builder.rustc_libdir(compiler));
cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target));
cmd.arg("--rustc-path").arg(builder.rustc(compiler));

You may need to also install valgrind on the CI builders.

@jyn514
Copy link
Member

jyn514 commented Feb 3, 2023

Please also add --force-valgrind at the same time to avoid issues like this happening again (in fact maybe we should just remove that argument and have it on unconditionally?)

@jyn514 jyn514 added E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. labels Feb 3, 2023
@bors bors closed this as completed in f88bfa3 Oct 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 7, 2024
Rollup merge of rust-lang#131351 - jieyouxu:yeet-the-valgrind, r=Kobzol

Remove valgrind test suite and support from compiletest, bootstrap and opt-dist

The `run-pass-valgrind` test suite is not exercised in CI, and as far as I'm aware nobody runs it (asked in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Are.20the.20valgrind.20tests.20even.20used.20by.20anyone.3F). What's remaining of valgrind support in compiletest isn't even properly hooked up with bootstrap.

The existing valgrind logic in compiletest is also straight up questionable, i.e.

https://github.com/rust-lang/rust/blob/1b3b8e7b0265162853c650ead09905bc3cdaeae9/src/tools/compiletest/src/runtest/valgrind.rs#L7-L12

It just runs valgrind tests as `rpass` if no valgrind path is provided to compiletest from bootstrap -- but bootstrap doesn't even pass a valgrind path to compiletest in the first place, so this always ran as `rpass` tests. So what is this even testing?

So if it's not testing anything, let's delete it.

Closes rust-lang#44816 by deleting the test suite :3

<img src="https://github.com/user-attachments/assets/99525bf7-e85b-40ba-9281-e4e1e275c4e8" width=300 />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants