diff options
Diffstat (limited to 'test/filters/filters.sh')
-rwxr-xr-x | test/filters/filters.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/filters/filters.sh b/test/filters/filters.sh new file mode 100755 index 000000000..fea4a0296 --- /dev/null +++ b/test/filters/filters.sh | |||
@@ -0,0 +1,71 @@ | |||
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 | echo "TESTING: noroot (test/filters/noroot.exp)" | ||
10 | ./noroot.exp | ||
11 | |||
12 | echo "TESTING: capabilities (test/filters/caps.exp)" | ||
13 | ./caps.exp | ||
14 | |||
15 | echo "TESTING: capabilities print (test/filters/caps-print.exp)" | ||
16 | ./caps-print.exp | ||
17 | |||
18 | rm -f seccomp-test-file | ||
19 | if [ "$(uname -m)" = "x86_64" ]; then | ||
20 | echo "TESTING: fseccomp (test/filters/fseccomp.exp)" | ||
21 | ./fseccomp.exp | ||
22 | else | ||
23 | echo "TESTING SKIP: fseccomp test implemented only for x86_64" | ||
24 | fi | ||
25 | rm -f seccomp-test-file | ||
26 | |||
27 | |||
28 | if [ "$(uname -m)" = "x86_64" ]; then | ||
29 | echo "TESTING: protocol (test/filters/protocol.exp)" | ||
30 | ./protocol.exp | ||
31 | else | ||
32 | echo "TESTING SKIP: protocol, running only on x86_64" | ||
33 | fi | ||
34 | |||
35 | echo "TESTING: seccomp bad empty (test/filters/seccomp-bad-empty.exp)" | ||
36 | ./seccomp-bad-empty.exp | ||
37 | |||
38 | echo "TESTING: seccomp debug (test/filters/seccomp-debug.exp)" | ||
39 | ./seccomp-debug.exp | ||
40 | |||
41 | echo "TESTING: seccomp errno (test/filters/seccomp-errno.exp)" | ||
42 | ./seccomp-errno.exp | ||
43 | |||
44 | echo "TESTING: seccomp su (test/filters/seccomp-su.exp)" | ||
45 | ./seccomp-su.exp | ||
46 | |||
47 | which strace | ||
48 | if [ $? -eq 0 ]; then | ||
49 | echo "TESTING: seccomp ptrace (test/filters/seccomp-ptrace.exp)" | ||
50 | ./seccomp-ptrace.exp | ||
51 | else | ||
52 | echo "TESTING SKIP: ptrace, strace not found" | ||
53 | fi | ||
54 | |||
55 | echo "TESTING: seccomp chmod - seccomp lists (test/filters/seccomp-chmod.exp)" | ||
56 | ./seccomp-chmod.exp | ||
57 | |||
58 | echo "TESTING: seccomp chmod profile - seccomp lists (test/filters/seccomp-chmod-profile.exp)" | ||
59 | ./seccomp-chmod-profile.exp | ||
60 | |||
61 | # todo: fix pwd and add seccomp-chown.exp | ||
62 | |||
63 | echo "TESTING: seccomp empty (test/filters/seccomp-empty.exp)" | ||
64 | ./seccomp-empty.exp | ||
65 | |||
66 | if [ "$(uname -m)" = "x86_64" ]; then | ||
67 | echo "TESTING: seccomp dual filter (test/filters/seccomp-dualfilter.exp)" | ||
68 | ./seccomp-dualfilter.exp | ||
69 | else | ||
70 | echo "TESTING SKIP: seccomp dual, not running on x86_64" | ||
71 | fi | ||