diff options
author | 2016-05-03 08:41:24 -0400 | |
---|---|---|
committer | 2016-05-03 08:41:24 -0400 | |
commit | 57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc (patch) | |
tree | 60f90718665a1a812b552f589bc4d85616232df1 /test/net_profile.exp | |
parent | Merge branch 'master' of https://github.com/netblue30/firejail (diff) | |
download | firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.gz firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.zst firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.zip |
networking features testing
Diffstat (limited to 'test/net_profile.exp')
-rwxr-xr-x | test/net_profile.exp | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/test/net_profile.exp b/test/net_profile.exp deleted file mode 100755 index 37043c906..000000000 --- a/test/net_profile.exp +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check eth0 | ||
8 | send -- "firejail --profile=net-profile.profile\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0.0\n";exit} | ||
11 | "eth0" | ||
12 | } | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
15 | "00:11:22:33:44:55" | ||
16 | } | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
19 | "10.10.20" | ||
20 | } | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 0.2\n";exit} | ||
23 | "255.255.255.248" | ||
24 | } | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 0.3\n";exit} | ||
27 | "UP" | ||
28 | } | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 0.4\n";exit} | ||
31 | "Child process initialized" | ||
32 | } | ||
33 | sleep 2 | ||
34 | |||
35 | send -- "ip route show\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 1\n";exit} | ||
38 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" | ||
39 | } | ||
40 | |||
41 | send -- "ip route show\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 2\n";exit} | ||
44 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" | ||
45 | } | ||
46 | |||
47 | |||
48 | # check default gw | ||
49 | send -- "ip route show\r" | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 3\n";exit} | ||
52 | "default via 10.10.20.2 dev eth0" | ||
53 | } | ||
54 | |||
55 | # check mtu | ||
56 | send -- "ip link show\r" | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 4\n";exit} | ||
59 | "eth0" | ||
60 | } | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 5\n";exit} | ||
63 | "mtu 1000" | ||
64 | } | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 6\n";exit} | ||
67 | "state UP" | ||
68 | } | ||
69 | |||
70 | sleep 1 | ||
71 | |||
72 | puts "\nall done\n" | ||
73 | |||