aboutsummaryrefslogtreecommitdiffstats
path: root/test/option-shutdown2.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-13 20:47:18 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-13 20:47:18 -0400
commitc85acb7ba71b153806632256b511b915b872c5bc (patch)
tree0b7d6a11cde99266be994fd319b6edaa4ccd21cf /test/option-shutdown2.exp
parentprofile fixes (diff)
downloadfirejail-c85acb7ba71b153806632256b511b915b872c5bc.tar.gz
firejail-c85acb7ba71b153806632256b511b915b872c5bc.tar.zst
firejail-c85acb7ba71b153806632256b511b915b872c5bc.zip
wait up to 10 seconds for sandbox shutdown
Diffstat (limited to 'test/option-shutdown2.exp')
-rwxr-xr-xtest/option-shutdown2.exp42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/option-shutdown2.exp b/test/option-shutdown2.exp
new file mode 100755
index 000000000..403bc30be
--- /dev/null
+++ b/test/option-shutdown2.exp
@@ -0,0 +1,42 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7set firstspawn $spawn_id
8
9send -- "firejail --name=shutdowntesting ./catchsignal.sh\r"
10expect {
11 timeout {puts "TESTING ERROR 0\n";exit}
12 "Child process initialized"
13}
14sleep 2
15
16spawn $env(SHELL)
17send -- "firejail --shutdown=shutdowntesting\r"
18
19set spawn_id $firstspawn
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "1"
23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "2"
27}
28expect {
29 timeout {puts "TESTING ERROR 3\n";exit}
30 "3"
31}
32expect {
33 timeout {puts "TESTING ERROR 4\n";exit}
34 "4"
35}
36expect {
37 timeout {puts "TESTING ERROR 5\n";exit}
38 "5"
39}
40sleep 1
41
42puts "\nalldone\n"