diff options
Diffstat (limited to 'test/option-shutdown4.exp')
-rwxr-xr-x | test/option-shutdown4.exp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/test/option-shutdown4.exp b/test/option-shutdown4.exp new file mode 100755 index 000000000..f188ec66d --- /dev/null +++ b/test/option-shutdown4.exp | |||
@@ -0,0 +1,66 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | set firstspawn $spawn_id | ||
8 | |||
9 | send -- "firejail --name=shutdowntesting ./catchsignal2.sh\r" | ||
10 | expect { | ||
11 | timeout {puts "TESTING ERROR 0\n";exit} | ||
12 | "Child process initialized" | ||
13 | } | ||
14 | sleep 2 | ||
15 | |||
16 | spawn $env(SHELL) | ||
17 | send -- "firejail --shutdown=shutdowntesting\r" | ||
18 | |||
19 | set spawn_id $firstspawn | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "1" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | "2" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 3\n";exit} | ||
30 | "3" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 4\n";exit} | ||
34 | "4" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 5\n";exit} | ||
38 | "5" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 10\n";exit} | ||
42 | "10" | ||
43 | } | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 20\n";exit} | ||
46 | "20" | ||
47 | } | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 30\n";exit} | ||
50 | "30" | ||
51 | } | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 40\n";exit} | ||
54 | "40" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 50\n";exit} | ||
58 | "50" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 60\n";exit} | ||
62 | "Killed" | ||
63 | } | ||
64 | sleep 1 | ||
65 | |||
66 | puts "\nalldone\n" | ||