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