diff --git a/src/uu/factor/src/factor.rs b/src/uu/factor/src/factor.rs index f10198ca2..3ba471d73 100644 --- a/src/uu/factor/src/factor.rs +++ b/src/uu/factor/src/factor.rs @@ -159,8 +159,13 @@ mod tests { #[test] fn factor_recombines_strong_pseudoprime() { + // This is a strong pseudoprime (wrt. miller_rabin::BASIS) + // and triggered a bug in rho::factor's codepath handling + // miller_rabbin::Result::Composite let pseudoprime = 17179869183; for _ in 0..20 { + // Repeat the test 20 times, as it only fails some fraction + // of the time. assert!(factor(pseudoprime).product() == pseudoprime); } }