From 5312704904df3a088581bbe75c1f19a04671c673 Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Sat, 28 Jul 2012 04:23:18 -0400 Subject: [PATCH] Fix too-large constants in linked failure tests for happier valgrinding --- src/libcore/task.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 158e16fa898..9b86a100289 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -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 {