aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/dns-print.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-12-07 21:14:23 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-12-07 21:14:23 -0500
commitc6ea2db9110feb68fe181188384c31254cdec945 (patch)
treea9a942e7ce10ff3d0bde168fcceb51c38f7f3b4b /test/network/dns-print.exp
parentfixes (diff)
downloadfirejail-c6ea2db9110feb68fe181188384c31254cdec945.tar.gz
firejail-c6ea2db9110feb68fe181188384c31254cdec945.tar.zst
firejail-c6ea2db9110feb68fe181188384c31254cdec945.zip
testing
Diffstat (limited to 'test/network/dns-print.exp')
-rwxr-xr-xtest/network/dns-print.exp31
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
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=test-dns --net=eth0 --dns=1.2.3.4 --dns=2.3.4.5 --dns=3.4.5.6\r"
8expect {
9 timeout {puts "TESTING ERROR 1\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14spawn $env(SHELL)
15send -- "firejail --dns.print=test-dns\r"
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "nameserver 1.2.3.4"
19}
20expect {
21 timeout {puts "TESTING ERROR 2\n";exit}
22 "nameserver 2.3.4.5"
23}
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "nameserver 3.4.5.6"
27}
28
29after 100
30
31puts "\nall done\n"