diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-23 20:35:52 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-23 20:35:52 -0400 |
commit | c729d5927d5db964e71bfe30a269acf26786fef7 (patch) | |
tree | 192c74fa0dae843fd2b59044df6e0c78925f424a /test/utils/shutdown.exp | |
parent | make testing (diff) | |
download | firejail-c729d5927d5db964e71bfe30a269acf26786fef7.tar.gz firejail-c729d5927d5db964e71bfe30a269acf26786fef7.tar.zst firejail-c729d5927d5db964e71bfe30a269acf26786fef7.zip |
testing
Diffstat (limited to 'test/utils/shutdown.exp')
-rwxr-xr-x | test/utils/shutdown.exp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/utils/shutdown.exp b/test/utils/shutdown.exp new file mode 100755 index 000000000..135f42d28 --- /dev/null +++ b/test/utils/shutdown.exp | |||
@@ -0,0 +1,33 @@ | |||
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 | send -- "firejail --name=shutdowntesting\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 3 | ||
16 | |||
17 | spawn $env(SHELL) | ||
18 | send -- "firejail --shutdown=shutdowntesting;pwd\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 4\n";exit} | ||
21 | "home" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | send -- "firejail --list;pwd\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 5\n";exit} | ||
28 | "shutdowntesting" {puts "TESTING ERROR 6\n";exit} | ||
29 | "home" | ||
30 | } | ||
31 | sleep 1 | ||
32 | |||
33 | puts "\nalldone\n" | ||