diff options
Diffstat (limited to 'test/test.sh')
-rwxr-xr-x | test/test.sh | 329 |
1 files changed, 329 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh new file mode 100755 index 000000000..5fe01eb2a --- /dev/null +++ b/test/test.sh | |||
@@ -0,0 +1,329 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | ./chk_config.exp | ||
4 | |||
5 | ./fscheck.sh | ||
6 | |||
7 | echo "TESTING: version" | ||
8 | ./option_version.exp | ||
9 | |||
10 | echo "TESTING: help" | ||
11 | ./option_help.exp | ||
12 | |||
13 | echo "TESTING: man" | ||
14 | ./option_man.exp | ||
15 | |||
16 | echo "TESTING: list" | ||
17 | ./option_list.exp | ||
18 | |||
19 | echo "TESTING: tree" | ||
20 | ./option_tree.exp | ||
21 | |||
22 | if [ -f /proc/self/uid_map ]; | ||
23 | then | ||
24 | echo "TESTING: noroot" | ||
25 | ./noroot.exp | ||
26 | else | ||
27 | echo "TESTING: user namespaces not available" | ||
28 | fi | ||
29 | |||
30 | echo "TESTING: doubledash" | ||
31 | mkdir -- -testdir | ||
32 | touch -- -testdir/ttt | ||
33 | cp -- /bin/bash -testdir/. | ||
34 | ./doubledash.exp | ||
35 | rm -fr -- -testdir | ||
36 | |||
37 | echo "TESTING: trace1" | ||
38 | ./option-trace.exp | ||
39 | |||
40 | echo "TESTING: trace2" | ||
41 | rm -f index.html* | ||
42 | ./trace.exp | ||
43 | rm -f index.html* | ||
44 | |||
45 | echo "TESTING: extract command" | ||
46 | ./extract_command.exp | ||
47 | |||
48 | echo "TESTING: rlimit" | ||
49 | ./option_rlimit.exp | ||
50 | |||
51 | echo "TESTING: shutdown" | ||
52 | ./option-shutdown.exp | ||
53 | |||
54 | echo "TESTING: join" | ||
55 | ./option-join.exp | ||
56 | |||
57 | echo "TESTING: firejail in firejail" | ||
58 | ./firejail-in-firejail.exp | ||
59 | |||
60 | echo "TESTING: chroot overlay" | ||
61 | ./option_chroot_overlay.exp | ||
62 | |||
63 | echo "TESTING: tmpfs" | ||
64 | ./option_tmpfs.exp | ||
65 | |||
66 | echo "TESTING: blacklist directory" | ||
67 | ./option_blacklist.exp | ||
68 | |||
69 | echo "TESTING: blacklist file" | ||
70 | ./option_blacklist_file.exp | ||
71 | |||
72 | echo "TESTING: bind as user" | ||
73 | ./option_bind_user.exp | ||
74 | |||
75 | if [ -d /home/bingo ]; | ||
76 | then | ||
77 | echo "TESTING: home sanitize" | ||
78 | ./option_version.exp | ||
79 | fi | ||
80 | |||
81 | echo "TESTING: chroot as user" | ||
82 | ./fs_chroot.exp | ||
83 | |||
84 | echo "TESTING: /sys" | ||
85 | ./fs_sys.exp | ||
86 | |||
87 | echo "TESTING: readonly" | ||
88 | ls -al > tmpreadonly | ||
89 | ./option_readonly.exp | ||
90 | sleep 5 | ||
91 | rm -f tmpreadonly | ||
92 | |||
93 | echo "TESTING: name" | ||
94 | ./name.exp | ||
95 | |||
96 | echo "TESTING: zsh" | ||
97 | ./shell_zsh.exp | ||
98 | |||
99 | echo "TESTING: csh" | ||
100 | ./shell_csh.exp | ||
101 | |||
102 | which dash | ||
103 | if [ "$?" -eq 0 ]; | ||
104 | then | ||
105 | echo "TESTING: dash" | ||
106 | ./shell_dash.exp | ||
107 | else | ||
108 | echo "TESTING: dash not found" | ||
109 | fi | ||
110 | |||
111 | which firefox | ||
112 | if [ "$?" -eq 0 ]; | ||
113 | then | ||
114 | echo "TESTING: firefox" | ||
115 | ./firefox.exp | ||
116 | else | ||
117 | echo "TESTING: firefox not found" | ||
118 | fi | ||
119 | |||
120 | which midori | ||
121 | if [ "$?" -eq 0 ]; | ||
122 | then | ||
123 | echo "TESTING: midori" | ||
124 | ./midori.exp | ||
125 | else | ||
126 | echo "TESTING: midori not found" | ||
127 | fi | ||
128 | |||
129 | which chromium-browser | ||
130 | if [ "$?" -eq 0 ]; | ||
131 | then | ||
132 | echo "TESTING: chromium" | ||
133 | ./chromium.exp | ||
134 | else | ||
135 | echo "TESTING: chromium not found" | ||
136 | fi | ||
137 | |||
138 | which opera | ||
139 | if [ "$?" -eq 0 ]; | ||
140 | then | ||
141 | echo "TESTING: opera" | ||
142 | ./opera.exp | ||
143 | else | ||
144 | echo "TESTING: opera not found" | ||
145 | fi | ||
146 | |||
147 | which transmission-gtk | ||
148 | if [ "$?" -eq 0 ]; | ||
149 | then | ||
150 | echo "TESTING: transmission-gtk" | ||
151 | ./transmission-gtk.exp | ||
152 | else | ||
153 | echo "TESTING: transmission-gtk not found" | ||
154 | fi | ||
155 | |||
156 | which transmission-qt | ||
157 | if [ "$?" -eq 0 ]; | ||
158 | then | ||
159 | echo "TESTING: transmission-qt" | ||
160 | ./transmission-qt.exp | ||
161 | else | ||
162 | echo "TESTING: transmission-qt not found" | ||
163 | fi | ||
164 | |||
165 | which evince | ||
166 | if [ "$?" -eq 0 ]; | ||
167 | then | ||
168 | echo "TESTING: evince" | ||
169 | ./evince.exp | ||
170 | else | ||
171 | echo "TESTING: evince not found" | ||
172 | fi | ||
173 | |||
174 | echo "TESTING: PID" | ||
175 | ./pid.exp | ||
176 | |||
177 | echo "TESTING: output" | ||
178 | ./output.exp | ||
179 | |||
180 | echo "TESTING: profile no permissions" | ||
181 | ./profile_noperm.exp | ||
182 | |||
183 | echo "TESTING: profile syntax" | ||
184 | ./profile_syntax.exp | ||
185 | |||
186 | echo "TESTING: profile syntax 2" | ||
187 | ./profile_syntax2.exp | ||
188 | |||
189 | echo "TESTING: profile rlimit" | ||
190 | ./profile_rlimit.exp | ||
191 | |||
192 | echo "TESTING: profile read-only" | ||
193 | ./profile_readonly.exp | ||
194 | |||
195 | echo "TESTING: profile tmpfs" | ||
196 | ./profile_tmpfs.exp | ||
197 | |||
198 | echo "TESTING: profile applications" | ||
199 | ./profile_apps.exp | ||
200 | |||
201 | echo "TESTING: private" | ||
202 | ./private.exp `whoami` | ||
203 | |||
204 | echo "TESTING: private directory" | ||
205 | rm -fr dirprivate | ||
206 | mkdir dirprivate | ||
207 | ./private_dir.exp | ||
208 | rm -fr dirprivate | ||
209 | |||
210 | echo "TESTING: private directory profile" | ||
211 | rm -fr dirprivate | ||
212 | mkdir dirprivate | ||
213 | ./private_dir_profile.exp | ||
214 | rm -fr dirprivate | ||
215 | |||
216 | echo "TESTING: private keep" | ||
217 | ./private-keep.exp | ||
218 | |||
219 | uname -r | grep "3.18" | ||
220 | if [ "$?" -eq 0 ]; | ||
221 | then | ||
222 | echo "TESTING: overlayfs on 3.18 kernel" | ||
223 | ./fs_overlay.exp | ||
224 | fi | ||
225 | |||
226 | grep "openSUSE" /etc/os-release | ||
227 | if [ "$?" -eq 0 ]; | ||
228 | then | ||
229 | echo "TESTING: overlayfs" | ||
230 | ./fs_overlay.exp | ||
231 | fi | ||
232 | |||
233 | grep "Ubuntu" /etc/os-release | ||
234 | if [ "$?" -eq 0 ]; | ||
235 | then | ||
236 | echo "TESTING: overlayfs" | ||
237 | ./fs_overlay.exp | ||
238 | fi | ||
239 | |||
240 | echo "TESTING: seccomp debug" | ||
241 | ./seccomp-debug.exp | ||
242 | |||
243 | echo "TESTING: seccomp su" | ||
244 | ./seccomp-su.exp | ||
245 | |||
246 | echo "TESTING: seccomp ptrace" | ||
247 | ./seccomp-ptrace.exp | ||
248 | |||
249 | echo "TESTING: seccomp chmod (seccomp lists)" | ||
250 | ./seccomp-chmod.exp | ||
251 | |||
252 | echo "TESTING: seccomp chmod profile (seccomp lists)" | ||
253 | ./seccomp-chmod-profile.exp | ||
254 | |||
255 | echo "TESTING: seccomp empty" | ||
256 | ./seccomp-empty.exp | ||
257 | |||
258 | echo "TESTING: seccomp bad empty" | ||
259 | ./seccomp-bad-empty.exp | ||
260 | |||
261 | echo "TESTING: read/write /var/tmp" | ||
262 | ./fs_var_tmp.exp | ||
263 | |||
264 | echo "TESTING: read/write /var/lock" | ||
265 | ./fs_var_lock.exp | ||
266 | |||
267 | echo "TESTING: read/write /dev/shm" | ||
268 | ./fs_dev_shm.exp | ||
269 | |||
270 | echo "TESTING: local network" | ||
271 | ./net_local.exp | ||
272 | |||
273 | echo "TESTING: no network" | ||
274 | ./net_none.exp | ||
275 | |||
276 | echo "TESTING: network IP" | ||
277 | ./net_ip.exp | ||
278 | |||
279 | echo "TESTING: network MAC" | ||
280 | ./net_mac.exp | ||
281 | |||
282 | echo "TESTING: network bad IP" | ||
283 | ./net_badip.exp | ||
284 | |||
285 | echo "TESTING: network no IP test 1" | ||
286 | ./net_noip.exp | ||
287 | |||
288 | echo "TESTING: network no IP test 2" | ||
289 | ./net_noip2.exp | ||
290 | |||
291 | echo "TESTING: network default gateway test 1" | ||
292 | ./net_defaultgw.exp | ||
293 | |||
294 | echo "TESTING: network default gateway test 2" | ||
295 | ./net_defaultgw2.exp | ||
296 | |||
297 | echo "TESTING: network default gateway test 3" | ||
298 | ./net_defaultgw3.exp | ||
299 | |||
300 | echo "TESTING: netfilter" | ||
301 | ./net_netfilter.exp | ||
302 | |||
303 | echo "TESTING: 4 bridges ARP" | ||
304 | ./4bridges_arp.exp | ||
305 | |||
306 | echo "TESTING: 4 bridges IP" | ||
307 | ./4bridges_ip.exp | ||
308 | |||
309 | echo "TESTING: login SSH" | ||
310 | ./login_ssh.exp | ||
311 | |||
312 | echo "TESTING: ARP" | ||
313 | ./net_arp.exp | ||
314 | |||
315 | echo "TESTING: DNS" | ||
316 | ./dns.exp | ||
317 | |||
318 | echo "TESTING: firemon --arp" | ||
319 | ./firemon-arp.exp | ||
320 | |||
321 | echo "TESTING: firemon --route" | ||
322 | ./firemon-route.exp | ||
323 | |||
324 | echo "TESTING: firemon --seccomp" | ||
325 | ./firemon-seccomp.exp | ||
326 | |||
327 | echo "TESTING: firemon --caps" | ||
328 | ./firemon-caps.exp | ||
329 | |||