diff options
author | curiosity-seeker <seeker@posteo.org> | 2016-12-15 12:58:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 12:58:32 +0100 |
commit | d8ee390a6ca56fde4baad57dea7572c39d595809 (patch) | |
tree | 255252b15232086e6f65203cda676859ab4117a0 /test/root/apache2.exp | |
parent | Update quiterss.profile (diff) | |
parent | added a 1 second delay after xpra server is started (diff) | |
download | firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.gz firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.zst firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.zip |
Merge pull request #1 from netblue30/master
Bring fork up-to-date
Diffstat (limited to 'test/root/apache2.exp')
-rwxr-xr-x | test/root/apache2.exp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/test/root/apache2.exp b/test/root/apache2.exp new file mode 100755 index 000000000..0b102bad5 --- /dev/null +++ b/test/root/apache2.exp | |||
@@ -0,0 +1,65 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 5 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=apache /etc/init.d/apache2 start\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 2 | ||
13 | |||
14 | |||
15 | spawn $env(SHELL) | ||
16 | send -- "firejail --tree\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 1\n";exit} | ||
19 | "root:/usr/sbin/apache2" | ||
20 | } | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 2\n";exit} | ||
23 | "www-data:/usr/sbin/apache2" | ||
24 | } | ||
25 | sleep 2 | ||
26 | |||
27 | |||
28 | send -- "rm index.html\r" | ||
29 | sleep 1 | ||
30 | send -- "wget 0\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 3\n";exit} | ||
33 | "saved" | ||
34 | } | ||
35 | send -- "cat index.html\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 4\n";exit} | ||
38 | "DOCTYPE html PUBLIC" | ||
39 | } | ||
40 | |||
41 | sleep 1 | ||
42 | send -- "rm index.html\r" | ||
43 | |||
44 | send -- "firejail --join=apache\r" | ||
45 | sleep 2 | ||
46 | |||
47 | send -- "ls /dev\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 5\n";exit} | ||
50 | "tty0" {puts "TESTING ERROR 6\n";exit} | ||
51 | "ttyS0" {puts "TESTING ERROR 6\n";exit} | ||
52 | "audio" {puts "TESTING ERROR 6\n";exit} | ||
53 | "ppp" {puts "TESTING ERROR 6\n";exit} | ||
54 | "log" | ||
55 | } | ||
56 | sleep 1 | ||
57 | send -- "ls -al /tmp;pwd\r" | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 10\n";exit} | ||
60 | "X11-unix" {puts "TESTING ERROR 11\n";exit} | ||
61 | "/root" | ||
62 | } | ||
63 | sleep 2 | ||
64 | |||
65 | puts "\nall done\n" | ||