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

Audit debug test runners to drop --test-args clang filters on run-make tests #132034

Open
2 tasks
jieyouxu opened this issue Oct 22, 2024 · 0 comments
Open
2 tasks
Assignees
Labels
A-run-make Area: port run-make Makefiles to rmake.rs C-bug Category: This is a bug. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Oct 22, 2024

Context

Only two CI jobs have RUSTBUILD_FORCE_CLANG_BASED_TESTS 1 set, which is a necessary condition for //@ needs-force-clang-based-tests run-make tests to run. These tests (at the time when this issue was opened) pass a --test-args clang filter to the run-make test suite, meaning only run-make tests with clang in their name will run. This is a footgun which meant that several //@ needs-force-clang-based-tests run-make tests never ran in any CI jobs.

Known test runners:

Implementation history

@jieyouxu jieyouxu added A-run-make Area: port run-make Makefiles to rmake.rs T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 22, 2024
@jieyouxu jieyouxu self-assigned this Oct 22, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 22, 2024
@jieyouxu jieyouxu added C-bug Category: This is a bug. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 22, 2024
@jieyouxu jieyouxu moved this from Backlog to In progress in Oxidizing run-make tests Oct 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Oct 25, 2024
Run the full stage 2 `run-make` test suite in `x86_64-gnu-debug`

Run the full `run-make` test suite in the `x86_64-gnu-debug` CI job. This is currently the *only* CI job where `//@ needs-force-clang-based-test` will be satisfied, so some `run-make` tests will literally never be run otherwise. Before this PR, the CI job only ran `run-make` tests which contains the substring `clang` in its test name, which is both (1) a footgun because it's very easy to forget and (2) it masks tests that would otherwise fail (even failing to compile) because the test is skipped if doesn't have a `clang` in its test name.

With the environment of `x86_64-gnu-debug`, two `run-make` tests failed before this PR:

1. `tests/run-make/issue-84395-lto-embed-bitcode/rmake.rs`: this was broken for a long time because `objcopy` in llvm bin tools was renamed to `llvm-objcopy`. This test was converted into a rmake.rs test, rather straight forward.
2. `tests/run-make/cross-lang-lto-riscv-abi/rmake.rs`: this was broken for a long time and never worked. The old version inspected human-readable output of `llvm-readobj --file-header` looking for substring `EF_RISCV_FLOAT_ABI_DOUBLE`, but the human-readable output will only contain something like `Flags: 0x5, RVC, double-float ABI`, hence it will never match. This test was fixed by instead using the `object` crate to actually decode the ELF headers looking for the specific `e_flags` based on reading the RISCV ELF psABI docs.

This PR is best reviewed commit-by-commit, two commits setup the support library for functionality and two commits are for each of the failing `run-make` tests.

I had to bump the `x86_64-gnu-debug` job to be ran with a runner with larger disk space.

Part of rust-lang#132034.

try-job: x86_64-gnu-debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs C-bug Category: This is a bug. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
Status: In progress
Development

No branches or pull requests

2 participants