diff options
Diffstat (limited to 'test/utils/shutdown4.exp')
-rwxr-xr-x | test/utils/shutdown4.exp | 69 |
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | set firstspawn $spawn_id | ||
11 | |||
12 | send -- "firejail --name=shutdowntesting ./catchsignal2.sh\r" | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 0\n";exit} | ||
15 | "Child process initialized" | ||
16 | } | ||
17 | sleep 2 | ||
18 | |||
19 | spawn $env(SHELL) | ||
20 | send -- "firejail --shutdown=shutdowntesting\r" | ||
21 | |||
22 | set spawn_id $firstspawn | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 1\n";exit} | ||
25 | "1" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 2\n";exit} | ||
29 | "2" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 3\n";exit} | ||
33 | "3" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 4\n";exit} | ||
37 | "4" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 5\n";exit} | ||
41 | "5" | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 10\n";exit} | ||
45 | "10" | ||
46 | } | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 20\n";exit} | ||
49 | "20" | ||
50 | } | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 30\n";exit} | ||
53 | "30" | ||
54 | } | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 40\n";exit} | ||
57 | "40" | ||
58 | } | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 50\n";exit} | ||
61 | "50" | ||
62 | } | ||
63 | expect { | ||
64 | timeout {puts "TESTING ERROR 60\n";exit} | ||
65 | "Killed" | ||
66 | } | ||
67 | sleep 1 | ||
68 | |||
69 | puts "\nalldone\n" | ||