diff options
Diffstat (limited to 'test/filters/seccomp-bad-empty.exp')
-rwxr-xr-x | test/filters/seccomp-bad-empty.exp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/filters/seccomp-bad-empty.exp b/test/filters/seccomp-bad-empty.exp new file mode 100755 index 000000000..1bd9c9b1f --- /dev/null +++ b/test/filters/seccomp-bad-empty.exp | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --seccomp=\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Error: empty syscall lists are not allowed" | ||
14 | } | ||
15 | |||
16 | send -- "firejail --seccomp.drop=\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 2\n";exit} | ||
19 | "Error: empty syscall lists are not allowed" | ||
20 | } | ||
21 | |||
22 | send -- "firejail --seccomp.keep=\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "Error: empty syscall lists are not allowed" | ||
26 | } | ||
27 | |||
28 | send -- "firejail --profile=seccomp-bad-empty.profile\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 6\n";exit} | ||
31 | "Error: line 1 in seccomp-bad-empty.profile is invalid" | ||
32 | } | ||
33 | |||
34 | send -- "firejail --profile=seccomp-bad-empty2.profile\r" | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 7\n";exit} | ||
37 | "Error: line 1 in seccomp-bad-empty2.profile is invalid" | ||
38 | } | ||
39 | after 100 | ||
40 | puts "\nall done\n" | ||
41 | |||