aboutsummaryrefslogtreecommitdiffstats
path: root/test/seccomp-bad-empty.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/seccomp-bad-empty.exp')
-rwxr-xr-xtest/seccomp-bad-empty.exp38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/seccomp-bad-empty.exp b/test/seccomp-bad-empty.exp
new file mode 100755
index 000000000..53b5c2e21
--- /dev/null
+++ b/test/seccomp-bad-empty.exp
@@ -0,0 +1,38 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --seccomp=\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Error: empty syscall lists are not allowed"
11}
12
13send -- "firejail --seccomp.drop=\r"
14expect {
15 timeout {puts "TESTING ERROR 2\n";exit}
16 "Error: empty syscall lists are not allowed"
17}
18
19send -- "firejail --seccomp.keep=\r"
20expect {
21 timeout {puts "TESTING ERROR 4\n";exit}
22 "Error: empty syscall lists are not allowed"
23}
24
25send -- "firejail --profile=seccomp-bad-empty.profile\r"
26expect {
27 timeout {puts "TESTING ERROR 6\n";exit}
28 "Error: line 1 in the custom profile is invalid"
29}
30
31send -- "firejail --profile=seccomp-bad-empty2.profile\r"
32expect {
33 timeout {puts "TESTING ERROR 7\n";exit}
34 "Error: line 1 in the custom profile is invalid"
35}
36sleep 1
37puts "\n"
38