Skip to content

cmov: cmoveq/cmovne proptest failure on powerpc-unknown-linux-gnu #1298

@tarcieri

Description

@tarcieri

Possible big endian issue in the portable implementation? Discovered via #1295

The tests look like this, so only cmoveq/cmovne are impacted, whereas cmovz/cmovnz seem to be OK:

test i128::cmoveq_works ... ok
test i128::cmovne_works ... ok
test i128::cmovnz_works ... ok
test i128::cmovz_works ... ok
test i16::cmoveq_works ... ok
test i16::cmovne_works ... FAILED
test i16::cmovnz_works ... ok
test i16::cmovz_works ... ok
test i32::cmoveq_works ... FAILED
test i32::cmovne_works ... FAILED
test i32::cmovnz_works ... ok
test i32::cmovz_works ... ok
test i64::cmoveq_works ... FAILED
test i64::cmovne_works ... FAILED
test i64::cmovnz_works ... ok
test i64::cmovz_works ... ok
test i8::cmoveq_works ... ok
test i8::cmovne_works ... ok
test i8::cmovnz_works ... ok
test i8::cmovz_works ... ok
test u128::cmoveq_works ... ok
test u128::cmovne_works ... ok
test u128::cmovnz_works ... ok
test u128::cmovz_works ... ok
test u16::cmoveq_works ... FAILED
test u16::cmovne_works ... FAILED
test u16::cmovnz_works ... ok
test u16::cmovz_works ... ok
test u32::cmoveq_works ... FAILED
test u32::cmovne_works ... FAILED
test u32::cmovnz_works ... ok
test u32::cmovz_works ... ok
test u64::cmoveq_works ... FAILED
test u64::cmovne_works ... FAILED
test u64::cmovnz_works ... ok
test u64::cmovz_works ... ok
test u8::cmoveq_works ... ok
test u8::cmovne_works ... ok
test u8::cmovnz_works ... ok
test u8::cmovz_works ... ok

Here are the failing cases:

From https://github.com/RustCrypto/utils/actions/runs/20548544186/job/59022859407?pr=1295 while it lasts

---- i16::cmovne_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs
proptest: Saving this and future failures in /project/cmov/tests/proptests.proptest-regressions
proptest: If this test was run on a CI system, you may wish to add the following line to your copy of the file. (You may need to create it.)
cc a5a0bb6acbcc1a6dd696da12316cc50e05e58730422aebba3b6d7b1802920675

thread 'i16::cmovne_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `1`,
 right: `0` at cmov/tests/proptests.rs:69.
minimal failing input: a = 12142, b = 14702, cond = 1
	successes: 70
	local rejects: 0
	global rejects: 0

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- i32::cmoveq_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'i32::cmoveq_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `0`,
 right: `1` at cmov/tests/proptests.rs:69.
minimal failing input: a = 2036019054, b = -1456064146, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- i32::cmovne_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'i32::cmovne_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `1`,
 right: `0` at cmov/tests/proptests.rs:69.
minimal failing input: a = 2036019054, b = -1456064146, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- i64::cmoveq_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs
proptest: Saving this and future failures in /project/cmov/tests/proptests.proptest-regressions
proptest: If this test was run on a CI system, you may wish to add the following line to your copy of the file.
cc 193e10ca9e6470ec33310107af5258684e60390b8f2bf6fff6c52800089a3b41

thread 'i64::cmoveq_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `0`,
 right: `1` at cmov/tests/proptests.rs:69.
minimal failing input: a = -5765293396052819090, b = -1494974746098486418, cond = 1
	successes: 107
	local rejects: 0
	global rejects: 0


---- i64::cmovne_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'i64::cmovne_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `1`,
 right: `0` at cmov/tests/proptests.rs:69.
minimal failing input: a = -5765293396052819090, b = -1494974746098486418, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- u16::cmoveq_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'u16::cmoveq_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `0`,
 right: `1` at cmov/tests/proptests.rs:69.
minimal failing input: a = 12142, b = 14702, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- u16::cmovne_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'u16::cmovne_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `1`,
 right: `0` at cmov/tests/proptests.rs:69.
minimal failing input: a = 12142, b = 14702, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- u32::cmoveq_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'u32::cmoveq_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `0`,
 right: `1` at cmov/tests/proptests.rs:69.
minimal failing input: a = 2036019054, b = 2838903150, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- u32::cmovne_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'u32::cmovne_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `1`,
 right: `0` at cmov/tests/proptests.rs:69.
minimal failing input: a = 2036019054, b = 2838903150, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- u64::cmoveq_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'u64::cmoveq_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `0`,
 right: `1` at cmov/tests/proptests.rs:69.
minimal failing input: a = 12681450677656723566, b = 16946642025689120366, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0


---- u64::cmovne_works stdout ----
proptest: FileFailurePersistence::SourceParallel set, but failed to find lib.rs or main.rs

thread 'u64::cmovne_works' panicked at cmov/tests/proptests.rs:69:1:
Test failed: assertion failed: `(left == right)` 
  left: `1`,
 right: `0` at cmov/tests/proptests.rs:69.
minimal failing input: a = 12681450677656723566, b = 16946642025689120366, cond = 1
	successes: 0
	local rejects: 0
	global rejects: 0

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