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

ui simd-intrinsic-generic-bitmask test fails on big endian #74885

Closed
infinity0 opened this issue Jul 28, 2020 · 3 comments · Fixed by #75238
Closed

ui simd-intrinsic-generic-bitmask test fails on big endian #74885

infinity0 opened this issue Jul 28, 2020 · 3 comments · Fixed by #75238
Labels
A-SIMD Area: SIMD (Single Instruction Multiple Data) A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.

Comments

@infinity0
Copy link
Contributor

version 1.44.1 s390x ppc64 powerpc (but the failures have been around ever since the test was introduced)

I will be adding an ignore-endian-big feature as part of #74829, just wanted to confirm the failure is OK to ignore:

---- [ui] ui/simd/simd-intrinsic-generic-bitmask.rs stdout ----


executing "/<<PKGBUILDDIR>>/build/powerpc64-unknown-linux-gnu/stage2/bin/rustc" "/<<PKGBUILDDIR>>/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs" "-Zthreads=1" "--target=powerpc64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-C" "prefer-dynamic" "-o" "/<<PKGBUILDDIR>>/build/powerpc64-unknown-linux-gnu/test/ui/simd/simd-intrinsic-generic-bitmask/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/<<PKGBUILDDIR>>/build/powerpc64-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=powerpc64-linux-gnu-gcc" "-L" "/<<PKGBUILDDIR>>/build/powerpc64-unknown-linux-gnu/test/ui/simd/simd-intrinsic-generic-bitmask/auxiliary"
------stdout------------------------------

------stderr------------------------------

------------------------------------------
executing "/<<PKGBUILDDIR>>/build/powerpc64-unknown-linux-gnu/test/ui/simd/simd-intrinsic-generic-bitmask/a"
------stdout------------------------------

------stderr------------------------------
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `10`,
 right: `5`', /<<PKGBUILDDIR>>/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs:52:9
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: std::panicking::rust_panic_with_hook
   6: rust_begin_unwind
   7: std::panicking::begin_panic_fmt
   8: simd_intrinsic_generic_bitmask::main
   9: std::rt::lang_start::{{closure}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

------------------------------------------

error: test run failed!
status: exit code: 101
command: "/<<PKGBUILDDIR>>/build/powerpc64-unknown-linux-gnu/test/ui/simd/simd-intrinsic-generic-bitmask/a"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `10`,
 right: `5`', /<<PKGBUILDDIR>>/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs:52:9
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: std::panicking::rust_panic_with_hook
   6: rust_begin_unwind
   7: std::panicking::begin_panic_fmt
   8: simd_intrinsic_generic_bitmask::main
   9: std::rt::lang_start::{{closure}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

------------------------------------------

CC @gnzlbg who wrote the test originally

@infinity0 infinity0 added the C-bug Category: This is a bug. label Jul 28, 2020
@jonas-schievink jonas-schievink added A-SIMD Area: SIMD (Single Instruction Multiple Data) A-testsuite Area: The testsuite used to check the correctness of rustc labels Jul 28, 2020
@infinity0
Copy link
Contributor Author

I just realised that src/test/ui/simd/simd-intrinsic-generic-select.rs has a comment saying "behavior of simd_select_bitmask is endian-specific" so I figure this test will be OK to ignore on big-endian as well. Will do that as part of my follow-up to #74829.

@Lonami
Copy link
Contributor

Lonami commented Jul 28, 2020

Rather than ignoring it, wouldn't it be better to have the same test adapted for big endian and compiled conditionally? Being dependant on endianess seems to make the test even more important to test.

@infinity0
Copy link
Contributor Author

Some people think it's not worth the effort. See discussion on #74829.

JohnTitor added a commit to JohnTitor/rust that referenced this issue Aug 6, 2020
…matsakis

compiletest: ignore-endian-big, fixes rust-lang#74829, fixes rust-lang#74885

See discussion on rust-lang#74829

I tested it on a Debian s390x machine, works well.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Aug 6, 2020
…matsakis

compiletest: ignore-endian-big, fixes rust-lang#74829, fixes rust-lang#74885

See discussion on rust-lang#74829

I tested it on a Debian s390x machine, works well.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Aug 7, 2020
…matsakis

compiletest: ignore-endian-big, fixes rust-lang#74829, fixes rust-lang#74885

See discussion on rust-lang#74829

I tested it on a Debian s390x machine, works well.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 7, 2020
Rollup of 12 pull requests

Successful merges:

 - rust-lang#74888 (compiletest: ignore-endian-big, fixes rust-lang#74829, fixes rust-lang#74885)
 - rust-lang#75175 (Make doctests of Ipv4Addr::from(u32) easier to read)
 - rust-lang#75179 (Remove unused FromInner impl for Ipv4Addr)
 - rust-lang#75181 (Fix typo in  `librustc_feature/active.rs`)
 - rust-lang#75183 (Label rustfmt toolstate issues with A-rustfmt)
 - rust-lang#75188 (Handle fieldless tuple structs in diagnostic code)
 - rust-lang#75190 (Clean up E0746 explanation)
 - rust-lang#75210 (Change the type of `AssertModuleSource::available_cgus`.)
 - rust-lang#75211 (Note about endianness of returned value of {integer}::from_be_bytes and friends)
 - rust-lang#75217 (Clean up E0747 explanation)
 - rust-lang#75232 (Fix typo "TraitObligatiom" -> "TraitObligation")
 - rust-lang#75236 (Fix typo "biset" -> "bitset")

Failed merges:

r? @ghost
@bors bors closed this as completed in 7f54cf2 Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-SIMD Area: SIMD (Single Instruction Multiple Data) A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug.
Projects
None yet
3 participants