aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar a1346054 <36859588+a1346054@users.noreply.github.com>2022-09-13 20:01:07 +0000
committerLibravatar a1346054 <36859588+a1346054@users.noreply.github.com>2022-09-13 22:37:20 +0000
commit270f0d95e3f27445057981b26a2aa6474769f3f2 (patch)
treea0dd67c7c9205d6987a706ffaa0141df91948ca7
parenttests: add missing final newline (diff)
downloadfirejail-270f0d95e3f27445057981b26a2aa6474769f3f2.tar.gz
firejail-270f0d95e3f27445057981b26a2aa6474769f3f2.tar.zst
firejail-270f0d95e3f27445057981b26a2aa6474769f3f2.zip
tests: stop mixing tabs and spaces
-rwxr-xr-xtest/apps-x11/apps-x11.sh17
-rwxr-xr-xtest/chroot/chroot.sh2
-rwxr-xr-xtest/compile/compile.sh45
-rwxr-xr-xtest/environment/environment.sh15
-rwxr-xr-xtest/features/test.sh35
-rwxr-xr-xtest/filters/filters.sh52
-rwxr-xr-xtest/fs/fs.sh22
-rwxr-xr-xtest/overlay/overlay.sh9
-rwxr-xr-xtest/root/root.sh8
-rwxr-xr-xtest/utils/catchsignal.sh26
-rwxr-xr-xtest/utils/catchsignal2.sh66
-rwxr-xr-xtest/utils/utils.sh12
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
10echo "TESTING: no x11 (test/apps-x11/x11-none.exp)" 10echo "TESTING: no x11 (test/apps-x11/x11-none.exp)"
11./x11-none.exp 11./x11-none.exp
12 12
13
14if command -v xterm 13if command -v xterm
15then 14then
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
30else 29else
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
35if command -v xpra 34if command -v xpra
36then 35then
37 echo "xpra found" 36 echo "xpra found"
38else 37else
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
47fi 46fi
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)"
17echo "TESTING: unchroot as root (test/chroot/unchroot-as-root.exp)" 17echo "TESTING: unchroot as root (test/chroot/unchroot-as-root.exp)"
18sudo ./unchroot-as-root.exp 18sudo ./unchroot-as-root.exp
19 19
20
21
22rm -f unchroot 20rm -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
54DIST="$1" 54DIST="$1"
55while [ $# -gt 0 ]; do # Until you run out of parameters . . . 55while [ $# -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.
67done 67done
68 68
69cleanup 69cleanup
@@ -89,7 +89,6 @@ cp output-configure oc1
89cp output-make om1 89cp output-make om1
90rm output-configure output-make 90rm 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
98print_title "${arr[2]}" 97print_title "${arr[2]}"
99cd firejail 98cd firejail
100make distclean 99make 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
102make -j4 2>&1 | tee ../output-make 101make -j4 2>&1 | tee ../output-make
103cd .. 102cd ..
104grep Warning output-configure output-make > ./report-test2 103grep Warning output-configure output-make > ./report-test2
@@ -115,7 +114,7 @@ rm output-configure output-make
115print_title "${arr[3]}" 114print_title "${arr[3]}"
116cd firejail 115cd firejail
117make distclean 116make 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
119make -j4 2>&1 | tee ../output-make 118make -j4 2>&1 | tee ../output-make
120cd .. 119cd ..
121grep Warning output-configure output-make > ./report-test3 120grep Warning output-configure output-make > ./report-test3
@@ -132,7 +131,7 @@ rm output-configure output-make
132print_title "${arr[4]}" 131print_title "${arr[4]}"
133cd firejail 132cd firejail
134make distclean 133make 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
136make -j4 2>&1 | tee ../output-make 135make -j4 2>&1 | tee ../output-make
137cd .. 136cd ..
138grep Warning output-configure output-make > ./report-test4 137grep Warning output-configure output-make > ./report-test4
@@ -149,7 +148,7 @@ rm output-configure output-make
149print_title "${arr[5]}" 148print_title "${arr[5]}"
150cd firejail 149cd firejail
151make distclean 150make 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
153make -j4 2>&1 | tee ../output-make 152make -j4 2>&1 | tee ../output-make
154cd .. 153cd ..
155grep Warning output-configure output-make > ./report-test5 154grep Warning output-configure output-make > ./report-test5
@@ -167,7 +166,7 @@ rm output-configure output-make
167print_title "${arr[6]}" 166print_title "${arr[6]}"
168cd firejail 167cd firejail
169make distclean 168make 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
171make -j4 2>&1 | tee ../output-make 170make -j4 2>&1 | tee ../output-make
172cd .. 171cd ..
173grep Warning output-configure output-make > ./report-test6 172grep Warning output-configure output-make > ./report-test6
@@ -184,7 +183,7 @@ rm output-configure output-make
184print_title "${arr[7]}" 183print_title "${arr[7]}"
185cd firejail 184cd firejail
186make distclean 185make 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
188make -j4 2>&1 | tee ../output-make 187make -j4 2>&1 | tee ../output-make
189cd .. 188cd ..
190grep Warning output-configure output-make > ./report-test7 189grep Warning output-configure output-make > ./report-test7
@@ -218,7 +217,7 @@ rm output-configure output-make
218print_title "${arr[9]}" 217print_title "${arr[9]}"
219cd firejail 218cd firejail
220make distclean 219make 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
222make -j4 2>&1 | tee ../output-make 221make -j4 2>&1 | tee ../output-make
223cd .. 222cd ..
224grep Warning output-configure output-make > ./report-test9 223grep Warning output-configure output-make > ./report-test9
@@ -235,7 +234,7 @@ rm output-configure output-make
235print_title "${arr[10]}" 234print_title "${arr[10]}"
236cd firejail 235cd firejail
237make distclean 236make 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
239make -j4 2>&1 | tee ../output-make 238make -j4 2>&1 | tee ../output-make
240cd .. 239cd ..
241grep Warning output-configure output-make > ./report-test10 240grep Warning output-configure output-make > ./report-test10
@@ -252,7 +251,7 @@ rm output-configure output-make
252print_title "${arr[11]}" 251print_title "${arr[11]}"
253cd firejail 252cd firejail
254make distclean 253make 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
256make -j4 2>&1 | tee ../output-make 255make -j4 2>&1 | tee ../output-make
257cd .. 256cd ..
258grep Warning output-configure output-make > ./report-test11 257grep Warning output-configure output-make > ./report-test11
@@ -269,7 +268,7 @@ rm output-configure output-make
269print_title "${arr[12]}" 268print_title "${arr[12]}"
270cd firejail 269cd firejail
271make distclean 270make 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
273make -j4 2>&1 | tee ../output-make 272make -j4 2>&1 | tee ../output-make
274cd .. 273cd ..
275grep Warning output-configure output-make > ./report-test12 274grep Warning output-configure output-make > ./report-test12
@@ -354,7 +353,7 @@ rm output-configure output-make
354print_title "${arr[17]}" 353print_title "${arr[17]}"
355cd firejail 354cd firejail
356make distclean 355make 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
358make -j4 2>&1 | tee ../output-make 357make -j4 2>&1 | tee ../output-make
359cd .. 358cd ..
360grep Warning output-configure output-make > ./report-test17 359grep 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
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8export LC_ALL=C 8export LC_ALL=C
9 9
10
11echo "TESTING: timeout (test/environment/timeout.exp)" 10echo "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
42if command -v aplay && [ "$(aplay -l | grep -c "List of PLAYBACK")" -gt 0 ]; 41if command -v aplay && [ "$(aplay -l | grep -c "List of PLAYBACK")" -gt 0 ];
43then 42then
44 echo "TESTING: sound (test/environment/sound.exp)" 43 echo "TESTING: sound (test/environment/sound.exp)"
45 ./sound.exp 44 ./sound.exp
46else 45else
47 echo "TESTING SKIP: no aplay or sound card found" 46 echo "TESTING SKIP: no aplay or sound card found"
48fi 47fi
49 48
50echo "TESTING: nice (test/environment/nice.exp)" 49echo "TESTING: nice (test/environment/nice.exp)"
@@ -55,10 +54,10 @@ echo "TESTING: quiet (test/environment/quiet.exp)"
55 54
56if command -v strace 55if command -v strace
57then 56then
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
60else 59else
61 echo "TESTING SKIP: strace not found" 60 echo "TESTING SKIP: strace not found"
62fi 61fi
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
72else 71else
73 echo "TESTING SKIP: ibus not configured" 72 echo "TESTING SKIP: ibus not configured"
74fi 73fi
75 74
76echo "TESTING: rlimit (test/environment/rlimit.exp)" 75echo "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"
9NETWORK="network" 9NETWORK="network"
10 10
11while [ $# -gt 0 ]; do # Until you run out of parameters . . . 11while [ $# -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.
28done 28done
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
21fi 21fi
22 22
23if [ "$(uname -m)" = "x86_64" ]; then 23if [ "$(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
26elif [ "$(uname -m)" = "i686" ]; then 26elif [ "$(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
29else 29else
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."
31fi 31fi
32 32
33echo "TESTING: debug options (test/filters/debug.exp)" 33echo "TESTING: debug options (test/filters/debug.exp)"
34./debug.exp 34./debug.exp
35 35
36if [ "$(uname -m)" = "x86_64" ]; then 36if [ "$(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
39else 39else
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."
41fi 41fi
42 42
43echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)" 43echo "TESTING: seccomp postexec (test/filters/seccomp-postexec.exp)"
@@ -62,32 +62,32 @@ echo "TESTING: capabilities join (test/filters/caps-join.exp)"
62 62
63rm -f seccomp-test-file 63rm -f seccomp-test-file
64if [ "$(uname -m)" = "x86_64" ]; then 64if [ "$(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
67else 67else
68 echo "TESTING SKIP: fseccomp test implemented only for x86_64" 68 echo "TESTING SKIP: fseccomp test implemented only for x86_64"
69fi 69fi
70rm -f seccomp-test-file 70rm -f seccomp-test-file
71 71
72 72
73if [ "$(uname -m)" = "x86_64" ]; then 73if [ "$(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
76else 76else
77 echo "TESTING SKIP: protocol, running only on x86_64" 77 echo "TESTING SKIP: protocol, running only on x86_64"
78fi 78fi
79 79
80echo "TESTING: seccomp bad empty (test/filters/seccomp-bad-empty.exp)" 80echo "TESTING: seccomp bad empty (test/filters/seccomp-bad-empty.exp)"
81./seccomp-bad-empty.exp 81./seccomp-bad-empty.exp
82 82
83if [ "$(uname -m)" = "x86_64" ]; then 83if [ "$(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
86elif [ "$(uname -m)" = "i686" ]; then 86elif [ "$(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
89else 89else
90 echo "TESTING SKIP: protocol, running only on x86_64 and i686" 90 echo "TESTING SKIP: protocol, running only on x86_64 and i686"
91fi 91fi
92 92
93echo "TESTING: seccomp errno (test/filters/seccomp-errno.exp)" 93echo "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
99if command -v strace; then 99if 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
102else 102else
103 echo "TESTING SKIP: ptrace, strace not found" 103 echo "TESTING SKIP: ptrace, strace not found"
104fi 104fi
105 105
106echo "TESTING: seccomp chmod - seccomp lists (test/filters/seccomp-chmod.exp)" 106echo "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
117if [ "$(uname -m)" = "x86_64" ]; then 117if [ "$(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
120else 120else
121 echo "TESTING SKIP: seccomp numeric test implemented only for x86_64" 121 echo "TESTING SKIP: seccomp numeric test implemented only for x86_64"
122fi 122fi
123 123
124if [ "$(uname -m)" = "x86_64" ]; then 124if [ "$(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
127else 127else
128 echo "TESTING SKIP: seccomp join test implemented only for x86_64" 128 echo "TESTING SKIP: seccomp join test implemented only for x86_64"
129fi 129fi
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)"
46rm -f /var/tmp/_firejail_test_file 46rm -f /var/tmp/_firejail_test_file
47 47
48if [ "$(uname -m)" = "x86_64" ]; then 48if [ "$(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
55else 55else
56 echo "TESTING SKIP: private-lib test implemented only for x86_64." 56 echo "TESTING SKIP: private-lib test implemented only for x86_64."
57fi 57fi
58 58
59echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" 59echo "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)"
61rm -f /var/lock/_firejail_test_file 61rm -f /var/lock/_firejail_test_file
62 62
63if [ -w /dev/shm ]; then 63if [ -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
67else 67else
68 echo "TESTING SKIP: /dev/shm not writable" 68 echo "TESTING SKIP: /dev/shm not writable"
69fi 69fi
70 70
71echo "TESTING: private (test/fs/private.exp)" 71echo "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"
39fi 39fi
40 40
41
42# check xpra/xephyr 41# check xpra/xephyr
43if command -v xpra 42if command -v xpra
44then 43then
45 echo "xpra found" 44 echo "xpra found"
46else 45else
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
55fi 54fi
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
31else 31else
32 echo "TESTING SKIP: snmpd not found" 32 echo "TESTING SKIP: snmpd not found"
33fi 33fi
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
40else 40else
41 echo "TESTING SKIP: apache2 not found" 41 echo "TESTING SKIP: apache2 not found"
42fi 42fi
43 43
44if [ -f /etc/init.d/isc-dhcp-server ] 44if [ -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
56else 56else
57 echo "TESTING SKIP: unbound not found" 57 echo "TESTING SKIP: unbound not found"
58fi 58fi
59 59
60if [ -f /etc/init.d/nginx ] 60if [ -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
64else 64else
65 echo "TESTING SKIP: nginx not found" 65 echo "TESTING SKIP: nginx not found"
66fi 66fi
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
23trap _term SIGTERM 23trap _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
45trap _term SIGTERM 45trap _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
36if command -v man 36if command -v man
37then 37then
38 echo "TESTING: man (test/utils/man.exp)" 38 echo "TESTING: man (test/utils/man.exp)"
39 ./man.exp 39 ./man.exp
40else 40else
41 echo "TESTING SKIP: man not found" 41 echo "TESTING SKIP: man not found"
42fi 42fi
43 43
44echo "TESTING: list (test/utils/list.exp)" 44echo "TESTING: list (test/utils/list.exp)"
@@ -49,10 +49,10 @@ echo "TESTING: tree (test/utils/tree.exp)"
49 49
50if [ $(grep -c ^processor /proc/cpuinfo) -gt 1 ]; 50if [ $(grep -c ^processor /proc/cpuinfo) -gt 1 ];
51then 51then
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
54else 54else
55 echo "TESTING SKIP: cpu.print, not enough CPUs" 55 echo "TESTING SKIP: cpu.print, not enough CPUs"
56fi 56fi
57 57
58echo "TESTING: fs.print (test/utils/fs-print.exp)" 58echo "TESTING: fs.print (test/utils/fs-print.exp)"