diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-09 19:17:06 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-09 19:17:06 -0500 |
commit | 35004af7d8f6ff19908fb89e25e532113afa26f4 (patch) | |
tree | 991c7c279e0629e3de36a1d9453ab2513a38be1d /test/network/net_veth.exp | |
parent | bugfix: crashing vlc when pressing Ctrl-O (diff) | |
download | firejail-35004af7d8f6ff19908fb89e25e532113afa26f4.tar.gz firejail-35004af7d8f6ff19908fb89e25e532113afa26f4.tar.zst firejail-35004af7d8f6ff19908fb89e25e532113afa26f4.zip |
testing
Diffstat (limited to 'test/network/net_veth.exp')
-rwxr-xr-x | test/network/net_veth.exp | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/test/network/net_veth.exp b/test/network/net_veth.exp new file mode 100755 index 000000000..89dedcb24 --- /dev/null +++ b/test/network/net_veth.exp | |||
@@ -0,0 +1,130 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --net=eth0\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "lo" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2\n";exit} | ||
17 | "127.0.0.1" | ||
18 | } | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | "255.0.0.0" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "UP" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 5\n";exit} | ||
29 | "eth0-" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 6\n";exit} | ||
33 | "255.255.255.0" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 7\n";exit} | ||
37 | "UP" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 8\n";exit} | ||
41 | "Default gateway" | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 9\n";exit} | ||
45 | "Child process initialized" | ||
46 | } | ||
47 | sleep 1 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
50 | |||
51 | send -- "firejail --net=eth0 --net=eth0 --net=eth0 --net=eth0\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 11\n";exit} | ||
54 | "lo" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 12\n";exit} | ||
58 | "127.0.0.1" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 13\n";exit} | ||
62 | "255.0.0.0" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 14\n";exit} | ||
66 | "UP" | ||
67 | } | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 15\n";exit} | ||
70 | "eth0-" | ||
71 | } | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 16\n";exit} | ||
74 | "255.255.255.0" | ||
75 | } | ||
76 | expect { | ||
77 | timeout {puts "TESTING ERROR 17\n";exit} | ||
78 | "UP" | ||
79 | } | ||
80 | expect { | ||
81 | timeout {puts "TESTING ERROR 18\n";exit} | ||
82 | "eth1-" | ||
83 | } | ||
84 | expect { | ||
85 | timeout {puts "TESTING ERROR 19\n";exit} | ||
86 | "255.255.255.0" | ||
87 | } | ||
88 | expect { | ||
89 | timeout {puts "TESTING ERROR 20\n";exit} | ||
90 | "UP" | ||
91 | } | ||
92 | expect { | ||
93 | timeout {puts "TESTING ERROR 5\n";exit} | ||
94 | "eth2-" | ||
95 | } | ||
96 | expect { | ||
97 | timeout {puts "TESTING ERROR 21\n";exit} | ||
98 | "255.255.255.0" | ||
99 | } | ||
100 | expect { | ||
101 | timeout {puts "TESTING ERROR 22\n";exit} | ||
102 | "UP" | ||
103 | } | ||
104 | expect { | ||
105 | timeout {puts "TESTING ERROR 23\n";exit} | ||
106 | "eth3-" | ||
107 | } | ||
108 | expect { | ||
109 | timeout {puts "TESTING ERROR 24\n";exit} | ||
110 | "255.255.255.0" | ||
111 | } | ||
112 | expect { | ||
113 | timeout {puts "TESTING ERROR 25\n";exit} | ||
114 | "UP" | ||
115 | } | ||
116 | expect { | ||
117 | timeout {puts "TESTING ERROR 26\n";exit} | ||
118 | "Default gateway" | ||
119 | } | ||
120 | expect { | ||
121 | timeout {puts "TESTING ERROR 27\n";exit} | ||
122 | "Child process initialized" | ||
123 | } | ||
124 | sleep 1 | ||
125 | send -- "exit\r" | ||
126 | |||
127 | after 100 | ||
128 | |||
129 | puts "\n" | ||
130 | |||