summaryrefslogtreecommitdiffstats
path: root/test/utils/seccomp.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/seccomp.exp')
-rwxr-xr-xtest/utils/seccomp.exp48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/utils/seccomp.exp b/test/utils/seccomp.exp
new file mode 100755
index 000000000..a318e39b1
--- /dev/null
+++ b/test/utils/seccomp.exp
@@ -0,0 +1,48 @@
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 "bingo1"
33}
34expect {
35 timeout {puts "TESTING ERROR 2\n";exit}
36 "Seccomp: 2"
37}
38expect {
39 timeout {puts "TESTING ERROR 3\n";exit}
40 "bingo2"
41}
42expect {
43 timeout {puts "TESTING ERROR 3\n";exit}
44 "Seccomp: 0"
45}
46after 100
47
48puts "all done\n"