aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/ip6.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/ip6.exp')
-rwxr-xr-xtest/network/ip6.exp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/network/ip6.exp b/test/network/ip6.exp
new file mode 100755
index 000000000..f0fcebcf8
--- /dev/null
+++ b/test/network/ip6.exp
@@ -0,0 +1,49 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --debug --noprofile --net=br0 --ip6=2001:0db8:0:f101::1/64 --netfilter6=ipv6.net\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Installing network filter"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "DROP"
18}
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "unable to initialize table 'filter'" {puts "\nTESTING SKIP 2: no IPv6 support\n"; exit}
22 "2001:db8:1f0a:3ec::2"
23}
24expect {
25 timeout {puts "TESTING ERROR 3\n";exit}
26 "Child process initialized"
27}
28sleep 2
29
30send -- "/sbin/ifconfig\r"
31expect {
32 timeout {puts "TESTING ERROR 4\n";exit}
33 "inet6"
34}
35expect {
36 timeout {puts "TESTING ERROR 5\n";exit}
37 "2001:db8:0:f101::1"
38}
39expect {
40 timeout {puts "TESTING ERROR 6\n";exit}
41 "Scope:Global" { puts "Debian\n"}
42 "scopeid 0x0<global>" { puts "Arch\n"}
43}
44
45send -- "exit\r"
46after 100
47
48puts "\nall done\n"
49