diff options
Diffstat (limited to 'test/environment/timeout.exp')
-rwxr-xr-x | test/environment/timeout.exp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/environment/timeout.exp b/test/environment/timeout.exp new file mode 100755 index 000000000..ac29c57ba --- /dev/null +++ b/test/environment/timeout.exp | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2017 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "time firejail --timeout=00:00:05\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | sleep 3 | ||
18 | send -- "env\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 1\n";exit} | ||
21 | "container=firejail" | ||
22 | } | ||
23 | |||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | "m5." {puts "5 seconds"} | ||
27 | "m6." {puts "6 seconds"} | ||
28 | "m7." {puts "7 seconds"} | ||
29 | } | ||
30 | |||
31 | puts "\nall done\n" | ||