aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/shutdown3.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/shutdown3.exp')
-rwxr-xr-xtest/utils/shutdown3.exp65
1 files changed, 65 insertions, 0 deletions
diff --git a/test/utils/shutdown3.exp b/test/utils/shutdown3.exp
new file mode 100755
index 000000000..02b68c4ce
--- /dev/null
+++ b/test/utils/shutdown3.exp
@@ -0,0 +1,65 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10set firstspawn $spawn_id
11
12send -- "firejail --name=shutdowntesting ./catchsignal-master.sh\r"
13expect {
14 timeout {puts "TESTING ERROR 0\n";exit}
15 "Child process initialized"
16}
17sleep 2
18
19spawn $env(SHELL)
20send -- "firejail --shutdown=shutdowntesting\r"
21
22set spawn_id $firstspawn
23expect {
24 timeout {puts "TESTING ERROR 1\n";exit}
25 "1"
26}
27expect {
28 timeout {puts "TESTING ERROR 2\n";exit}
29 "1"
30}
31expect {
32 timeout {puts "TESTING ERROR 3\n";exit}
33 "2"
34}
35expect {
36 timeout {puts "TESTING ERROR 4\n";exit}
37 "2"
38}
39expect {
40 timeout {puts "TESTING ERROR 5\n";exit}
41 "3"
42}
43expect {
44 timeout {puts "TESTING ERROR 6\n";exit}
45 "3"
46}
47expect {
48 timeout {puts "TESTING ERROR 7\n";exit}
49 "4"
50}
51expect {
52 timeout {puts "TESTING ERROR 8\n";exit}
53 "4"
54}
55expect {
56 timeout {puts "TESTING ERROR 9\n";exit}
57 "5"
58}
59expect {
60 timeout {puts "TESTING ERROR 10\n";exit}
61 "5"
62}
63sleep 1
64
65puts "\nalldone\n"