diff options
Diffstat (limited to 'test/utils/shutdown2.exp')
-rwxr-xr-x | test/utils/shutdown2.exp | 45 |
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | set firstspawn $spawn_id | ||
11 | |||
12 | send -- "firejail --name=shutdowntesting ./catchsignal.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 | sleep 1 | ||
44 | |||
45 | puts "\nalldone\n" | ||