aboutsummaryrefslogtreecommitdiffstats
path: root/test/option-shutdown2.exp
diff options
context:
space:
mode:
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"