aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/apache2.exp
diff options
context:
space:
mode:
authorLibravatar curiosity-seeker <seeker@posteo.org>2016-12-15 12:58:32 +0100
committerLibravatar GitHub <noreply@github.com>2016-12-15 12:58:32 +0100
commitd8ee390a6ca56fde4baad57dea7572c39d595809 (patch)
tree255252b15232086e6f65203cda676859ab4117a0 /test/root/apache2.exp
parentUpdate quiterss.profile (diff)
parentadded a 1 second delay after xpra server is started (diff)
downloadfirejail-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-xtest/root/apache2.exp65
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
3set timeout 5
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=apache /etc/init.d/apache2 start\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 2
13
14
15spawn $env(SHELL)
16send -- "firejail --tree\r"
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 "root:/usr/sbin/apache2"
20}
21expect {
22 timeout {puts "TESTING ERROR 2\n";exit}
23 "www-data:/usr/sbin/apache2"
24}
25sleep 2
26
27
28send -- "rm index.html\r"
29sleep 1
30send -- "wget 0\r"
31expect {
32 timeout {puts "TESTING ERROR 3\n";exit}
33 "saved"
34}
35send -- "cat index.html\r"
36expect {
37 timeout {puts "TESTING ERROR 4\n";exit}
38 "DOCTYPE html PUBLIC"
39}
40
41sleep 1
42send -- "rm index.html\r"
43
44send -- "firejail --join=apache\r"
45sleep 2
46
47send -- "ls /dev\r"
48expect {
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}
56sleep 1
57send -- "ls -al /tmp;pwd\r"
58expect {
59 timeout {puts "TESTING ERROR 10\n";exit}
60 "X11-unix" {puts "TESTING ERROR 11\n";exit}
61 "/root"
62}
63sleep 2
64
65puts "\nall done\n"