diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-20 21:23:10 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-20 21:23:10 -0500 |
commit | 13ef7fba2bdf48319f68a7362779c41edae19651 (patch) | |
tree | a746c86a4a13a53243b6ba7d615cc4fdbdd74611 /test/environment/dns.exp | |
parent | caps testing (diff) | |
download | firejail-13ef7fba2bdf48319f68a7362779c41edae19651.tar.gz firejail-13ef7fba2bdf48319f68a7362779c41edae19651.tar.zst firejail-13ef7fba2bdf48319f68a7362779c41edae19651.zip |
testing
Diffstat (limited to 'test/environment/dns.exp')
-rwxr-xr-x | test/environment/dns.exp | 47 |
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 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "cat /etc/resolv.conf\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
17 | "nameserver 8.8.4.4" | ||
18 | } | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 2.3\n";exit} | ||
21 | "nameserver 8.8.8.8" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 2.4\n";exit} | ||
25 | "nameserver 4.2.2.1" | ||
26 | } | ||
27 | after 100 | ||
28 | send -- "exit\r" | ||
29 | after 100 | ||
30 | |||
31 | |||
7 | # no chroot | 32 | # no chroot |
8 | send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r" | 33 | send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r" |
9 | expect { | 34 | expect { |
@@ -27,28 +52,6 @@ after 100 | |||
27 | send -- "rm index.html\r" | 52 | send -- "rm index.html\r" |
28 | after 100 | 53 | after 100 |
29 | send -- "exit\r" | 54 | send -- "exit\r" |
30 | sleep 1 | ||
31 | |||
32 | send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
35 | "Child process initialized" | ||
36 | } | ||
37 | sleep 1 | ||
38 | |||
39 | send -- "cat /etc/resolv.conf\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
42 | "nameserver 8.8.4.4" | ||
43 | } | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 2.3\n";exit} | ||
46 | "nameserver 8.8.8.8" | ||
47 | } | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 2.4\n";exit} | ||
50 | "nameserver 4.2.2.1" | ||
51 | } | ||
52 | after 100 | 55 | after 100 |
53 | 56 | ||
54 | puts "\nall done\n" | 57 | puts "\nall done\n" |