aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-29 10:04:43 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-29 10:04:43 -0500
commitd3b6581db7fcd0fb0897ada9910140f0e43f4ed1 (patch)
tree1c4409a84665834736370f89dcf915a12f173ef5 /test/environment
parentMerge pull request #945 from Fred-Barclay/cryptocat (diff)
downloadfirejail-d3b6581db7fcd0fb0897ada9910140f0e43f4ed1.tar.gz
firejail-d3b6581db7fcd0fb0897ada9910140f0e43f4ed1.tar.zst
firejail-d3b6581db7fcd0fb0897ada9910140f0e43f4ed1.zip
testing and cleanup
Diffstat (limited to 'test/environment')
-rwxr-xr-xtest/environment/dns.exp27
-rw-r--r--test/environment/dns.profile3
2 files changed, 28 insertions, 2 deletions
diff --git a/test/environment/dns.exp b/test/environment/dns.exp
index 40403aade..d00e9fb94 100755
--- a/test/environment/dns.exp
+++ b/test/environment/dns.exp
@@ -26,10 +26,33 @@ expect {
26} 26}
27after 100 27after 100
28send -- "exit\r" 28send -- "exit\r"
29after 100 29sleep 1
30
30 31
32send -- "firejail --profile=dns.profile\r"
33expect {
34 timeout {puts "TESTING ERROR 12.1\n";exit}
35 "Child process initialized"
36}
37sleep 1
38
39send -- "cat /etc/resolv.conf\r"
40expect {
41 timeout {puts "TESTING ERROR 12.2\n";exit}
42 "nameserver 8.8.4.4"
43}
44expect {
45 timeout {puts "TESTING ERROR 12.3\n";exit}
46 "nameserver 8.8.8.8"
47}
48expect {
49 timeout {puts "TESTING ERROR 12.4\n";exit}
50 "nameserver 4.2.2.1"
51}
52after 100
53send -- "exit\r"
54sleep 1
31 55
32# no chroot
33send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r" 56send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r"
34expect { 57expect {
35 timeout {puts "TESTING ERROR 1.1\n";exit} 58 timeout {puts "TESTING ERROR 1.1\n";exit}
diff --git a/test/environment/dns.profile b/test/environment/dns.profile
new file mode 100644
index 000000000..d1b842c86
--- /dev/null
+++ b/test/environment/dns.profile
@@ -0,0 +1,3 @@
1dns 8.8.4.4
2dns 8.8.8.8
3dns 4.2.2.1