aboutsummaryrefslogtreecommitdiffstats
path: root/test/servers5.exp
diff options
context:
space:
mode:
authorLibravatar root <root@debian>2015-11-15 12:35:37 -0500
committerLibravatar root <root@debian>2015-11-15 12:35:37 -0500
commit2928d900ab261d247163e28c7773e59cba7d3a6f (patch)
tree0eb04af0cbb6c0b0954b5138c192e0068792952d /test/servers5.exp
parentwhitelist enhancements (diff)
downloadfirejail-2928d900ab261d247163e28c7773e59cba7d3a6f.tar.gz
firejail-2928d900ab261d247163e28c7773e59cba7d3a6f.tar.zst
firejail-2928d900ab261d247163e28c7773e59cba7d3a6f.zip
server testing
Diffstat (limited to 'test/servers5.exp')
-rwxr-xr-xtest/servers5.exp56
1 files changed, 56 insertions, 0 deletions
diff --git a/test/servers5.exp b/test/servers5.exp
new file mode 100755
index 000000000..68c986cbb
--- /dev/null
+++ b/test/servers5.exp
@@ -0,0 +1,56 @@
1#!/usr/bin/expect -f
2
3set timeout 5
4spawn $env(SHELL)
5match_max 100000
6
7send -- "sudo ls; sudo whoami; sudo pwd\r"
8expect {
9 timeout {puts "TESTING ERROR: you need to root run this test as root\n";exit}
10 "root"
11}
12
13send -- "pkill unbound\r"
14sleep 2
15
16send -- "firejail --name=unbound unbound\r"
17expect {
18 timeout {puts "TESTING ERROR 0\n";exit}
19 "Child process initialized"
20}
21sleep 2
22
23spawn $env(SHELL)
24send -- "firejail --tree\r"
25expect {
26 timeout {puts "TESTING ERROR 2\n";exit}
27 "unbound:unbound"
28}
29sleep 2
30
31send -- "tail /var/log/syslog\r"
32expect {
33 timeout {puts "TESTING ERROR 3\n";exit}
34 "unbound"
35}
36expect {
37 timeout {puts "TESTING ERROR 4\n";exit}
38 "info: start of service"
39}
40sleep 2
41
42send -- "firejail --join=unbound\r"
43sleep 2
44
45send -- "ls /dev\r"
46expect {
47 timeout {puts "TESTING ERROR 5\n";exit}
48 "tty0" {puts "TESTING ERROR 6\n";exit}
49 "ttyS0" {puts "TESTING ERROR 6\n";exit}
50 "audio" {puts "TESTING ERROR 6\n";exit}
51 "log"
52}
53sleep 2
54
55
56puts "\nall done\n"