aboutsummaryrefslogtreecommitdiffstats
path: root/test/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.sh')
-rwxr-xr-xtest/test.sh294
1 files changed, 3 insertions, 291 deletions
diff --git a/test/test.sh b/test/test.sh
index c6fe4f299..4b7d5bb6d 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -1,70 +1,15 @@
1#!/bin/bash 1#!/bin/bash
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
2 5
3./chk_config.exp 6./chk_config.exp
4 7
5./test-profiles.sh
6
7./fscheck.sh 8./fscheck.sh
8 9
9echo "TESTING: cpu.print (cpu-print.exp)"
10echo "TESTING: failing under VirtualBox where there is only one CPU"
11./cpu-print.exp
12
13echo "TESTING: bandwidth (bandwidth.exp)"
14./bandwidth.exp
15
16echo "TESTING: file transfer (ls.exp)"
17./ls.exp
18
19echo "TESTING: fs.print (fs-print.exp)"
20./fs-print.exp
21
22echo "TESTING: dns.print (dns-print.exp)"
23./dns-print.exp
24
25echo "TESTING: caps.print (caps-print.exp)"
26./caps-print.exp
27
28echo "TESTING: seccomp.print (seccomp-print.exp)"
29./seccomp-print.exp
30
31echo "TESTING: protocol.print (protocol-print.exp)"
32./protocol-print.exp
33
34echo "TESTING: sound (sound.exp)"
35./sound.exp
36
37echo "TESTING: nice (nice.exp)"
38./nice.exp
39
40echo "TESTING: tty (tty.exp)" 10echo "TESTING: tty (tty.exp)"
41./tty.exp 11./tty.exp
42 12
43echo "TESTING: protocol (protocol.exp)"
44./protocol.exp
45
46echo "TESTING: invalid filename (invalid_filename.exp)"
47./invalid_filename.exp
48
49echo "TESTING: environment variables (env.exp)"
50./env.exp
51
52echo "TESTING: whitelist empty (whitelist-empty.exp)"
53./whitelist-empty.exp
54
55echo "TESTING: ignore command (ignore.exp)"
56./ignore.exp
57
58echo "TESTING: private-etc (private-etc.exp)"
59./private-etc.exp
60
61echo "TESTING: private-bin (private-bin.exp)"
62./private-bin.exp
63
64echo "TESTING: private whitelist (private-whitelist.exp)"
65echo "TESTING: failing on OpenSUSE"
66./private-whitelist.exp
67
68sleep 1 13sleep 1
69rm -fr dir\ with\ space 14rm -fr dir\ with\ space
70mkdir dir\ with\ space 15mkdir dir\ with\ space
@@ -82,102 +27,9 @@ rm -fr auto2
82rm -fr auto3 27rm -fr auto3
83rm -fr auto4 28rm -fr auto4
84 29
85
86echo "TESTING: version (option_version.exp)"
87./option_version.exp
88
89echo "TESTING: help (option_help.exp)"
90./option_help.exp
91
92echo "TESTING: man (option_man.exp)"
93./option_man.exp
94
95echo "TESTING: list (option_list.exp)"
96./option_list.exp
97
98echo "TESTING: tree (option_tree.exp)"
99./option_tree.exp
100
101if [ -f /proc/self/uid_map ];
102then
103 echo "TESTING: noroot (noroot.exp)"
104 ./noroot.exp
105else
106 echo "TESTING: user namespaces not available"
107fi
108
109echo "TESTING: doubledash"
110mkdir -- -testdir
111touch -- -testdir/ttt
112cp -- /bin/bash -testdir/.
113./doubledash.exp
114rm -fr -- -testdir
115
116echo "TESTING: trace1 (option-trace.exp)"
117./option-trace.exp
118
119echo "TESTING: trace2 (trace.exp)"
120rm -f index.html*
121./trace.exp
122rm -f index.html*
123
124echo "TESTING: extract command (extract_command.exp)"
125./extract_command.exp
126
127echo "TESTING: kmsg access (kmsg.exp)"
128./kmsg.exp
129
130echo "TESTING: rlimit (option_rlimit.exp)"
131./option_rlimit.exp
132
133echo "TESTING: shutdown (option_shutdown.exp)"
134./option-shutdown.exp
135
136echo "TESTING: shutdown2 (option_shutdown2.exp)"
137./option-shutdown2.exp
138
139echo "TESTING: shutdown3 (option_shutdown3.exp)"
140./option-shutdown3.exp
141
142echo "TESTING: shutdown4 (option_shutdown4.exp)"
143./option-shutdown4.exp
144
145echo "TESTING: join (option-join.exp)"
146./option-join.exp
147
148echo "TESTING: join2 (option-join2.exp)"
149./option-join2.exp
150
151echo "TESTING: join3 (option-join3.exp)"
152./option-join3.exp
153
154echo "TESTING: join profile (option-join-profile.exp)"
155./option-join-profile.exp
156
157echo "TESTING: firejail in firejail - single sandbox (firejail-in-firejail.exp)"
158./firejail-in-firejail.exp
159
160echo "TESTING: firejail in firejail - force new sandbox (firejail-in-firejail2.exp)"
161./firejail-in-firejail2.exp
162
163echo "TESTING: chroot overlay (option_chroot_overlay.exp)" 30echo "TESTING: chroot overlay (option_chroot_overlay.exp)"
164./option_chroot_overlay.exp 31./option_chroot_overlay.exp
165 32
166echo "TESTING: blacklist directory (option_blacklist.exp)"
167./option_blacklist.exp
168
169echo "TESTING: blacklist file (opiton_blacklist_file.exp)"
170./option_blacklist_file.exp
171
172echo "TESTING: bind as user (option_bind_user.exp)"
173./option_bind_user.exp
174
175if [ -d /home/bingo ];
176then
177 echo "TESTING: home sanitize (opiton_version.exp)"
178 ./option_version.exp
179fi
180
181echo "TESTING: chroot as user (fs_chroot.exp)" 33echo "TESTING: chroot as user (fs_chroot.exp)"
182./fs_chroot.exp 34./fs_chroot.exp
183 35
@@ -190,47 +42,7 @@ ls -al > tmpreadonly
190sleep 5 42sleep 5
191rm -f tmpreadonly 43rm -f tmpreadonly
192 44
193echo "TESTING: zsh (shell_zsh.exp)"
194./shell_zsh.exp
195
196echo "TESTING: csh (shell_csh.exp)"
197./shell_csh.exp
198
199which dash
200if [ "$?" -eq 0 ];
201then
202 echo "TESTING: dash (shell_dash.exp)"
203 ./shell_dash.exp
204else
205 echo "TESTING: dash not found"
206fi
207
208./test-apps.sh
209./test-apps-x11.sh
210
211echo "TESTING: PID (pid.exp)"
212./pid.exp
213
214echo "TESTING: output (output.exp)"
215./output.exp
216
217echo "TESTING: profile no permissions (profile_noperm.exp)"
218./profile_noperm.exp
219
220echo "TESTING: profile syntax (profile_syntax.exp)"
221./profile_syntax.exp
222
223echo "TESTING: profile syntax 2 (profile_syntax2.exp)"
224./profile_syntax2.exp
225
226echo "TESTING: profile rlimit (profile_rlimit.exp)"
227./profile_rlimit.exp
228 45
229echo "TESTING: profile read-only (profile_readonly.exp)"
230./profile_readonly.exp
231
232echo "TESTING: private (private.exp)"
233./private.exp `whoami`
234 46
235echo "TESTING: private directory (private_dir.exp)" 47echo "TESTING: private directory (private_dir.exp)"
236rm -fr dirprivate 48rm -fr dirprivate
@@ -247,113 +59,13 @@ rm -fr dirprivate
247echo "TESTING: overlayfs (fs_overlay.exp)" 59echo "TESTING: overlayfs (fs_overlay.exp)"
248./fs_overlay.exp 60./fs_overlay.exp
249 61
250echo "TESTING: seccomp debug (seccomp-debug.exp)"
251./seccomp-debug.exp
252
253echo "TESTING: seccomp errno (seccomp-errno.exp)"
254./seccomp-errno.exp
255
256echo "TESTING: seccomp su (seccomp-su.exp)"
257./seccomp-su.exp
258
259echo "TESTING: seccomp ptrace (seccomp-ptrace.exp)"
260./seccomp-ptrace.exp
261
262echo "TESTING: seccomp chmod - seccomp lists (seccomp-chmod.exp)"
263./seccomp-chmod.exp
264
265echo "TESTING: seccomp chmod profile - seccomp lists (seccomp-chmod-profile.exp)"
266./seccomp-chmod-profile.exp
267
268echo "TESTING: seccomp empty (seccomp-empty.exp)"
269./seccomp-empty.exp
270
271echo "TESTING: seccomp bad empty (seccomp-bad-empty.exp)"
272./seccomp-bad-empty.exp
273
274echo "TESTING: seccomp dual filter (seccomp-dualfilter.exp)"
275./seccomp-dualfilter.exp
276
277echo "TESTING: read/write /var/tmp (fs_var_tmp.exp)"
278./fs_var_tmp.exp
279
280echo "TESTING: read/write /var/lock (fs_var_lock.exp)"
281./fs_var_lock.exp
282
283echo "TESTING: read/write /dev/shm (fs_dev_shm.exp)"
284./fs_dev_shm.exp
285
286echo "TESTING: quiet (quiet.exp)"
287./quiet.exp
288
289echo "TESTING: IPv6 support (ip6.exp)"
290echo "TESTING: broken on Centos - todo"
291./ip6.exp
292
293echo "TESTING: local network (net_local.exp)"
294./net_local.exp
295
296echo "TESTING: no network (net_none.exp)"
297./net_none.exp
298
299echo "TESTING: network IP (net_ip.exp)"
300./net_ip.exp
301
302echo "TESTING: network MAC (net_mac.exp)"
303sleep 2
304./net_mac.exp
305
306echo "TESTING: network MTU (net_mtu.exp)"
307./net_mtu.exp
308
309echo "TESTING: network hostname (hostname.exp)"
310./hostname.exp
311
312echo "TESTING: network bad IP (net_badip.exp)"
313./net_badip.exp
314
315echo "TESTING: network no IP test 1 (net_noip.exp)"
316./net_noip.exp
317
318echo "TESTING: network no IP test 2 (net_noip2.exp)"
319./net_noip2.exp
320
321echo "TESTING: network default gateway test 1 (net_defaultgw.exp)"
322./net_defaultgw.exp
323
324echo "TESTING: network default gateway test 2 (net_defaultgw2.exp)"
325./net_defaultgw2.exp
326
327echo "TESTING: network default gateway test 3 (net_defaultgw3.exp)"
328./net_defaultgw3.exp
329
330echo "TESTING: netfilter (net_netfilter.exp)"
331./net_netfilter.exp
332
333echo "TESTING: 4 bridges ARP (4bridges_arp.exp)"
334./4bridges_arp.exp
335
336echo "TESTING: 4 bridges IP (4bridges_ip.exp)"
337./4bridges_ip.exp
338
339echo "TESTING: login SSH (login_ssh.exp)" 62echo "TESTING: login SSH (login_ssh.exp)"
340./login_ssh.exp 63./login_ssh.exp
341 64
342echo "TESTING: ARP (net_arp.exp)"
343./net_arp.exp
344
345echo "TESTING: DNS (dns.exp)"
346./dns.exp
347
348echo "TESTING: firemon --arp (firemon-arp.exp)" 65echo "TESTING: firemon --arp (firemon-arp.exp)"
349./firemon-arp.exp 66./firemon-arp.exp
350 67
351echo "TESTING: firemon --route (firemon-route.exp)" 68echo "TESTING: firemon --route (firemon-route.exp)"
352./firemon-route.exp 69./firemon-route.exp
353 70
354echo "TESTING: firemon --seccomp (firemon-seccomp.exp)"
355./firemon-seccomp.exp
356
357echo "TESTING: firemon --caps (firemon-caps.exp)"
358./firemon-caps.exp
359 71