aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/shutdown2.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/shutdown2.exp')
-rwxr-xr-xtest/utils/shutdown2.exp45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/utils/shutdown2.exp b/test/utils/shutdown2.exp
new file mode 100755
index 000000000..7857b919c
--- /dev/null
+++ b/test/utils/shutdown2.exp
@@ -0,0 +1,45 @@
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.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 "2"
30}
31expect {
32 timeout {puts "TESTING ERROR 3\n";exit}
33 "3"
34}
35expect {
36 timeout {puts "TESTING ERROR 4\n";exit}
37 "4"
38}
39expect {
40 timeout {puts "TESTING ERROR 5\n";exit}
41 "5"
42}
43sleep 1
44
45puts "\nalldone\n"