diff options
Diffstat (limited to 'test/fs')
-rwxr-xr-x | test/fs/fs.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh index 36ff30934..697c86d3d 100755 --- a/test/fs/fs.sh +++ b/test/fs/fs.sh | |||
@@ -34,7 +34,7 @@ rm -f ~/_firejail_test_dir | |||
34 | echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)" | 34 | echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)" |
35 | ./sys_fs.exp | 35 | ./sys_fs.exp |
36 | 36 | ||
37 | if [ -c /dev/kmsg ]; then | 37 | if [[ -c /dev/kmsg ]]; then |
38 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" | 38 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" |
39 | ./kmsg.exp | 39 | ./kmsg.exp |
40 | else | 40 | else |
@@ -45,27 +45,27 @@ 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 | 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)" |
60 | ./fs_var_lock.exp | 60 | ./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)" |