diff options
-rw-r--r-- | Makefile | 9 | ||||
-rwxr-xr-x | test/fs/fs.sh | 11 | ||||
-rwxr-xr-x | test/private-lib/private-lib.exp (renamed from test/fs/private-lib.exp) | 0 | ||||
-rwxr-xr-x | test/private-lib/private-lib.sh | 12 |
4 files changed, 18 insertions, 14 deletions
@@ -268,16 +268,16 @@ scan-build: clean | |||
268 | # make test | 268 | # make test |
269 | # | 269 | # |
270 | 270 | ||
271 | TESTS=profiles private-lib apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter | 271 | TESTS=profiles apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter |
272 | TEST_TARGETS=$(patsubst %,test-%,$(TESTS)) | 272 | TEST_TARGETS=$(patsubst %,test-%,$(TESTS)) |
273 | 273 | ||
274 | $(TEST_TARGETS): | 274 | $(TEST_TARGETS): |
275 | $(MAKE) -C test $(subst test-,,$@) | 275 | $(MAKE) -C test $(subst test-,,$@) |
276 | 276 | ||
277 | test: test-profiles test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters | 277 | test: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters |
278 | echo "TEST COMPLETE" | 278 | echo "TEST COMPLETE" |
279 | 279 | ||
280 | test-noprofiles: test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters | 280 | test-noprofiles: test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters |
281 | echo "TEST COMPLETE" | 281 | echo "TEST COMPLETE" |
282 | 282 | ||
283 | test-github: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment | 283 | test-github: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment |
@@ -288,6 +288,9 @@ test-github: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sy | |||
288 | # The tests are very intrusive, by the time you are done | 288 | # The tests are very intrusive, by the time you are done |
289 | # with them you will need to restart your computer. | 289 | # with them you will need to restart your computer. |
290 | ########################################## | 290 | ########################################## |
291 | # private-lib is disabled by default in /etc/firejail/firejail.config | ||
292 | test-private-lib: | ||
293 | $(MAKE) -C test $(subst test-,,$@) | ||
291 | 294 | ||
292 | # a firejail-test account is required, public/private key setup | 295 | # a firejail-test account is required, public/private key setup |
293 | test-ssh: | 296 | test-ssh: |
diff --git a/test/fs/fs.sh b/test/fs/fs.sh index 697c86d3d..677b753fc 100755 --- a/test/fs/fs.sh +++ b/test/fs/fs.sh | |||
@@ -45,17 +45,6 @@ echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" | |||
45 | ./fs_var_tmp.exp | 45 | ./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 | ||
49 | fjconfig=/etc/firejail/firejail.config | ||
50 | printf 'private-lib yes\n' | sudo tee -a "$fjconfig" >/dev/null | ||
51 | echo "TESTING: private-lib (test/fs/private-lib.exp)" | ||
52 | ./private-lib.exp | ||
53 | printf '%s\n' "$(sed '/^private-lib yes$/d' "$fjconfig")" | | ||
54 | sudo tee "$fjconfig" >/dev/null | ||
55 | else | ||
56 | echo "TESTING SKIP: private-lib test implemented only for x86_64." | ||
57 | fi | ||
58 | |||
59 | echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" | 48 | echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" |
60 | ./fs_var_lock.exp | 49 | ./fs_var_lock.exp |
61 | rm -f /var/lock/_firejail_test_file | 50 | rm -f /var/lock/_firejail_test_file |
diff --git a/test/fs/private-lib.exp b/test/private-lib/private-lib.exp index 5290def35..5290def35 100755 --- a/test/fs/private-lib.exp +++ b/test/private-lib/private-lib.exp | |||
diff --git a/test/private-lib/private-lib.sh b/test/private-lib/private-lib.sh index 6b7d433c8..43c42a098 100755 --- a/test/private-lib/private-lib.sh +++ b/test/private-lib/private-lib.sh | |||
@@ -18,3 +18,15 @@ for app in "${apps[@]}"; do | |||
18 | echo "TESTING SKIP: $app not found" | 18 | echo "TESTING SKIP: $app not found" |
19 | fi | 19 | fi |
20 | done | 20 | done |
21 | |||
22 | if [[ $(uname -m) == "x86_64" ]]; then | ||
23 | fjconfig=/etc/firejail/firejail.config | ||
24 | printf 'private-lib yes\n' | sudo tee -a "$fjconfig" >/dev/null | ||
25 | echo "TESTING: private-lib (test/fs/private-lib.exp)" | ||
26 | ./private-lib.exp | ||
27 | printf '%s\n' "$(sed '/^private-lib yes$/d' "$fjconfig")" | | ||
28 | sudo tee "$fjconfig" >/dev/null | ||
29 | else | ||
30 | echo "TESTING SKIP: private-lib test implemented only for x86_64." | ||
31 | fi | ||
32 | |||