Fix too-large constants in linked failure tests for happier valgrinding

This commit is contained in:
Ben Blum 2012-07-28 04:23:18 -04:00
parent afe7757525
commit 5312704904

View file

@ -1219,7 +1219,7 @@ fn test_spawn_unlinked_unsup_no_fail_down() { // grandchild sends on a port
do spawn_unlinked {
do spawn_unlinked {
// Give middle task a chance to fail-but-not-kill-us.
for iter::repeat(8192) { task::yield(); }
for iter::repeat(128) { task::yield(); }
comm::send(ch, ()); // If killed first, grandparent hangs.
}
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
fn test_spawn_unlinked_sup_no_fail_up() { // child unlinked fails
do spawn_supervised { fail; }
// Give child a chance to fail-but-not-kill-us.
for iter::repeat(8192) { task::yield(); }
for iter::repeat(128) { task::yield(); }
}
#[test] #[should_fail] #[ignore(cfg(windows))]
fn test_spawn_unlinked_sup_fail_down() {
@ -1304,7 +1304,7 @@ fn test_spawn_failure_propagate_grandchild() {
loop { task::yield(); }
}
}
for iter::repeat(8192) { task::yield(); }
for iter::repeat(128) { task::yield(); }
fail;
}
@ -1316,7 +1316,7 @@ fn test_spawn_failure_propagate_secondborn() {
loop { task::yield(); }
}
}
for iter::repeat(8192) { task::yield(); }
for iter::repeat(128) { task::yield(); }
fail;
}
@ -1328,7 +1328,7 @@ fn test_spawn_failure_propagate_nephew_or_niece() {
loop { task::yield(); }
}
}
for iter::repeat(8192) { task::yield(); }
for iter::repeat(128) { task::yield(); }
fail;
}
@ -1340,7 +1340,7 @@ fn test_spawn_linked_sup_propagate_sibling() {
loop { task::yield(); }
}
}
for iter::repeat(8192) { task::yield(); }
for iter::repeat(128) { task::yield(); }
fail;
}
@ -1741,7 +1741,7 @@ fn test_atomically_nested() {
fn test_child_doesnt_ref_parent() {
// If the child refcounts the parent task, this will stack overflow when
// climbing the task tree to dereference each ancestor. (See #1789)
const generations: uint = 8192;
const generations: uint = 128;
fn child_no(x: uint) -> fn~() {
ret || {
if x < generations {