Skip to content

Track test suite failures on s390x #105383

Closed

Description

@uweigand

Running the ./x.py test suite on s390x currently results in a number of failing tests due to various issues. I've gone through and fixed all of those, resulting in a clean run with all my local fixes applied. Opening this issue to track getting all requires fixes upstream.

Specifically, I'm seeing the following failures caused by actual code problems:

In addition, a number of test cases show (false positive) failures due to assumptions that aren't correct for the platform:

  • LLD does not support the s390x target:
    src/test/run-make/issue-71519
    (Test needs to be ignored.)
  • The abi_efiapi feature is not supported on s390x:
    src/doc/unstable-book/src/language-features/abi-efiapi.md
    (Test needs to be ignored.)
  • A number of LLVM code-gen tests make invalid assumptions on how the IR looks on s390x:
    src/test/codegen/catch-unwind.rs
    src/test/codegen/remap_path_prefix/main.rs
    src/test/codegen/repr-transparent-aggregates-1.rs
    src/test/codegen/repr-transparent.rs
    src/test/codegen/uninit-consts.rs
    (I have fixes for these.)
  • Several test cases make little-endian assumptions in output files that are tested against - UI tests
    src/test/ui/const-ptr/forbidden_slices.rs
    src/test/ui/consts/const-eval/ub-enum.rs
    src/test/ui/consts/const-eval/ub-nonnull.rs
    src/test/ui/consts/const-eval/ub-ref-ptr.rs
    src/test/ui/consts/const-eval/ub-uninhabit.rs
    src/test/ui/consts/const-eval/ub-wide-ptr.rs
    src/test/ui/consts/issue-83182.rs
    src/test/ui/consts/std/alloc.rs
    src/test/ui/consts/validate_never_arrays.rs
    Some (but not all) of these are listed in 1.53.0 broke ui/consts/const-eval/ub-*.rs tests on s390x (big-endian, 64-bit) (regression) #89577, with various solutions being proposed. Options would be to either ignore those on big-endian hosts, provide multiple versions of the output to match against, and/or try to handle big- and little-endian outputs within the same file (e.g. via some transformation).
  • Several test cases make little-endian assumptions in output files that are tested against - MIR tests
    src/test/mir-opt/const_prop/mutable_variable_no_prop.rs
    src/test/mir-opt/issues/issue_75439.rs
    src/test/mir-opt/building/custom/consts.rs

Longer term, I'm wondering what the best way would be to ensure that the test suite remains clean on the platform - can this be included in CI somehow (either via a native machine somewhere or via qemu-based testing)?

CC @cuviper

Activity

  1. cuviper commented on Dec 6, 2022

    @cuviper
    Member

    Thanks for your attention on this!

    • Several test cases make little-endian assumptions in output files that are tested against

    I think I caught most of these in #102379, but only by ignoring them. There's a suggestion that we might apply more fine-grained filtering on that, but I haven't gotten around to implementing that yet.

    Longer term, I'm wondering what the best way would be to ensure that the test suite remains clean on the platform - can this be included in CI somehow (either via a native machine somewhere or via qemu-based testing)?

    Generally speaking, that's defined by Platform Support and the related Target Tier Policy, where tier-2 (like s390x) is only cross-built in CI, and tier-1 adds test gating. Aarch64-linux is currently the only non-x86 target at tier-1. Part of the challenge is that most developers simply don't have access to s390x hardware to diagnose problems, so it would be burdensome to make that a blocking target.

    Perhaps you have resources that could be applied more ad-hoc? e.g. Google has their own CI building Rust with the latest LLVM main branch, from which they report issues (or usually direct fixes). If you could set up similar external CI for s390x testing, we could get a shorter feedback loop without making it a blocking tier-1 target.

  2. added a commit that references this issue on Dec 6, 2022
  3. uweigand commented on Dec 6, 2022

    @uweigand
    ContributorAuthor

    Perhaps you have resources that could be applied more ad-hoc? e.g. Google has their own CI building Rust with the latest LLVM main branch, from which they report issues (or usually direct fixes). If you could set up similar external CI for s390x testing, we could get a shorter feedback loop without making it a blocking tier-1 target.

    This is certainly something we could set up. I guess I'm mostly concerned about endian issues, which seem to crop up regularly. Having at least one big-endian target in the CI might be useful ... But we can start with our own external CI, and see how that goes over time.

  4. 4 remaining items

  5. added a commit that references this issue on Jan 9, 2023
  6. added a commit that references this issue on Jan 11, 2023
  7. added 3 commits that reference this issue on Jan 14, 2023
  8. uweigand commented on Jan 17, 2023

    @uweigand
    ContributorAuthor

    All failures tracked here have now be resolved; the Rust test suite is currently clean on s390x.

  9. added a commit that references this issue on Aug 24, 2023
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions