Skip to content

Commit ab6f509

Browse files
committed
Auto merge of #2236 - RalfJung:rustup, r=RalfJung
rustup I feel like tests became a *lot* slower. I am not sure what is going on and don't have time to debug right now.
2 parents e7507d6 + d194e98 commit ab6f509

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
546c826f0ccaab36e897860205281f490db274e6
1+
1f34da9ec8a85b6f86c5fa1c121ab6f88f2f4966

tests/fail/data_race/fence_after_load.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// compile-flags: -Zmiri-disable-isolation
1+
// We want to control preemption here.
2+
// compile-flags: -Zmiri-disable-isolation -Zmiri-preemption-rate=0
23
// ignore-windows: Concurrency on Windows is not supported yet.
34
use std::sync::Arc;
45
use std::sync::atomic::{AtomicUsize, Ordering, fence};

tests/fail/erroneous_const.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ LL | const VOID: ! = panic!();
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
88

9-
error: post-monomorphization error: encountered constants with type errors, stopping evaluation
9+
error: post-monomorphization error: referenced constant has errors
1010
--> $DIR/erroneous_const.rs:LL:CC
1111
|
1212
LL | let _ = PrintName::<T>::VOID;
13-
| ^^^^^^^^^^^^^^^^^^^^ encountered constants with type errors, stopping evaluation
13+
| ^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
1414
|
1515
= note: inside `no_codegen::<i32>` at $DIR/erroneous_const.rs:LL:CC
1616
note: inside `main` at $DIR/erroneous_const.rs:LL:CC

tests/pass/concurrency/channels.rs

+12-3
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,23 @@ use std::thread;
99
/// The test taken from the Rust documentation.
1010
fn simple_send() {
1111
let (tx, rx) = channel();
12-
thread::spawn(move || {
12+
let t = thread::spawn(move || {
1313
tx.send(10).unwrap();
1414
});
1515
assert_eq!(rx.recv().unwrap(), 10);
16+
t.join().unwrap();
1617
}
1718

1819
/// The test taken from the Rust documentation.
1920
fn multiple_send() {
2021
let (tx, rx) = channel();
22+
let mut threads = vec![];
2123
for i in 0..10 {
2224
let tx = tx.clone();
23-
thread::spawn(move || {
25+
let t = thread::spawn(move || {
2426
tx.send(i).unwrap();
2527
});
28+
threads.push(t);
2629
}
2730

2831
let mut sum = 0;
@@ -32,6 +35,10 @@ fn multiple_send() {
3235
sum += j;
3336
}
3437
assert_eq!(sum, 45);
38+
39+
for t in threads {
40+
t.join().unwrap();
41+
}
3542
}
3643

3744
/// The test taken from the Rust documentation.
@@ -41,13 +48,15 @@ fn send_on_sync() {
4148
// this returns immediately
4249
sender.send(1).unwrap();
4350

44-
thread::spawn(move || {
51+
let t = thread::spawn(move || {
4552
// this will block until the previous message has been received
4653
sender.send(2).unwrap();
4754
});
4855

4956
assert_eq!(receiver.recv().unwrap(), 1);
5057
assert_eq!(receiver.recv().unwrap(), 2);
58+
59+
t.join().unwrap();
5160
}
5261

5362
fn main() {

tests/pass/threadleak_ignored.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ignore-windows: Concurrency on Windows is not supported yet.
2-
// compile-flags: -Zmiri-ignore-leaks
2+
// FIXME: disallow preemption to work around https://github.com/rust-lang/rust/issues/55005
3+
// compile-flags: -Zmiri-ignore-leaks -Zmiri-preemption-rate=0
34

45
//! Test that leaking threads works, and that their destructors are not executed.
56

0 commit comments

Comments
 (0)