aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/shutdown.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/shutdown.exp')
-rwxr-xr-xtest/utils/shutdown.exp35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/utils/shutdown.exp b/test/utils/shutdown.exp
new file mode 100755
index 000000000..15a9a62c8
--- /dev/null
+++ b/test/utils/shutdown.exp
@@ -0,0 +1,35 @@
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
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --name=shutdowntesting\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized"
15}
16sleep 2
17
18spawn $env(SHELL)
19send -- "firejail --shutdown=shutdowntesting; echo done\r"
20expect {
21 timeout {puts "TESTING ERROR 4\n";exit}
22 "done"
23}
24sleep 5
25
26spawn $env(SHELL)
27send -- "firejail --list;echo done\r"
28expect {
29 timeout {puts "TESTING ERROR 5\n";exit}
30 "shutdowntesting" {puts "TESTING ERROR 6\n";exit}
31 "done"
32}
33sleep 1
34
35puts "\nall done\n"