Auto merge of #1444 - RalfJung:rustup, r=RalfJung
rustup, and adjust timing tests I saw a timing failure on macOS, so leave some more slack space.
This commit is contained in:
commit
592d621b78
@ -1 +1 @@
|
||||
d3cba254e464303a6495942f3a831c2bbd7f1768
|
||||
680a4b2fbdca0dc6c5ceec826a8dbeabe28f305d
|
||||
|
@ -25,6 +25,8 @@ fn test_timed_wait_timeout(clock_id: i32) {
|
||||
|
||||
let mut now: libc::timespec = mem::zeroed();
|
||||
assert_eq!(libc::clock_gettime(clock_id, &mut now), 0);
|
||||
// Waiting for a second... mostly because waiting less requires mich more tricky arithmetic.
|
||||
// FIXME: wait less.
|
||||
let timeout = libc::timespec { tv_sec: now.tv_sec + 1, tv_nsec: now.tv_nsec };
|
||||
|
||||
assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0);
|
||||
|
@ -109,7 +109,7 @@ fn check_conditional_variables_timed_wait_notimeout() {
|
||||
cvar.notify_one();
|
||||
});
|
||||
|
||||
let (_guard, timeout) = cvar.wait_timeout(guard, Duration::from_millis(100)).unwrap();
|
||||
let (_guard, timeout) = cvar.wait_timeout(guard, Duration::from_millis(200)).unwrap();
|
||||
assert!(!timeout.timed_out());
|
||||
handle.join().unwrap();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user