aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/firemon-seccomp.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/firemon-seccomp.exp')
-rwxr-xr-xtest/utils/firemon-seccomp.exp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/utils/firemon-seccomp.exp b/test/utils/firemon-seccomp.exp
new file mode 100755
index 000000000..26c478344
--- /dev/null
+++ b/test/utils/firemon-seccomp.exp
@@ -0,0 +1,49 @@
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 --noprofile --name=bingo1 --seccomp\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --noprofile --name=bingo2\r"
19expect {
20 timeout {puts "TESTING ERROR 0.1\n";exit}
21 "Child process initialized"
22}
23sleep 1
24
25
26
27
28spawn $env(SHELL)
29send -- "firemon --seccomp\r"
30expect {
31 timeout {puts "TESTING ERROR 1\n";exit}
32 "need to be root" {puts "TESTING SKIP: /proc mounted as hidepid\n"; exit}
33 "bingo1"
34}
35expect {
36 timeout {puts "TESTING ERROR 2\n";exit}
37 "Seccomp: 2"
38}
39expect {
40 timeout {puts "TESTING ERROR 3\n";exit}
41 "bingo2"
42}
43expect {
44 timeout {puts "TESTING ERROR 4\n";exit}
45 "Seccomp: 0"
46}
47after 100
48
49puts "all done\n"