Skip to content

Cannot write tests that need the csky backend #125697

@RalfJung

Description

@RalfJung
Member

In tests/ui/abi/compatibility.rs we're trying to test the ABI adjustment logic of all targets. This generally works as the test is no_core and LLVM has backends for all targets available -- except it does not seem possible to test the csky target that way. Trying to add the usual needs-llvm-components: csky leads to an error from tidy:

/checkout/tests/ui/abi/compatibility.rs: revision csky specifies unknown LLVM component `csky`

The test passes just fine locally, so it seems like at least the downloaded LLVM has the csky component. I don't know why it was not added to tidy's KNOWN_LLVM_COMPONENTS list.

Cc @Dirreke

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 29, 2024
workingjubilee

workingjubilee commented on May 29, 2024

@workingjubilee
Member

cc @erikdesjardins but also I think this was just an oversight.

RalfJung

RalfJung commented on May 29, 2024

@RalfJung
MemberAuthor

FWIW if one just adds this to a test it does pass on CI

//@revisions: csky
//@[csky] compile-flags: --target csky-unknown-linux-gnuabiv2
//@[csky] needs-llvm-components: csky

but of course it may just be silently ignored, hard to say whether the test actually runs... this needs-llvm-components stuff makes tests quite fragile. :/

workingjubilee

workingjubilee commented on May 29, 2024

@workingjubilee
Member

Yeah, the tidy check was added to reduce the fragility because a lot of people were giving names other than the LLVM component's name, like riscv64 instead of riscv, etc.

RalfJung

RalfJung commented on May 29, 2024

@RalfJung
MemberAuthor

The remaining question then is, how sure are we that the components accepted by tidy are all available on some CI runner?

RalfJung

RalfJung commented on May 29, 2024

@RalfJung
MemberAuthor

Also, something else must have been going on... I disabled this test before that sanity check was added to tidy.

Sadly the logs for this failure are already gone.

added
A-testsuiteArea: The testsuite used to check the correctness of rustc
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
C-bugCategory: This is a bug.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 29, 2024
added 2 commits that reference this issue on May 29, 2024
0e859e4
23ea77b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-cskyTarget: glaCSKY above covers over me~T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @RalfJung@jieyouxu@workingjubilee@rustbot

      Issue actions

        Cannot write tests that need the csky backend · Issue #125697 · rust-lang/rust