aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rwxr-xr-xtest/fs/fs.sh11
-rwxr-xr-xtest/private-lib/private-lib.exp (renamed from test/fs/private-lib.exp)0
-rwxr-xr-xtest/private-lib/private-lib.sh12
4 files changed, 18 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index c5d823cac..57a692817 100644
--- a/Makefile
+++ b/Makefile
@@ -268,16 +268,16 @@ scan-build: clean
268# make test 268# make test
269# 269#
270 270
271TESTS=profiles private-lib apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter 271TESTS=profiles apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter
272TEST_TARGETS=$(patsubst %,test-%,$(TESTS)) 272TEST_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
277test: 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 277test: 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
280test-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 280test-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
283test-github: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment 283test-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
292test-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
293test-ssh: 296test-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
46rm -f /var/tmp/_firejail_test_file 46rm -f /var/tmp/_firejail_test_file
47 47
48if [[ $(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
55else
56 echo "TESTING SKIP: private-lib test implemented only for x86_64."
57fi
58
59echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" 48echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)"
60./fs_var_lock.exp 49./fs_var_lock.exp
61rm -f /var/lock/_firejail_test_file 50rm -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
20done 20done
21
22if [[ $(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
29else
30 echo "TESTING SKIP: private-lib test implemented only for x86_64."
31fi
32