diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-26 14:20:04 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-26 14:20:04 +0000 |
commit | 8dbea7dbb1b18135a02a0a2c8f7ab9fdb27a59a7 (patch) | |
tree | 5467541f5e08d70ef9719dd22d7d15ffe0b11aec /shell/ash_test | |
parent | 160e6fa53ae434a5dc3e82f69cb2f0264b86f6ee (diff) | |
download | busybox-8dbea7dbb1b18135a02a0a2c8f7ab9fdb27a59a7.tar.gz |
ash: add slightly different testcase
Diffstat (limited to 'shell/ash_test')
-rw-r--r-- | shell/ash_test/ash-signals/signal2.right | 2 | ||||
-rwxr-xr-x | shell/ash_test/ash-signals/signal2.tests | 2 | ||||
-rw-r--r-- | shell/ash_test/ash-signals/signal3.right | 4 | ||||
-rwxr-xr-x | shell/ash_test/ash-signals/signal3.tests | 17 |
4 files changed, 23 insertions, 2 deletions
diff --git a/shell/ash_test/ash-signals/signal2.right b/shell/ash_test/ash-signals/signal2.right index 96d2d6ad3..a2af919c0 100644 --- a/shell/ash_test/ash-signals/signal2.right +++ b/shell/ash_test/ash-signals/signal2.right @@ -1,3 +1,3 @@ -sleeping +child sleeps child exits as expected parent exits diff --git a/shell/ash_test/ash-signals/signal2.tests b/shell/ash_test/ash-signals/signal2.tests index 04f981c2d..df639ca2c 100755 --- a/shell/ash_test/ash-signals/signal2.tests +++ b/shell/ash_test/ash-signals/signal2.tests @@ -6,7 +6,7 @@ cleanup() { exit } trap cleanup HUP -echo "sleeping" +echo "child sleeps" sleep 1 echo "BAD exit from child!" ' & diff --git a/shell/ash_test/ash-signals/signal3.right b/shell/ash_test/ash-signals/signal3.right new file mode 100644 index 000000000..3113ba5cf --- /dev/null +++ b/shell/ash_test/ash-signals/signal3.right @@ -0,0 +1,4 @@ +child sleeps +child got HUP +child exits +parent exits diff --git a/shell/ash_test/ash-signals/signal3.tests b/shell/ash_test/ash-signals/signal3.tests new file mode 100755 index 000000000..b56c2d97e --- /dev/null +++ b/shell/ash_test/ash-signals/signal3.tests @@ -0,0 +1,17 @@ +#!/bin/sh + +$THIS_SH -c ' +hup() { + echo "child got HUP" +} +trap hup HUP +echo "child sleeps" +sleep 1 +echo "child exits" +' & + +child=$! +sleep 0.1 # let child install handler first +kill -HUP $child +wait +echo "parent exits" |