diff options
Diffstat (limited to 'test/fs/fs.sh')
-rwxr-xr-x | test/fs/fs.sh | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh new file mode 100755 index 000000000..efbf505ee --- /dev/null +++ b/test/fs/fs.sh | |||
@@ -0,0 +1,99 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | rm -fr ~/_firejail_test_* | ||
10 | echo "TESTING: mkdir/mkfile (test/fs/mkdir_mkfile.exp)" | ||
11 | ./mkdir_mkfile.exp | ||
12 | rm -fr ~/_firejail_test_* | ||
13 | |||
14 | mkdir ~/_firejail_test_dir | ||
15 | touch ~/_firejail_test_dir/a | ||
16 | mkdir ~/_firejail_test_dir/test1 | ||
17 | touch ~/_firejail_test_dir/test1/b | ||
18 | echo "TESTING: read/write (test/fs/read-write.exp)" | ||
19 | ./read-write.exp | ||
20 | rm -fr ~/_firejail_test_* | ||
21 | |||
22 | echo "TESTING: /sys/fs access (test/fs/sys_fs.exp)" | ||
23 | ./sys_fs.exp | ||
24 | |||
25 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" | ||
26 | ./kmsg.exp | ||
27 | |||
28 | echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" | ||
29 | ./fs_var_tmp.exp | ||
30 | |||
31 | echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" | ||
32 | ./fs_var_lock.exp | ||
33 | |||
34 | echo "TESTING: read/write /dev/shm (test/fs/fs_dev_shm.exp)" | ||
35 | ./fs_dev_shm.exp | ||
36 | |||
37 | echo "TESTING: private (test/fs/private.exp)" | ||
38 | ./private.exp | ||
39 | |||
40 | echo "TESTING: private home (test/fs/private-home.exp)" | ||
41 | ./private-home.exp | ||
42 | |||
43 | echo "TESTING: private home dir (test/fs/private-home-dir.exp)" | ||
44 | ./private-home-dir.exp | ||
45 | |||
46 | echo "TESTING: private home dir same as user home (test/fs/private-homedir.exp)" | ||
47 | ./private-homedir.exp | ||
48 | |||
49 | echo "TESTING: private-etc (test/fs/private-etc.exp)" | ||
50 | ./private-etc.exp | ||
51 | |||
52 | echo "TESTING: empty private-etc (test/fs/private-etc-empty.exp)" | ||
53 | ./private-etc-empty.exp | ||
54 | |||
55 | echo "TESTING: private-bin (test/fs/private-bin.exp)" | ||
56 | ./private-bin.exp | ||
57 | |||
58 | echo "TESTING: whitelist empty (test/fs/whitelist-empty.exp)" | ||
59 | ./whitelist-empty.exp | ||
60 | |||
61 | echo "TESTING: private whitelist (test/fs/private-whitelist.exp)" | ||
62 | ./private-whitelist.exp | ||
63 | |||
64 | echo "TESTING: invalid filename (test/fs/invalid_filename.exp)" | ||
65 | ./invalid_filename.exp | ||
66 | |||
67 | echo "TESTING: blacklist directory (test/fs/option_blacklist.exp)" | ||
68 | ./option_blacklist.exp | ||
69 | |||
70 | echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)" | ||
71 | ./option_blacklist_file.exp | ||
72 | |||
73 | echo "TESTING: blacklist glob (test/fs/option_blacklist_glob.exp)" | ||
74 | ./option_blacklist_glob.exp | ||
75 | |||
76 | echo "TESTING: bind as user (test/fs/option_bind_user.exp)" | ||
77 | ./option_bind_user.exp | ||
78 | |||
79 | echo "TESTING: recursive mkdir (test/fs/mkdir.exp)" | ||
80 | ./mkdir.exp | ||
81 | |||
82 | echo "TESTING: double whitelist (test/fs/whitelist-double.exp)" | ||
83 | ./whitelist-double.exp | ||
84 | |||
85 | |||
86 | echo "TESTING: whitelist (test/fs/whitelist.exp)" | ||
87 | ./whitelist.exp | ||
88 | |||
89 | #cleanup | ||
90 | rm -fr ~/fjtest-dir | ||
91 | rm -fr ~/fjtest-dir-lnk | ||
92 | rm -f ~/fjtest-file | ||
93 | rm -f ~/fjtest-file-lnk | ||
94 | rm -f /tmp/fjtest-file | ||
95 | rm -fr /tmp/fjtest-dir | ||
96 | rm -fr ~/_firejail_test_* | ||
97 | |||
98 | |||
99 | |||