Skip to content

Commit be5db48

Browse files
committed
auto merge of #9408 : thestinger/rust/valgrind, r=alexcrichton
2 parents f6e28d1 + 11a8b3d commit be5db48

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/libstd/rt/sched.rs

+13-9
Original file line numberDiff line numberDiff line change
@@ -1215,18 +1215,22 @@ mod test {
12151215
#[test]
12161216
fn dont_starve_1() {
12171217
use rt::comm::oneshot;
1218+
use unstable::running_on_valgrind;
12181219

1219-
do stress_factor().times {
1220-
do run_in_mt_newsched_task {
1221-
let (port, chan) = oneshot();
1220+
// FIXME: #9407: should work while serialized on valgrind
1221+
if !running_on_valgrind() {
1222+
do stress_factor().times {
1223+
do run_in_mt_newsched_task {
1224+
let (port, chan) = oneshot();
12221225

1223-
// This task should not be able to starve the sender;
1224-
// The sender should get stolen to another thread.
1225-
do spawntask {
1226-
while !port.peek() { }
1227-
}
1226+
// This task should not be able to starve the sender;
1227+
// The sender should get stolen to another thread.
1228+
do spawntask {
1229+
while !port.peek() { }
1230+
}
12281231

1229-
chan.send(());
1232+
chan.send(());
1233+
}
12301234
}
12311235
}
12321236
}

0 commit comments

Comments
 (0)