aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/shutdown4.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-23 20:35:52 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-23 20:35:52 -0400
commitc729d5927d5db964e71bfe30a269acf26786fef7 (patch)
tree192c74fa0dae843fd2b59044df6e0c78925f424a /test/utils/shutdown4.exp
parentmake testing (diff)
downloadfirejail-c729d5927d5db964e71bfe30a269acf26786fef7.tar.gz
firejail-c729d5927d5db964e71bfe30a269acf26786fef7.tar.zst
firejail-c729d5927d5db964e71bfe30a269acf26786fef7.zip
testing
Diffstat (limited to 'test/utils/shutdown4.exp')
-rwxr-xr-xtest/utils/shutdown4.exp69
1 files changed, 69 insertions, 0 deletions
diff --git a/test/utils/shutdown4.exp b/test/utils/shutdown4.exp
new file mode 100755
index 000000000..613f3fbc8
--- /dev/null
+++ b/test/utils/shutdown4.exp
@@ -0,0 +1,69 @@
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 ./catchsignal2.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}
43expect {
44 timeout {puts "TESTING ERROR 10\n";exit}
45 "10"
46}
47expect {
48 timeout {puts "TESTING ERROR 20\n";exit}
49 "20"
50}
51expect {
52 timeout {puts "TESTING ERROR 30\n";exit}
53 "30"
54}
55expect {
56 timeout {puts "TESTING ERROR 40\n";exit}
57 "40"
58}
59expect {
60 timeout {puts "TESTING ERROR 50\n";exit}
61 "50"
62}
63expect {
64 timeout {puts "TESTING ERROR 60\n";exit}
65 "Killed"
66}
67sleep 1
68
69puts "\nalldone\n"