aboutsummaryrefslogtreecommitdiffstats
path: root/test/root/apache2.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-09-15 09:59:11 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-09-15 09:59:11 -0400
commitfc116c063938d5e141d5fbc38e8013d9832ef315 (patch)
tree382b401cc0a9efeda1509a88bd430cd68b741346 /test/root/apache2.exp
parentfixed /etc/login.def reading on Mageia systems (diff)
downloadfirejail-fc116c063938d5e141d5fbc38e8013d9832ef315.tar.gz
firejail-fc116c063938d5e141d5fbc38e8013d9832ef315.tar.zst
firejail-fc116c063938d5e141d5fbc38e8013d9832ef315.zip
testing
Diffstat (limited to 'test/root/apache2.exp')
-rwxr-xr-xtest/root/apache2.exp69
1 files changed, 69 insertions, 0 deletions
diff --git a/test/root/apache2.exp b/test/root/apache2.exp
new file mode 100755
index 000000000..7f67f4706
--- /dev/null
+++ b/test/root/apache2.exp
@@ -0,0 +1,69 @@
1#!/usr/bin/expect -f
2
3set timeout 5
4spawn $env(SHELL)
5match_max 100000
6
7send -- "pkill apache\r"
8sleep 2
9
10
11send -- "firejail --name=apache /etc/init.d/apache2 start\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized"
15}
16sleep 2
17
18
19spawn $env(SHELL)
20send -- "firejail --tree\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "root:/usr/sbin/apache2"
24}
25expect {
26 timeout {puts "TESTING ERROR 2\n";exit}
27 "www-data:/usr/sbin/apache2"
28}
29sleep 2
30
31
32send -- "rm index.html\r"
33sleep 1
34send -- "wget 0\r"
35expect {
36 timeout {puts "TESTING ERROR 3\n";exit}
37 "saved"
38}
39send -- "cat index.html\r"
40expect {
41 timeout {puts "TESTING ERROR 4\n";exit}
42 "DOCTYPE html PUBLIC"
43}
44
45sleep 1
46send -- "rm index.html\r"
47
48send -- "firejail --join=apache\r"
49sleep 2
50
51send -- "ls /dev\r"
52expect {
53 timeout {puts "TESTING ERROR 5\n";exit}
54 "tty0" {puts "TESTING ERROR 6\n";exit}
55 "ttyS0" {puts "TESTING ERROR 6\n";exit}
56 "audio" {puts "TESTING ERROR 6\n";exit}
57 "ppp" {puts "TESTING ERROR 6\n";exit}
58 "log"
59}
60sleep 1
61send -- "ls -al /tmp;pwd\r"
62expect {
63 timeout {puts "TESTING ERROR 10\n";exit}
64 "X11-unix" {puts "TESTING ERROR 11\n";exit}
65 "/root"
66}
67sleep 2
68
69puts "\nall done\n"