| 1 |
Description: Skip tests that are known to fail on x87 |
| 2 |
Some tests have failed on i386 since Debian started running tests on that |
| 3 |
architecture. These seem to be the result of the well-known excess precision |
| 4 |
issues with the x87 FPU. |
| 5 |
|
| 6 |
Skip these tests on i386, so the rest of the testsuite can provide functional |
| 7 |
regression testing. |
| 8 |
Author: Peter Michael Green <[email protected]> |
| 9 |
|
| 10 |
--- rust-rand-0.8.4.orig/src/distributions/uniform.rs |
| 11 |
+++ rust-rand-0.8.4/src/distributions/uniform.rs |
| 12 |
@@ -1358,7 +1358,7 @@ mod tests { |
| 13 |
let my_incl_uniform = Uniform::new_inclusive(low, high); |
| 14 |
for _ in 0..100 { |
| 15 |
let v = rng.sample(my_uniform).extract(lane); |
| 16 |
- assert!(low_scalar <= v && v < high_scalar); |
| 17 |
+ assert!(low_scalar <= v && v < high_scalar,"low_scalar <= v && v < high_scalar: low_scalar={}, v={}, high_scalar={}",low_scalar,v,high_scalar); |
| 18 |
let v = rng.sample(my_incl_uniform).extract(lane); |
| 19 |
assert!(low_scalar <= v && v <= high_scalar); |
| 20 |
let v = <$ty as SampleUniform>::Sampler |
| 21 |
@@ -1415,3 +1415,6 @@ mod tests { |
| 22 |
|
| 23 |
+ // these tests are known to fail on x87, presumablly because of excess precision. |
| 24 |
+ #[cfg(not(all(target_arch = "x86", not(target_feature = "sse2"))))] |
| 25 |
t!(f32, f32, 32 - 23); |
| 26 |
+ #[cfg(not(all(target_arch = "x86", not(target_feature = "sse2"))))] |
| 27 |
t!(f64, f64, 64 - 52); |
| 28 |
@@ -1628,6 +1631,9 @@ mod tests { |
| 29 |
0.00398172, |
| 30 |
0.007428536, |
| 31 |
]); |
| 32 |
+ |
| 33 |
+ // this test is known to fail on x87, presumablly because of excess precision. |
| 34 |
+ #[cfg(not(all(target_arch = "x86", not(target_feature = "sse2"))))] |
| 35 |
test_samples( |
| 36 |
-1e10f64, |
| 37 |
1e10f64, |