diff options
Diffstat (limited to 'test/features/2.3.exp')
-rwxr-xr-x | test/features/2.3.exp | 183 |
1 files changed, 93 insertions, 90 deletions
diff --git a/test/features/2.3.exp b/test/features/2.3.exp index dd4bdace7..9201696c2 100755 --- a/test/features/2.3.exp +++ b/test/features/2.3.exp | |||
@@ -6,11 +6,12 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
12 | # | 13 | # |
13 | send -- "firejail --noprofile --net=eth0\r" | 14 | send -- "firejail --noprofile --net=eth0 --dns=8.8.8.8 --dns=8.8.4.4\r" |
14 | expect { | 15 | expect { |
15 | timeout {puts "TESTING ERROR 0\n";exit} | 16 | timeout {puts "TESTING ERROR 0\n";exit} |
16 | "Child process initialized" | 17 | "Child process initialized" |
@@ -54,7 +55,7 @@ after 100 | |||
54 | send -- "exit\r" | 55 | send -- "exit\r" |
55 | sleep 3 | 56 | sleep 3 |
56 | 57 | ||
57 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244\r" | 58 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --dns=8.8.8.8 --dns=8.8.4.4\r" |
58 | expect { | 59 | expect { |
59 | timeout {puts "TESTING ERROR 0\n";exit} | 60 | timeout {puts "TESTING ERROR 0\n";exit} |
60 | "Child process initialized" | 61 | "Child process initialized" |
@@ -101,99 +102,101 @@ sleep 3 | |||
101 | # | 102 | # |
102 | # O | 103 | # O |
103 | # | 104 | # |
104 | send -- "firejail --noprofile --net=eth0 --overlay\r" | 105 | if { $overlay == "overlay" } { |
105 | expect { | 106 | send -- "firejail --noprofile --net=eth0 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" |
106 | timeout {puts "TESTING ERROR 2\n";exit} | 107 | expect { |
107 | "Child process initialized" | 108 | timeout {puts "TESTING ERROR 2\n";exit} |
108 | } | 109 | "Child process initialized" |
109 | sleep 1 | 110 | } |
110 | 111 | sleep 1 | |
111 | send -- "dig google.com\r" | 112 | |
112 | expect { | 113 | send -- "dig google.com\r" |
113 | timeout {puts "TESTING ERROR 3\n";exit} | 114 | expect { |
114 | "ANSWER SECTION" | 115 | timeout {puts "TESTING ERROR 3\n";exit} |
115 | } | 116 | "ANSWER SECTION" |
116 | expect { | 117 | } |
117 | timeout {puts "TESTING ERROR 3.1\n";exit} | 118 | expect { |
118 | "google.com" | 119 | timeout {puts "TESTING ERROR 3.1\n";exit} |
119 | } | 120 | "google.com" |
120 | expect { | 121 | } |
121 | timeout {puts "TESTING ERROR 3.3\n";exit} | 122 | expect { |
122 | "SERVER" | 123 | timeout {puts "TESTING ERROR 3.3\n";exit} |
123 | } | 124 | "SERVER" |
124 | after 100 | 125 | } |
125 | 126 | after 100 | |
126 | send -- "/sbin/ifconfig\r" | 127 | |
127 | expect { | 128 | send -- "/sbin/ifconfig\r" |
128 | timeout {puts "TESTING ERROR 3.4\n";exit} | 129 | expect { |
129 | "eth0" | 130 | timeout {puts "TESTING ERROR 3.4\n";exit} |
130 | } | 131 | "eth0" |
131 | expect { | 132 | } |
132 | timeout {puts "TESTING ERROR 3.5\n";exit} | 133 | expect { |
133 | "Link" | 134 | timeout {puts "TESTING ERROR 3.5\n";exit} |
134 | } | 135 | "Link" |
135 | expect { | 136 | } |
136 | timeout {puts "TESTING ERROR 3.6\n";exit} | 137 | expect { |
137 | "192.168.1" | 138 | timeout {puts "TESTING ERROR 3.6\n";exit} |
138 | } | 139 | "192.168.1" |
139 | expect { | 140 | } |
140 | timeout {puts "TESTING ERROR 3.7\n";exit} | 141 | expect { |
141 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | 142 | timeout {puts "TESTING ERROR 3.7\n";exit} |
142 | } | 143 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" |
143 | after 100 | 144 | } |
144 | 145 | after 100 | |
145 | send -- "exit\r" | 146 | |
146 | sleep 3 | 147 | send -- "exit\r" |
147 | 148 | sleep 3 | |
148 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay\r" | 149 | |
149 | expect { | 150 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" |
150 | timeout {puts "TESTING ERROR 2\n";exit} | 151 | expect { |
151 | "Child process initialized" | 152 | timeout {puts "TESTING ERROR 2\n";exit} |
152 | } | 153 | "Child process initialized" |
153 | sleep 1 | 154 | } |
154 | 155 | sleep 1 | |
155 | send -- "dig google.com\r" | 156 | |
156 | expect { | 157 | send -- "dig google.com\r" |
157 | timeout {puts "TESTING ERROR 3\n";exit} | 158 | expect { |
158 | "ANSWER SECTION" | 159 | timeout {puts "TESTING ERROR 3\n";exit} |
160 | "ANSWER SECTION" | ||
161 | } | ||
162 | expect { | ||
163 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
164 | "google.com" | ||
165 | } | ||
166 | expect { | ||
167 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
168 | "SERVER" | ||
169 | } | ||
170 | after 100 | ||
171 | |||
172 | send -- "/sbin/ifconfig\r" | ||
173 | expect { | ||
174 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
175 | "eth0" | ||
176 | } | ||
177 | expect { | ||
178 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
179 | "Link" | ||
180 | } | ||
181 | expect { | ||
182 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
183 | "192.168.1.244" | ||
184 | } | ||
185 | expect { | ||
186 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
187 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
188 | } | ||
189 | after 100 | ||
190 | |||
191 | send -- "exit\r" | ||
192 | sleep 3 | ||
159 | } | 193 | } |
160 | expect { | ||
161 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
162 | "google.com" | ||
163 | } | ||
164 | expect { | ||
165 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
166 | "SERVER" | ||
167 | } | ||
168 | after 100 | ||
169 | |||
170 | send -- "/sbin/ifconfig\r" | ||
171 | expect { | ||
172 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
173 | "eth0" | ||
174 | } | ||
175 | expect { | ||
176 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
177 | "Link" | ||
178 | } | ||
179 | expect { | ||
180 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
181 | "192.168.1.244" | ||
182 | } | ||
183 | expect { | ||
184 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
185 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
186 | } | ||
187 | after 100 | ||
188 | |||
189 | send -- "exit\r" | ||
190 | sleep 3 | ||
191 | 194 | ||
192 | 195 | ||
193 | # | 196 | # |
194 | # C | 197 | # C |
195 | # | 198 | # |
196 | send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot\r" | 199 | send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" |
197 | expect { | 200 | expect { |
198 | timeout {puts "TESTING ERROR 4\n";exit} | 201 | timeout {puts "TESTING ERROR 4\n";exit} |
199 | "Child process initialized" | 202 | "Child process initialized" |
@@ -237,7 +240,7 @@ after 100 | |||
237 | send -- "exit\r" | 240 | send -- "exit\r" |
238 | sleep 3 | 241 | sleep 3 |
239 | 242 | ||
240 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot\r" | 243 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" |
241 | expect { | 244 | expect { |
242 | timeout {puts "TESTING ERROR 4\n";exit} | 245 | timeout {puts "TESTING ERROR 4\n";exit} |
243 | "Child process initialized" | 246 | "Child process initialized" |