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: audit tests that codegen for specific targets #129390

Closed
4 tasks
jieyouxu opened this issue Aug 22, 2024 · 1 comment · Fixed by #129605
Closed
4 tasks

run-make: audit tests that codegen for specific targets #129390

jieyouxu opened this issue Aug 22, 2024 · 1 comment · Fixed by #129605
Assignees
Labels
A-run-make Area: port run-make Makefiles to rmake.rs 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
Member

jieyouxu commented Aug 22, 2024

Tests doing codegen for specific targets need //@ needs-llvm-components directives.
These are the tests that are currently missing the directives and failing if LLVM is built without various aarch64/arm/thumb components or wasm.

  • tests\run-make\print-target-list
  • tests\run-make\print-to-output
  • tests\run-make\print-cfg
  • tests\run-make\target-without-atomic-cas

Originally posted by @petrochenkov in #121876 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 22, 2024
@jieyouxu jieyouxu self-assigned this Aug 22, 2024
@jieyouxu jieyouxu added A-run-make Area: port run-make Makefiles to rmake.rs 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. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 22, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Aug 22, 2024

E.g. for print-target-list this looks a bit awkward, maybe we can dump //@ needs-llvm-components: $KNOWN_LLVM_COMPONENTS, where $KNOWN_LLVM_COMPONENTS is shamelessly stolen from tidy:

const KNOWN_LLVM_COMPONENTS: &[&str] = &[
"aarch64",
"arm",
"avr",
"bpf",
"csky",
"hexagon",
"loongarch",
"m68k",
"mips",
"msp430",
"nvptx",
"powerpc",
"riscv",
"sparc",
"systemz",
"webassembly",
"x86",
];

Between this directive and COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS, it is not exactly very clear what's happening.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Aug 31, 2024
…Mark-Simulacrum

Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes rust-lang#129390.
Fixes rust-lang#127895.

cc `@petrochenkov` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
@bors bors closed this as completed in d354d4d Aug 31, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 31, 2024
Rollup merge of rust-lang#129605 - jieyouxu:needs-llvm-components, r=Mark-Simulacrum

Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes rust-lang#129390.
Fixes rust-lang#127895.

cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
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 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
None yet
2 participants