From 5c1327035995cebd1d36f9cb1943084b29ab7ae8 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 26 Jul 2008 13:53:42 +0000 Subject: ash: fix testcase to not sleep for whole 10 seconds, gets annoying pretty fast. Also fix wrong message there. --- shell/ash_test/ash-signals/signal1.right | 8 ++++---- shell/ash_test/ash-signals/signal1.tests | 15 +++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'shell/ash_test') diff --git a/shell/ash_test/ash-signals/signal1.right b/shell/ash_test/ash-signals/signal1.right index 66c30a5f0..cf403ac62 100644 --- a/shell/ash_test/ash-signals/signal1.right +++ b/shell/ash_test/ash-signals/signal1.right @@ -2,19 +2,19 @@ got signal trap -- 'echo got signal' USR1 sent 1 signal got signal -sleep interrupted +wait interrupted trap -- 'echo got signal' USR1 sent 2 signal got signal -sleep interrupted +wait interrupted trap -- 'echo got signal' USR1 sent 3 signal got signal -sleep interrupted +wait interrupted trap -- 'echo got signal' USR1 sent 4 signal got signal -sleep interrupted +wait interrupted trap -- 'echo got signal' USR1 sent 5 signal sleep completed diff --git a/shell/ash_test/ash-signals/signal1.tests b/shell/ash_test/ash-signals/signal1.tests index 49a395bad..098d21fd4 100755 --- a/shell/ash_test/ash-signals/signal1.tests +++ b/shell/ash_test/ash-signals/signal1.tests @@ -1,24 +1,23 @@ -sleeping=true - trap "echo got signal" USR1 for try in 1 2 3 4 5; do kill -USR1 $$ - sleep 1 - echo sent $try signal + sleep 0.2 + echo "sent $try signal" done & -sleep 10 & +sleep 2 & +sleeping=true while $sleeping; do trap if wait %%; then - echo sleep completed + echo "sleep completed" sleeping=false elif [ $? == 127 ]; then - echo no sleep tonite + echo "BUG: no processes to wait for?!" sleeping=false else - echo sleep interrupted; + echo "wait interrupted" fi done -- cgit v1.2.3