diff options
Diffstat (limited to 'test/filters')
-rwxr-xr-x | test/filters/debug.exp | 45 | ||||
-rwxr-xr-x | test/filters/filters.sh | 3 |
2 files changed, 48 insertions, 0 deletions
diff --git a/test/filters/debug.exp b/test/filters/debug.exp new file mode 100755 index 000000000..493022c05 --- /dev/null +++ b/test/filters/debug.exp | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2017 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --debug-syscalls\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "set_mempolicy" | ||
14 | } | ||
15 | after 100 | ||
16 | |||
17 | send -- "firejail --debug-syscalls\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "setitimer" | ||
21 | } | ||
22 | after 100 | ||
23 | |||
24 | send -- "firejail --debug-errnos\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "EBADMSG" | ||
28 | } | ||
29 | after 100 | ||
30 | |||
31 | send -- "firejail --debug-errnos\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3\n";exit} | ||
34 | "ELIBMAX" | ||
35 | } | ||
36 | after 100 | ||
37 | |||
38 | send -- "firejail --debug-protocols\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 4\n";exit} | ||
41 | "unix, inet, inet6, netlink, packet" | ||
42 | } | ||
43 | after 100 | ||
44 | |||
45 | puts "all done\n" | ||
diff --git a/test/filters/filters.sh b/test/filters/filters.sh index 73e0e4d5c..4996e6d66 100755 --- a/test/filters/filters.sh +++ b/test/filters/filters.sh | |||
@@ -6,6 +6,9 @@ | |||
6 | export MALLOC_CHECK_=3 | 6 | export MALLOC_CHECK_=3 |
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | 8 | ||
9 | echo "TESTING: debug options (test/filters/debug.exp)" | ||
10 | ./debug.exp | ||
11 | |||
9 | echo "TESTING: noroot (test/filters/noroot.exp)" | 12 | echo "TESTING: noroot (test/filters/noroot.exp)" |
10 | ./noroot.exp | 13 | ./noroot.exp |
11 | 14 | ||