aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-20 21:23:10 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-20 21:23:10 -0500
commit13ef7fba2bdf48319f68a7362779c41edae19651 (patch)
treea746c86a4a13a53243b6ba7d615cc4fdbdd74611 /test/environment
parentcaps testing (diff)
downloadfirejail-13ef7fba2bdf48319f68a7362779c41edae19651.tar.gz
firejail-13ef7fba2bdf48319f68a7362779c41edae19651.tar.zst
firejail-13ef7fba2bdf48319f68a7362779c41edae19651.zip
testing
Diffstat (limited to 'test/environment')
-rwxr-xr-xtest/environment/dns.exp47
1 files changed, 25 insertions, 22 deletions
diff --git a/test/environment/dns.exp b/test/environment/dns.exp
index a6a7171eb..40403aade 100755
--- a/test/environment/dns.exp
+++ b/test/environment/dns.exp
@@ -4,6 +4,31 @@ set timeout 30
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1\r"
8expect {
9 timeout {puts "TESTING ERROR 2.1\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14send -- "cat /etc/resolv.conf\r"
15expect {
16 timeout {puts "TESTING ERROR 2.2\n";exit}
17 "nameserver 8.8.4.4"
18}
19expect {
20 timeout {puts "TESTING ERROR 2.3\n";exit}
21 "nameserver 8.8.8.8"
22}
23expect {
24 timeout {puts "TESTING ERROR 2.4\n";exit}
25 "nameserver 4.2.2.1"
26}
27after 100
28send -- "exit\r"
29after 100
30
31
7# no chroot 32# no chroot
8send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r" 33send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r"
9expect { 34expect {
@@ -27,28 +52,6 @@ after 100
27send -- "rm index.html\r" 52send -- "rm index.html\r"
28after 100 53after 100
29send -- "exit\r" 54send -- "exit\r"
30sleep 1
31
32send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1\r"
33expect {
34 timeout {puts "TESTING ERROR 2.1\n";exit}
35 "Child process initialized"
36}
37sleep 1
38
39send -- "cat /etc/resolv.conf\r"
40expect {
41 timeout {puts "TESTING ERROR 2.2\n";exit}
42 "nameserver 8.8.4.4"
43}
44expect {
45 timeout {puts "TESTING ERROR 2.3\n";exit}
46 "nameserver 8.8.8.8"
47}
48expect {
49 timeout {puts "TESTING ERROR 2.4\n";exit}
50 "nameserver 4.2.2.1"
51}
52after 100 55after 100
53 56
54puts "\nall done\n" 57puts "\nall done\n"