Skip to content

Commit 5312704

Browse files
committed
Fix too-large constants in linked failure tests for happier valgrinding
1 parent afe7757 commit 5312704

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libcore/task.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
12191219
do spawn_unlinked {
12201220
do spawn_unlinked {
12211221
// Give middle task a chance to fail-but-not-kill-us.
1222-
for iter::repeat(8192) { task::yield(); }
1222+
for iter::repeat(128) { task::yield(); }
12231223
comm::send(ch, ()); // If killed first, grandparent hangs.
12241224
}
12251225
fail; // Shouldn't kill either (grand)parent or (grand)child.
@@ -1234,7 +1234,7 @@ fn test_spawn_unlinked_unsup_no_fail_up() { // child unlinked fails
12341234
fn test_spawn_unlinked_sup_no_fail_up() { // child unlinked fails
12351235
do spawn_supervised { fail; }
12361236
// Give child a chance to fail-but-not-kill-us.
1237-
for iter::repeat(8192) { task::yield(); }
1237+
for iter::repeat(128) { task::yield(); }
12381238
}
12391239
#[test] #[should_fail] #[ignore(cfg(windows))]
12401240
fn test_spawn_unlinked_sup_fail_down() {
@@ -1304,7 +1304,7 @@ fn test_spawn_failure_propagate_grandchild() {
13041304
loop { task::yield(); }
13051305
}
13061306
}
1307-
for iter::repeat(8192) { task::yield(); }
1307+
for iter::repeat(128) { task::yield(); }
13081308
fail;
13091309
}
13101310

@@ -1316,7 +1316,7 @@ fn test_spawn_failure_propagate_secondborn() {
13161316
loop { task::yield(); }
13171317
}
13181318
}
1319-
for iter::repeat(8192) { task::yield(); }
1319+
for iter::repeat(128) { task::yield(); }
13201320
fail;
13211321
}
13221322

@@ -1328,7 +1328,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
13281328
loop { task::yield(); }
13291329
}
13301330
}
1331-
for iter::repeat(8192) { task::yield(); }
1331+
for iter::repeat(128) { task::yield(); }
13321332
fail;
13331333
}
13341334

@@ -1340,7 +1340,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
13401340
loop { task::yield(); }
13411341
}
13421342
}
1343-
for iter::repeat(8192) { task::yield(); }
1343+
for iter::repeat(128) { task::yield(); }
13441344
fail;
13451345
}
13461346

@@ -1741,7 +1741,7 @@ fn test_atomically_nested() {
17411741
fn test_child_doesnt_ref_parent() {
17421742
// If the child refcounts the parent task, this will stack overflow when
17431743
// climbing the task tree to dereference each ancestor. (See #1789)
1744-
const generations: uint = 8192;
1744+
const generations: uint = 128;
17451745
fn child_no(x: uint) -> fn~() {
17461746
ret || {
17471747
if x < generations {

0 commit comments

Comments
 (0)