aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-01-16 19:16:09 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2018-01-16 19:16:09 -0500
commit6ea0e6f273dc8071a381735b71acb21955b87a27 (patch)
tree47b3e7bdb72d971d5e25f2e011d4ce325782e7a3 /test
parentMerge pull request #1715 from viq/patch-1 (diff)
downloadfirejail-6ea0e6f273dc8071a381735b71acb21955b87a27.tar.gz
firejail-6ea0e6f273dc8071a381735b71acb21955b87a27.tar.zst
firejail-6ea0e6f273dc8071a381735b71acb21955b87a27.zip
added support for IPv6 DNS configuration - #1722
Diffstat (limited to 'test')
-rwxr-xr-xtest/environment/dns.exp10
-rw-r--r--test/environment/dns.profile1
-rwxr-xr-xtest/utils/dns-print.exp6
3 files changed, 15 insertions, 2 deletions
diff --git a/test/environment/dns.exp b/test/environment/dns.exp
index 0d12a82f2..6ddc0ccea 100755
--- a/test/environment/dns.exp
+++ b/test/environment/dns.exp
@@ -4,7 +4,7 @@ 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" 7send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1 --dns=::2\r"
8expect { 8expect {
9 timeout {puts "TESTING ERROR 2.1\n";exit} 9 timeout {puts "TESTING ERROR 2.1\n";exit}
10 "Child process initialized" 10 "Child process initialized"
@@ -24,6 +24,10 @@ expect {
24 timeout {puts "TESTING ERROR 2.4\n";exit} 24 timeout {puts "TESTING ERROR 2.4\n";exit}
25 "nameserver 4.2.2.1" 25 "nameserver 4.2.2.1"
26} 26}
27expect {
28 timeout {puts "TESTING ERROR 2.5\n";exit}
29 "nameserver ::2"
30}
27after 100 31after 100
28send -- "exit\r" 32send -- "exit\r"
29sleep 1 33sleep 1
@@ -50,6 +54,10 @@ expect {
50 "nameserver 4.2.2.1" 54 "nameserver 4.2.2.1"
51} 55}
52after 100 56after 100
57expect {
58 timeout {puts "TESTING ERROR 12.5\n";exit}
59 "nameserver ::2"
60}
53send -- "exit\r" 61send -- "exit\r"
54sleep 1 62sleep 1
55 63
diff --git a/test/environment/dns.profile b/test/environment/dns.profile
index d1b842c86..ade2f2650 100644
--- a/test/environment/dns.profile
+++ b/test/environment/dns.profile
@@ -1,3 +1,4 @@
1dns 8.8.4.4 1dns 8.8.4.4
2dns 8.8.8.8 2dns 8.8.8.8
3dns 4.2.2.1 3dns 4.2.2.1
4dns ::2
diff --git a/test/utils/dns-print.exp b/test/utils/dns-print.exp
index 1954844c9..a0fbaa12f 100755
--- a/test/utils/dns-print.exp
+++ b/test/utils/dns-print.exp
@@ -7,7 +7,7 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --name=test --dns=1.2.3.4\r" 10send -- "firejail --name=test --dns=1.2.3.4 --dns=::2\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 13 "Child process initialized"
@@ -20,5 +20,9 @@ expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
21 "nameserver 1.2.3.4" 21 "nameserver 1.2.3.4"
22} 22}
23expect {
24 timeout {puts "TESTING ERROR 1\n";exit}
25 "nameserver ::2"
26}
23after 100 27after 100
24puts "\nall done\n" 28puts "\nall done\n"