diff options
-rwxr-xr-x | test/apps-x11/apps-x11.sh | 17 | ||||
-rwxr-xr-x | test/chroot/chroot.sh | 2 | ||||
-rwxr-xr-x | test/compile/compile.sh | 45 | ||||
-rwxr-xr-x | test/environment/environment.sh | 15 | ||||
-rwxr-xr-x | test/features/test.sh | 35 | ||||
-rwxr-xr-x | test/filters/filters.sh | 52 | ||||
-rwxr-xr-x | test/fs/fs.sh | 22 | ||||
-rwxr-xr-x | test/overlay/overlay.sh | 9 | ||||
-rwxr-xr-x | test/root/root.sh | 8 | ||||
-rwxr-xr-x | test/utils/catchsignal.sh | 26 | ||||
-rwxr-xr-x | test/utils/catchsignal2.sh | 66 | ||||
-rwxr-xr-x | test/utils/utils.sh | 12 |
12 files changed, 150 insertions, 159 deletions
diff --git a/test/apps-x11/apps-x11.sh b/test/apps-x11/apps-x11.sh index 9f8102738..b2722eed3 100755 --- a/test/apps-x11/apps-x11.sh +++ b/test/apps-x11/apps-x11.sh | |||
@@ -10,7 +10,6 @@ export LC_ALL=C | |||
10 | echo "TESTING: no x11 (test/apps-x11/x11-none.exp)" | 10 | echo "TESTING: no x11 (test/apps-x11/x11-none.exp)" |
11 | ./x11-none.exp | 11 | ./x11-none.exp |
12 | 12 | ||
13 | |||
14 | if command -v xterm | 13 | if command -v xterm |
15 | then | 14 | then |
16 | echo "TESTING: xterm x11 xorg" | 15 | echo "TESTING: xterm x11 xorg" |
@@ -18,14 +17,14 @@ then | |||
18 | 17 | ||
19 | if command -v xpra | 18 | if command -v xpra |
20 | then | 19 | then |
21 | echo "TESTING: xterm x11 xpra" | 20 | echo "TESTING: xterm x11 xpra" |
22 | ./xterm-xpra.exp | 21 | ./xterm-xpra.exp |
23 | fi | 22 | fi |
24 | 23 | ||
25 | if command -v Xephyr | 24 | if command -v Xephyr |
26 | then | 25 | then |
27 | echo "TESTING: xterm x11 xephyr" | 26 | echo "TESTING: xterm x11 xephyr" |
28 | ./xterm-xephyr.exp | 27 | ./xterm-xephyr.exp |
29 | fi | 28 | fi |
30 | else | 29 | else |
31 | echo "TESTING SKIP: xterm not found" | 30 | echo "TESTING SKIP: xterm not found" |
@@ -34,14 +33,14 @@ fi | |||
34 | # check xpra/xephyr | 33 | # check xpra/xephyr |
35 | if command -v xpra | 34 | if command -v xpra |
36 | then | 35 | then |
37 | echo "xpra found" | 36 | echo "xpra found" |
38 | else | 37 | else |
39 | echo "xpra not found" | 38 | echo "xpra not found" |
40 | if command -v Xephyr | 39 | if command -v Xephyr |
41 | then | 40 | then |
42 | echo "Xephyr found" | 41 | echo "Xephyr found" |
43 | else | 42 | else |
44 | echo "TESTING SKIP: xpra and/or Xephyr not found" | 43 | echo "TESTING SKIP: xpra and/or Xephyr not found" |
45 | exit | 44 | exit |
46 | fi | 45 | fi |
47 | fi | 46 | fi |
diff --git a/test/chroot/chroot.sh b/test/chroot/chroot.sh index 3c3e7311b..f5ccf3549 100755 --- a/test/chroot/chroot.sh +++ b/test/chroot/chroot.sh | |||
@@ -17,6 +17,4 @@ echo "TESTING: chroot (test/chroot/fs_chroot.exp)" | |||
17 | echo "TESTING: unchroot as root (test/chroot/unchroot-as-root.exp)" | 17 | echo "TESTING: unchroot as root (test/chroot/unchroot-as-root.exp)" |
18 | sudo ./unchroot-as-root.exp | 18 | sudo ./unchroot-as-root.exp |
19 | 19 | ||
20 | |||
21 | |||
22 | rm -f unchroot | 20 | rm -f unchroot |
diff --git a/test/compile/compile.sh b/test/compile/compile.sh index 96a14d0cb..48c8dd2c4 100755 --- a/test/compile/compile.sh +++ b/test/compile/compile.sh | |||
@@ -53,17 +53,17 @@ print_title() { | |||
53 | 53 | ||
54 | DIST="$1" | 54 | DIST="$1" |
55 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . | 55 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . |
56 | case "$1" in | 56 | case "$1" in |
57 | --clean) | 57 | --clean) |
58 | cleanup | 58 | cleanup |
59 | exit | 59 | exit |
60 | ;; | 60 | ;; |
61 | --help) | 61 | --help) |
62 | echo "./compile.sh [--clean|--help]" | 62 | echo "./compile.sh [--clean|--help]" |
63 | exit | 63 | exit |
64 | ;; | 64 | ;; |
65 | esac | 65 | esac |
66 | shift # Check next set of parameters. | 66 | shift # Check next set of parameters. |
67 | done | 67 | done |
68 | 68 | ||
69 | cleanup | 69 | cleanup |
@@ -89,7 +89,6 @@ cp output-configure oc1 | |||
89 | cp output-make om1 | 89 | cp output-make om1 |
90 | rm output-configure output-make | 90 | rm output-configure output-make |
91 | 91 | ||
92 | |||
93 | #***************************************************************** | 92 | #***************************************************************** |
94 | # TEST 2 | 93 | # TEST 2 |
95 | #***************************************************************** | 94 | #***************************************************************** |
@@ -98,7 +97,7 @@ rm output-configure output-make | |||
98 | print_title "${arr[2]}" | 97 | print_title "${arr[2]}" |
99 | cd firejail | 98 | cd firejail |
100 | make distclean | 99 | make distclean |
101 | ./configure --prefix=/usr --disable-dbusproxy --enable-fatal-warnings 2>&1 | tee ../output-configure | 100 | ./configure --prefix=/usr --disable-dbusproxy --enable-fatal-warnings 2>&1 | tee ../output-configure |
102 | make -j4 2>&1 | tee ../output-make | 101 | make -j4 2>&1 | tee ../output-make |
103 | cd .. | 102 | cd .. |
104 | grep Warning output-configure output-make > ./report-test2 | 103 | grep Warning output-configure output-make > ./report-test2 |
@@ -115,7 +114,7 @@ rm output-configure output-make | |||
115 | print_title "${arr[3]}" | 114 | print_title "${arr[3]}" |
116 | cd firejail | 115 | cd firejail |
117 | make distclean | 116 | make distclean |
118 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure | 117 | ./configure --prefix=/usr --disable-chroot --enable-fatal-warnings 2>&1 | tee ../output-configure |
119 | make -j4 2>&1 | tee ../output-make | 118 | make -j4 2>&1 | tee ../output-make |
120 | cd .. | 119 | cd .. |
121 | grep Warning output-configure output-make > ./report-test3 | 120 | grep Warning output-configure output-make > ./report-test3 |
@@ -132,7 +131,7 @@ rm output-configure output-make | |||
132 | print_title "${arr[4]}" | 131 | print_title "${arr[4]}" |
133 | cd firejail | 132 | cd firejail |
134 | make distclean | 133 | make distclean |
135 | ./configure --prefix=/usr --disable-firetunnel --enable-fatal-warnings 2>&1 | tee ../output-configure | 134 | ./configure --prefix=/usr --disable-firetunnel --enable-fatal-warnings 2>&1 | tee ../output-configure |
136 | make -j4 2>&1 | tee ../output-make | 135 | make -j4 2>&1 | tee ../output-make |
137 | cd .. | 136 | cd .. |
138 | grep Warning output-configure output-make > ./report-test4 | 137 | grep Warning output-configure output-make > ./report-test4 |
@@ -149,7 +148,7 @@ rm output-configure output-make | |||
149 | print_title "${arr[5]}" | 148 | print_title "${arr[5]}" |
150 | cd firejail | 149 | cd firejail |
151 | make distclean | 150 | make distclean |
152 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure | 151 | ./configure --prefix=/usr --disable-userns --enable-fatal-warnings 2>&1 | tee ../output-configure |
153 | make -j4 2>&1 | tee ../output-make | 152 | make -j4 2>&1 | tee ../output-make |
154 | cd .. | 153 | cd .. |
155 | grep Warning output-configure output-make > ./report-test5 | 154 | grep Warning output-configure output-make > ./report-test5 |
@@ -167,7 +166,7 @@ rm output-configure output-make | |||
167 | print_title "${arr[6]}" | 166 | print_title "${arr[6]}" |
168 | cd firejail | 167 | cd firejail |
169 | make distclean | 168 | make distclean |
170 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure | 169 | ./configure --prefix=/usr --disable-network --enable-fatal-warnings 2>&1 | tee ../output-configure |
171 | make -j4 2>&1 | tee ../output-make | 170 | make -j4 2>&1 | tee ../output-make |
172 | cd .. | 171 | cd .. |
173 | grep Warning output-configure output-make > ./report-test6 | 172 | grep Warning output-configure output-make > ./report-test6 |
@@ -184,7 +183,7 @@ rm output-configure output-make | |||
184 | print_title "${arr[7]}" | 183 | print_title "${arr[7]}" |
185 | cd firejail | 184 | cd firejail |
186 | make distclean | 185 | make distclean |
187 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure | 186 | ./configure --prefix=/usr --disable-x11 --enable-fatal-warnings 2>&1 | tee ../output-configure |
188 | make -j4 2>&1 | tee ../output-make | 187 | make -j4 2>&1 | tee ../output-make |
189 | cd .. | 188 | cd .. |
190 | grep Warning output-configure output-make > ./report-test7 | 189 | grep Warning output-configure output-make > ./report-test7 |
@@ -218,7 +217,7 @@ rm output-configure output-make | |||
218 | print_title "${arr[9]}" | 217 | print_title "${arr[9]}" |
219 | cd firejail | 218 | cd firejail |
220 | make distclean | 219 | make distclean |
221 | ./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure | 220 | ./configure --prefix=/usr --disable-file-transfer --enable-fatal-warnings 2>&1 | tee ../output-configure |
222 | make -j4 2>&1 | tee ../output-make | 221 | make -j4 2>&1 | tee ../output-make |
223 | cd .. | 222 | cd .. |
224 | grep Warning output-configure output-make > ./report-test9 | 223 | grep Warning output-configure output-make > ./report-test9 |
@@ -235,7 +234,7 @@ rm output-configure output-make | |||
235 | print_title "${arr[10]}" | 234 | print_title "${arr[10]}" |
236 | cd firejail | 235 | cd firejail |
237 | make distclean | 236 | make distclean |
238 | ./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure | 237 | ./configure --prefix=/usr --disable-whitelist --enable-fatal-warnings 2>&1 | tee ../output-configure |
239 | make -j4 2>&1 | tee ../output-make | 238 | make -j4 2>&1 | tee ../output-make |
240 | cd .. | 239 | cd .. |
241 | grep Warning output-configure output-make > ./report-test10 | 240 | grep Warning output-configure output-make > ./report-test10 |
@@ -252,7 +251,7 @@ rm output-configure output-make | |||
252 | print_title "${arr[11]}" | 251 | print_title "${arr[11]}" |
253 | cd firejail | 252 | cd firejail |
254 | make distclean | 253 | make distclean |
255 | ./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure | 254 | ./configure --prefix=/usr --disable-globalcfg --enable-fatal-warnings 2>&1 | tee ../output-configure |
256 | make -j4 2>&1 | tee ../output-make | 255 | make -j4 2>&1 | tee ../output-make |
257 | cd .. | 256 | cd .. |
258 | grep Warning output-configure output-make > ./report-test11 | 257 | grep Warning output-configure output-make > ./report-test11 |
@@ -269,7 +268,7 @@ rm output-configure output-make | |||
269 | print_title "${arr[12]}" | 268 | print_title "${arr[12]}" |
270 | cd firejail | 269 | cd firejail |
271 | make distclean | 270 | make distclean |
272 | ./configure --prefix=/usr --enable-apparmor --enable-fatal-warnings 2>&1 | tee ../output-configure | 271 | ./configure --prefix=/usr --enable-apparmor --enable-fatal-warnings 2>&1 | tee ../output-configure |
273 | make -j4 2>&1 | tee ../output-make | 272 | make -j4 2>&1 | tee ../output-make |
274 | cd .. | 273 | cd .. |
275 | grep Warning output-configure output-make > ./report-test12 | 274 | grep Warning output-configure output-make > ./report-test12 |
@@ -354,7 +353,7 @@ rm output-configure output-make | |||
354 | print_title "${arr[17]}" | 353 | print_title "${arr[17]}" |
355 | cd firejail | 354 | cd firejail |
356 | make distclean | 355 | make distclean |
357 | ./configure --prefix=/usr --disable-usertmpfs --enable-fatal-warnings 2>&1 | tee ../output-configure | 356 | ./configure --prefix=/usr --disable-usertmpfs --enable-fatal-warnings 2>&1 | tee ../output-configure |
358 | make -j4 2>&1 | tee ../output-make | 357 | make -j4 2>&1 | tee ../output-make |
359 | cd .. | 358 | cd .. |
360 | grep Warning output-configure output-make > ./report-test17 | 359 | grep Warning output-configure output-make > ./report-test17 |
diff --git a/test/environment/environment.sh b/test/environment/environment.sh index f6acada73..ddc9a80a9 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh | |||
@@ -7,7 +7,6 @@ export MALLOC_CHECK_=3 | |||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | export LC_ALL=C | 8 | export LC_ALL=C |
9 | 9 | ||
10 | |||
11 | echo "TESTING: timeout (test/environment/timeout.exp)" | 10 | echo "TESTING: timeout (test/environment/timeout.exp)" |
12 | ./timeout.exp | 11 | ./timeout.exp |
13 | 12 | ||
@@ -41,10 +40,10 @@ echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail- | |||
41 | 40 | ||
42 | if command -v aplay && [ "$(aplay -l | grep -c "List of PLAYBACK")" -gt 0 ]; | 41 | if command -v aplay && [ "$(aplay -l | grep -c "List of PLAYBACK")" -gt 0 ]; |
43 | then | 42 | then |
44 | echo "TESTING: sound (test/environment/sound.exp)" | 43 | echo "TESTING: sound (test/environment/sound.exp)" |
45 | ./sound.exp | 44 | ./sound.exp |
46 | else | 45 | else |
47 | echo "TESTING SKIP: no aplay or sound card found" | 46 | echo "TESTING SKIP: no aplay or sound card found" |
48 | fi | 47 | fi |
49 | 48 | ||
50 | echo "TESTING: nice (test/environment/nice.exp)" | 49 | echo "TESTING: nice (test/environment/nice.exp)" |
@@ -55,10 +54,10 @@ echo "TESTING: quiet (test/environment/quiet.exp)" | |||
55 | 54 | ||
56 | if command -v strace | 55 | if command -v strace |
57 | then | 56 | then |
58 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" | 57 | echo "TESTING: --allow-debuggers (test/environment/allow-debuggers.exp)" |
59 | ./allow-debuggers.exp | 58 | ./allow-debuggers.exp |
60 | else | 59 | else |
61 | echo "TESTING SKIP: strace not found" | 60 | echo "TESTING SKIP: strace not found" |
62 | fi | 61 | fi |
63 | 62 | ||
64 | # to install ibus: | 63 | # to install ibus: |
@@ -70,7 +69,7 @@ then | |||
70 | echo "TESTING: ibus (test/environment/ibus.exp)" | 69 | echo "TESTING: ibus (test/environment/ibus.exp)" |
71 | ./ibus.exp | 70 | ./ibus.exp |
72 | else | 71 | else |
73 | echo "TESTING SKIP: ibus not configured" | 72 | echo "TESTING SKIP: ibus not configured" |
74 | fi | 73 | fi |
75 | 74 | ||
76 | echo "TESTING: rlimit (test/environment/rlimit.exp)" | 75 | echo "TESTING: rlimit (test/environment/rlimit.exp)" |
diff --git a/test/features/test.sh b/test/features/test.sh index 64cb78c21..aaf5fd089 100755 --- a/test/features/test.sh +++ b/test/features/test.sh | |||
@@ -9,27 +9,24 @@ CHROOT="chroot" | |||
9 | NETWORK="network" | 9 | NETWORK="network" |
10 | 10 | ||
11 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . | 11 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . |
12 | case "$1" in | 12 | case "$1" in |
13 | --nooverlay) | 13 | --nooverlay) |
14 | OVERLAY="none" | 14 | OVERLAY="none" |
15 | ;; | 15 | ;; |
16 | --nochroot) | 16 | --nochroot) |
17 | CHROOT="none" | 17 | CHROOT="none" |
18 | ;; | 18 | ;; |
19 | --nonetwork) | 19 | --nonetwork) |
20 | NETWORK="none" | 20 | NETWORK="none" |
21 | ;; | 21 | ;; |
22 | --help) | 22 | --help) |
23 | echo "./test.sh [--nooverlay|--nochroot|--nonetwork|--help] | grep TESTING" | 23 | echo "./test.sh [--nooverlay|--nochroot|--nonetwork|--help] | grep TESTING" |
24 | exit | 24 | exit |
25 | ;; | 25 | ;; |
26 | esac | 26 | esac |
27 | shift # Check next set of parameters. | 27 | shift # Check next set of parameters. |
28 | done | 28 | done |
29 | 29 | ||
30 | |||
31 | |||
32 | |||
33 | # | 30 | # |
34 | # Feature testing | 31 | # Feature testing |
35 | # | 32 | # |
diff --git a/test/filters/filters.sh b/test/filters/filters.sh index 1c6b812ff..918f05adc 100755 --- a/test/filters/filters.sh +++ b/test/filters/filters.sh | |||
@@ -21,23 +21,23 @@ else | |||
21 | fi | 21 | fi |
22 | 22 | ||
23 | if [ "$(uname -m)" = "x86_64" ]; then | 23 | if [ "$(uname -m)" = "x86_64" ]; then |
24 | echo "TESTING: memory-deny-write-execute (test/filters/memwrexe.exp)" | 24 | echo "TESTING: memory-deny-write-execute (test/filters/memwrexe.exp)" |
25 | ./memwrexe.exp | 25 | ./memwrexe.exp |
26 | elif [ "$(uname -m)" = "i686" ]; then | 26 | elif [ "$(uname -m)" = "i686" ]; then |
27 | echo "TESTING: memory-deny-write-execute (test/filters/memwrexe-32.exp)" | 27 | echo "TESTING: memory-deny-write-execute (test/filters/memwrexe-32.exp)" |
28 | ./memwrexe-32.exp | 28 | ./memwrexe-32.exp |
29 | else | 29 | else |
30 | echo "TESTING SKIP: memwrexe binary only running on x86_64 and i686." | 30 | echo "TESTING SKIP: memwrexe binary only running on x86_64 and i686." |
31 | fi | 31 | fi |
32 | 32 | ||
33 | echo "TESTING: debug options (test/filters/debug.exp)" | 33 | echo "TESTING: debug options (test/filters/debug.exp)" |
34 | ./debug.exp | 34 | ./debug.exp |
35 | 35 | ||
36 | if [ "$(uname -m)" = "x86_64" ]; then | 36 | if [ "$(uname -m)" = "x86_64" ]; then |
37 | echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" | 37 | echo "TESTING: seccomp run files (test/filters/seccomp-run-files.exp)" |
38 | ./seccomp-run-files.exp | 38 | ./seccomp-run-files.exp |
39 | else | 39 | else |
40 | echo "TESTING SKIP: seccomp-run-files test implemented only for x86_64." | 40 | echo "TESTING SKIP: seccomp-run-files test implemented only for x86_64." |
41 | fi | 41 | fi |
42 | 42 | ||
43 | echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)" | 43 | echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)" |
@@ -62,32 +62,32 @@ echo "TESTING: capabilities join (test/filters/caps-join.exp)" | |||
62 | 62 | ||
63 | rm -f seccomp-test-file | 63 | rm -f seccomp-test-file |
64 | if [ "$(uname -m)" = "x86_64" ]; then | 64 | if [ "$(uname -m)" = "x86_64" ]; then |
65 | echo "TESTING: fseccomp (test/filters/fseccomp.exp)" | 65 | echo "TESTING: fseccomp (test/filters/fseccomp.exp)" |
66 | ./fseccomp.exp | 66 | ./fseccomp.exp |
67 | else | 67 | else |
68 | echo "TESTING SKIP: fseccomp test implemented only for x86_64" | 68 | echo "TESTING SKIP: fseccomp test implemented only for x86_64" |
69 | fi | 69 | fi |
70 | rm -f seccomp-test-file | 70 | rm -f seccomp-test-file |
71 | 71 | ||
72 | 72 | ||
73 | if [ "$(uname -m)" = "x86_64" ]; then | 73 | if [ "$(uname -m)" = "x86_64" ]; then |
74 | echo "TESTING: protocol (test/filters/protocol.exp)" | 74 | echo "TESTING: protocol (test/filters/protocol.exp)" |
75 | ./protocol.exp | 75 | ./protocol.exp |
76 | else | 76 | else |
77 | echo "TESTING SKIP: protocol, running only on x86_64" | 77 | echo "TESTING SKIP: protocol, running only on x86_64" |
78 | fi | 78 | fi |
79 | 79 | ||
80 | echo "TESTING: seccomp bad empty (test/filters/seccomp-bad-empty.exp)" | 80 | echo "TESTING: seccomp bad empty (test/filters/seccomp-bad-empty.exp)" |
81 | ./seccomp-bad-empty.exp | 81 | ./seccomp-bad-empty.exp |
82 | 82 | ||
83 | if [ "$(uname -m)" = "x86_64" ]; then | 83 | if [ "$(uname -m)" = "x86_64" ]; then |
84 | echo "TESTING: seccomp debug (test/filters/seccomp-debug.exp)" | 84 | echo "TESTING: seccomp debug (test/filters/seccomp-debug.exp)" |
85 | ./seccomp-debug.exp | 85 | ./seccomp-debug.exp |
86 | elif [ "$(uname -m)" = "i686" ]; then | 86 | elif [ "$(uname -m)" = "i686" ]; then |
87 | echo "TESTING: seccomp debug (test/filters/seccomp-debug-32.exp)" | 87 | echo "TESTING: seccomp debug (test/filters/seccomp-debug-32.exp)" |
88 | ./seccomp-debug-32.exp | 88 | ./seccomp-debug-32.exp |
89 | else | 89 | else |
90 | echo "TESTING SKIP: protocol, running only on x86_64 and i686" | 90 | echo "TESTING SKIP: protocol, running only on x86_64 and i686" |
91 | fi | 91 | fi |
92 | 92 | ||
93 | echo "TESTING: seccomp errno (test/filters/seccomp-errno.exp)" | 93 | echo "TESTING: seccomp errno (test/filters/seccomp-errno.exp)" |
@@ -97,10 +97,10 @@ echo "TESTING: seccomp su (test/filters/seccomp-su.exp)" | |||
97 | ./seccomp-su.exp | 97 | ./seccomp-su.exp |
98 | 98 | ||
99 | if command -v strace; then | 99 | if command -v strace; then |
100 | echo "TESTING: seccomp ptrace (test/filters/seccomp-ptrace.exp)" | 100 | echo "TESTING: seccomp ptrace (test/filters/seccomp-ptrace.exp)" |
101 | ./seccomp-ptrace.exp | 101 | ./seccomp-ptrace.exp |
102 | else | 102 | else |
103 | echo "TESTING SKIP: ptrace, strace not found" | 103 | echo "TESTING SKIP: ptrace, strace not found" |
104 | fi | 104 | fi |
105 | 105 | ||
106 | echo "TESTING: seccomp chmod - seccomp lists (test/filters/seccomp-chmod.exp)" | 106 | echo "TESTING: seccomp chmod - seccomp lists (test/filters/seccomp-chmod.exp)" |
@@ -115,15 +115,15 @@ echo "TESTING: seccomp empty (test/filters/seccomp-empty.exp)" | |||
115 | ./seccomp-empty.exp | 115 | ./seccomp-empty.exp |
116 | 116 | ||
117 | if [ "$(uname -m)" = "x86_64" ]; then | 117 | if [ "$(uname -m)" = "x86_64" ]; then |
118 | echo "TESTING: seccomp numeric (test/filters/seccomp-numeric.exp)" | 118 | echo "TESTING: seccomp numeric (test/filters/seccomp-numeric.exp)" |
119 | ./seccomp-numeric.exp | 119 | ./seccomp-numeric.exp |
120 | else | 120 | else |
121 | echo "TESTING SKIP: seccomp numeric test implemented only for x86_64" | 121 | echo "TESTING SKIP: seccomp numeric test implemented only for x86_64" |
122 | fi | 122 | fi |
123 | 123 | ||
124 | if [ "$(uname -m)" = "x86_64" ]; then | 124 | if [ "$(uname -m)" = "x86_64" ]; then |
125 | echo "TESTING: seccomp join (test/filters/seccomp-join.exp)" | 125 | echo "TESTING: seccomp join (test/filters/seccomp-join.exp)" |
126 | ./seccomp-join.exp | 126 | ./seccomp-join.exp |
127 | else | 127 | else |
128 | echo "TESTING SKIP: seccomp join test implemented only for x86_64" | 128 | echo "TESTING SKIP: seccomp join test implemented only for x86_64" |
129 | fi | 129 | fi |
diff --git a/test/fs/fs.sh b/test/fs/fs.sh index 36ff30934..07d33bee6 100755 --- a/test/fs/fs.sh +++ b/test/fs/fs.sh | |||
@@ -46,14 +46,14 @@ echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" | |||
46 | rm -f /var/tmp/_firejail_test_file | 46 | rm -f /var/tmp/_firejail_test_file |
47 | 47 | ||
48 | if [ "$(uname -m)" = "x86_64" ]; then | 48 | if [ "$(uname -m)" = "x86_64" ]; then |
49 | fjconfig=/etc/firejail/firejail.config | 49 | fjconfig=/etc/firejail/firejail.config |
50 | printf 'private-lib yes\n' | sudo tee -a "$fjconfig" >/dev/null | 50 | printf 'private-lib yes\n' | sudo tee -a "$fjconfig" >/dev/null |
51 | echo "TESTING: private-lib (test/fs/private-lib.exp)" | 51 | echo "TESTING: private-lib (test/fs/private-lib.exp)" |
52 | ./private-lib.exp | 52 | ./private-lib.exp |
53 | printf '%s\n' "$(sed '/^private-lib yes$/d' "$fjconfig")" | | 53 | printf '%s\n' "$(sed '/^private-lib yes$/d' "$fjconfig")" | |
54 | sudo tee "$fjconfig" >/dev/null | 54 | sudo tee "$fjconfig" >/dev/null |
55 | else | 55 | else |
56 | echo "TESTING SKIP: private-lib test implemented only for x86_64." | 56 | echo "TESTING SKIP: private-lib test implemented only for x86_64." |
57 | fi | 57 | fi |
58 | 58 | ||
59 | echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" | 59 | echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" |
@@ -61,11 +61,11 @@ echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" | |||
61 | rm -f /var/lock/_firejail_test_file | 61 | rm -f /var/lock/_firejail_test_file |
62 | 62 | ||
63 | if [ -w /dev/shm ]; then | 63 | if [ -w /dev/shm ]; then |
64 | echo "TESTING: read/write /dev/shm (test/fs/fs_dev_shm.exp)" | 64 | echo "TESTING: read/write /dev/shm (test/fs/fs_dev_shm.exp)" |
65 | ./fs_dev_shm.exp | 65 | ./fs_dev_shm.exp |
66 | rm -f /dev/shm/_firejail_test_file | 66 | rm -f /dev/shm/_firejail_test_file |
67 | else | 67 | else |
68 | echo "TESTING SKIP: /dev/shm not writable" | 68 | echo "TESTING SKIP: /dev/shm not writable" |
69 | fi | 69 | fi |
70 | 70 | ||
71 | echo "TESTING: private (test/fs/private.exp)" | 71 | echo "TESTING: private (test/fs/private.exp)" |
diff --git a/test/overlay/overlay.sh b/test/overlay/overlay.sh index 9bc458f50..a0519d1ad 100755 --- a/test/overlay/overlay.sh +++ b/test/overlay/overlay.sh | |||
@@ -38,18 +38,17 @@ else | |||
38 | echo "TESTING SKIP: firefox not found" | 38 | echo "TESTING SKIP: firefox not found" |
39 | fi | 39 | fi |
40 | 40 | ||
41 | |||
42 | # check xpra/xephyr | 41 | # check xpra/xephyr |
43 | if command -v xpra | 42 | if command -v xpra |
44 | then | 43 | then |
45 | echo "xpra found" | 44 | echo "xpra found" |
46 | else | 45 | else |
47 | echo "xpra not found" | 46 | echo "xpra not found" |
48 | if command -v Xephyr | 47 | if command -v Xephyr |
49 | then | 48 | then |
50 | echo "Xephyr found" | 49 | echo "Xephyr found" |
51 | else | 50 | else |
52 | echo "TESTING SKIP: xpra and/or Xephyr not found" | 51 | echo "TESTING SKIP: xpra and/or Xephyr not found" |
53 | exit | 52 | exit |
54 | fi | 53 | fi |
55 | fi | 54 | fi |
diff --git a/test/root/root.sh b/test/root/root.sh index e3b48d15b..15c4bbd13 100755 --- a/test/root/root.sh +++ b/test/root/root.sh | |||
@@ -29,7 +29,7 @@ then | |||
29 | echo "TESTING: snmpd (test/root/snmpd.exp)" | 29 | echo "TESTING: snmpd (test/root/snmpd.exp)" |
30 | ./snmpd.exp | 30 | ./snmpd.exp |
31 | else | 31 | else |
32 | echo "TESTING SKIP: snmpd not found" | 32 | echo "TESTING SKIP: snmpd not found" |
33 | fi | 33 | fi |
34 | 34 | ||
35 | 35 | ||
@@ -38,7 +38,7 @@ then | |||
38 | echo "TESTING: apache2 (test/root/apache2.exp)" | 38 | echo "TESTING: apache2 (test/root/apache2.exp)" |
39 | ./apache2.exp | 39 | ./apache2.exp |
40 | else | 40 | else |
41 | echo "TESTING SKIP: apache2 not found" | 41 | echo "TESTING SKIP: apache2 not found" |
42 | fi | 42 | fi |
43 | 43 | ||
44 | if [ -f /etc/init.d/isc-dhcp-server ] | 44 | if [ -f /etc/init.d/isc-dhcp-server ] |
@@ -54,7 +54,7 @@ then | |||
54 | echo "TESTING: unbound (test/root/unbound.exp)" | 54 | echo "TESTING: unbound (test/root/unbound.exp)" |
55 | ./unbound.exp | 55 | ./unbound.exp |
56 | else | 56 | else |
57 | echo "TESTING SKIP: unbound not found" | 57 | echo "TESTING SKIP: unbound not found" |
58 | fi | 58 | fi |
59 | 59 | ||
60 | if [ -f /etc/init.d/nginx ] | 60 | if [ -f /etc/init.d/nginx ] |
@@ -62,7 +62,7 @@ then | |||
62 | echo "TESTING: nginx (test/root/nginx.exp)" | 62 | echo "TESTING: nginx (test/root/nginx.exp)" |
63 | ./nginx.exp | 63 | ./nginx.exp |
64 | else | 64 | else |
65 | echo "TESTING SKIP: nginx not found" | 65 | echo "TESTING SKIP: nginx not found" |
66 | fi | 66 | fi |
67 | 67 | ||
68 | #******************************** | 68 | #******************************** |
diff --git a/test/utils/catchsignal.sh b/test/utils/catchsignal.sh index 117179143..cef00b2a5 100755 --- a/test/utils/catchsignal.sh +++ b/test/utils/catchsignal.sh | |||
@@ -4,20 +4,20 @@ | |||
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | _term() { | 6 | _term() { |
7 | echo "Caught Signal" | 7 | echo "Caught Signal" |
8 | echo 1 | 8 | echo 1 |
9 | sleep 1 | 9 | sleep 1 |
10 | echo 2 | 10 | echo 2 |
11 | sleep 1 | 11 | sleep 1 |
12 | echo 3 | 12 | echo 3 |
13 | sleep 1 | 13 | sleep 1 |
14 | echo 4 | 14 | echo 4 |
15 | sleep 1 | 15 | sleep 1 |
16 | echo 5 | 16 | echo 5 |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
19 | kill $pid | 19 | kill $pid |
20 | exit | 20 | exit |
21 | } | 21 | } |
22 | 22 | ||
23 | trap _term SIGTERM | 23 | trap _term SIGTERM |
diff --git a/test/utils/catchsignal2.sh b/test/utils/catchsignal2.sh index 1bd7852cd..21f299430 100755 --- a/test/utils/catchsignal2.sh +++ b/test/utils/catchsignal2.sh | |||
@@ -4,42 +4,42 @@ | |||
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | _term() { | 6 | _term() { |
7 | echo "Caught Signal" | 7 | echo "Caught Signal" |
8 | echo 1 | 8 | echo 1 |
9 | sleep 1 | 9 | sleep 1 |
10 | echo 2 | 10 | echo 2 |
11 | sleep 1 | 11 | sleep 1 |
12 | echo 3 | 12 | echo 3 |
13 | sleep 1 | 13 | sleep 1 |
14 | echo 4 | 14 | echo 4 |
15 | sleep 1 | 15 | sleep 1 |
16 | echo 5 | 16 | echo 5 |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
19 | echo 10 | 19 | echo 10 |
20 | sleep 1 | 20 | sleep 1 |
21 | echo 20 | 21 | echo 20 |
22 | sleep 1 | 22 | sleep 1 |
23 | echo 30 | 23 | echo 30 |
24 | sleep 1 | 24 | sleep 1 |
25 | echo 40 | 25 | echo 40 |
26 | sleep 1 | 26 | sleep 1 |
27 | echo 50 | 27 | echo 50 |
28 | sleep 1 | 28 | sleep 1 |
29 | 29 | ||
30 | echo 100 | 30 | echo 100 |
31 | sleep 1 | 31 | sleep 1 |
32 | echo 200 | 32 | echo 200 |
33 | sleep 1 | 33 | sleep 1 |
34 | echo 300 | 34 | echo 300 |
35 | sleep 1 | 35 | sleep 1 |
36 | echo 400 | 36 | echo 400 |
37 | sleep 1 | 37 | sleep 1 |
38 | echo 500 | 38 | echo 500 |
39 | sleep 1 | 39 | sleep 1 |
40 | 40 | ||
41 | kill $pid | 41 | kill $pid |
42 | exit | 42 | exit |
43 | } | 43 | } |
44 | 44 | ||
45 | trap _term SIGTERM | 45 | trap _term SIGTERM |
diff --git a/test/utils/utils.sh b/test/utils/utils.sh index ad36d7053..d1d006f4f 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh | |||
@@ -35,10 +35,10 @@ echo "TESTING: help (test/utils/help.exp)" | |||
35 | 35 | ||
36 | if command -v man | 36 | if command -v man |
37 | then | 37 | then |
38 | echo "TESTING: man (test/utils/man.exp)" | 38 | echo "TESTING: man (test/utils/man.exp)" |
39 | ./man.exp | 39 | ./man.exp |
40 | else | 40 | else |
41 | echo "TESTING SKIP: man not found" | 41 | echo "TESTING SKIP: man not found" |
42 | fi | 42 | fi |
43 | 43 | ||
44 | echo "TESTING: list (test/utils/list.exp)" | 44 | echo "TESTING: list (test/utils/list.exp)" |
@@ -49,10 +49,10 @@ echo "TESTING: tree (test/utils/tree.exp)" | |||
49 | 49 | ||
50 | if [ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]; | 50 | if [ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]; |
51 | then | 51 | then |
52 | echo "TESTING: cpu.print (test/utils/cpu-print.exp)" | 52 | echo "TESTING: cpu.print (test/utils/cpu-print.exp)" |
53 | ./cpu-print.exp | 53 | ./cpu-print.exp |
54 | else | 54 | else |
55 | echo "TESTING SKIP: cpu.print, not enough CPUs" | 55 | echo "TESTING SKIP: cpu.print, not enough CPUs" |
56 | fi | 56 | fi |
57 | 57 | ||
58 | echo "TESTING: fs.print (test/utils/fs-print.exp)" | 58 | echo "TESTING: fs.print (test/utils/fs-print.exp)" |