diff options
author | 2016-12-07 21:14:23 -0500 | |
---|---|---|
committer | 2016-12-07 21:14:23 -0500 | |
commit | c6ea2db9110feb68fe181188384c31254cdec945 (patch) | |
tree | a9a942e7ce10ff3d0bde168fcceb51c38f7f3b4b /test/network/dns-print.exp | |
parent | fixes (diff) | |
download | firejail-c6ea2db9110feb68fe181188384c31254cdec945.tar.gz firejail-c6ea2db9110feb68fe181188384c31254cdec945.tar.zst firejail-c6ea2db9110feb68fe181188384c31254cdec945.zip |
testing
Diffstat (limited to 'test/network/dns-print.exp')
-rwxr-xr-x | test/network/dns-print.exp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/network/dns-print.exp b/test/network/dns-print.exp new file mode 100755 index 000000000..9cdc14a6d --- /dev/null +++ b/test/network/dns-print.exp | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=test-dns --net=eth0 --dns=1.2.3.4 --dns=2.3.4.5 --dns=3.4.5.6\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --dns.print=test-dns\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "nameserver 1.2.3.4" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 2\n";exit} | ||
22 | "nameserver 2.3.4.5" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | "nameserver 3.4.5.6" | ||
27 | } | ||
28 | |||
29 | after 100 | ||
30 | |||
31 | puts "\nall done\n" | ||