aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/seccomp-bad-empty.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-30 07:27:31 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-30 07:27:31 -0400
commita1272742cfbdbfe999a701f804b58ceb4605713d (patch)
tree16d6013c8d99d9e4370d1672b4018f958081f416 /test/filters/seccomp-bad-empty.exp
parentMerge pull request #490 from reinerh/master (diff)
downloadfirejail-a1272742cfbdbfe999a701f804b58ceb4605713d.tar.gz
firejail-a1272742cfbdbfe999a701f804b58ceb4605713d.tar.zst
firejail-a1272742cfbdbfe999a701f804b58ceb4605713d.zip
added make test-filters
Diffstat (limited to 'test/filters/seccomp-bad-empty.exp')
-rwxr-xr-xtest/filters/seccomp-bad-empty.exp38
1 files changed, 38 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..631d67743
--- /dev/null
+++ b/test/filters/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 seccomp-bad-empty.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 seccomp-bad-empty2.profile is invalid"
35}
36sleep 1
37puts "\nall done\n"
38