aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/seccomp-bad-empty.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/filters/seccomp-bad-empty.exp')
-rwxr-xr-xtest/filters/seccomp-bad-empty.exp41
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --seccomp=\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Error: empty syscall lists are not allowed"
14}
15
16send -- "firejail --seccomp.drop=\r"
17expect {
18 timeout {puts "TESTING ERROR 2\n";exit}
19 "Error: empty syscall lists are not allowed"
20}
21
22send -- "firejail --seccomp.keep=\r"
23expect {
24 timeout {puts "TESTING ERROR 4\n";exit}
25 "Error: empty syscall lists are not allowed"
26}
27
28send -- "firejail --profile=seccomp-bad-empty.profile\r"
29expect {
30 timeout {puts "TESTING ERROR 6\n";exit}
31 "Error: line 1 in seccomp-bad-empty.profile is invalid"
32}
33
34send -- "firejail --profile=seccomp-bad-empty2.profile\r"
35expect {
36 timeout {puts "TESTING ERROR 7\n";exit}
37 "Error: line 1 in seccomp-bad-empty2.profile is invalid"
38}
39after 100
40puts "\nall done\n"
41