ash: fix testcase to not sleep for whole 10 seconds,
authorDenis Vlasenko <vda.linux@googlemail.com>
Sat, 26 Jul 2008 13:53:42 +0000 (13:53 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Sat, 26 Jul 2008 13:53:42 +0000 (13:53 -0000)
 gets annoying pretty fast. Also fix wrong message there.

shell/ash_test/ash-signals/signal1.right
shell/ash_test/ash-signals/signal1.tests

index 66c30a5f06f87855490508d4ec1b86846c2d3fd8..cf403ac6202cfe0408be1b1fe9e10f68b2f30151 100644 (file)
@@ -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
index 49a395bad8f4f89ef10f0739ee6903186049eb83..098d21fd4993c936b1bec4a3181a16321b0b85f9 100755 (executable)
@@ -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