diff options
Diffstat (limited to 'test/utils/firemon-seccomp.exp')
-rwxr-xr-x | test/utils/firemon-seccomp.exp | 49 |
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --noprofile --name=bingo1 --seccomp\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | spawn $env(SHELL) | ||
18 | send -- "firejail --noprofile --name=bingo2\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
21 | "Child process initialized" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | |||
26 | |||
27 | |||
28 | spawn $env(SHELL) | ||
29 | send -- "firemon --seccomp\r" | ||
30 | expect { | ||
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 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 2\n";exit} | ||
37 | "Seccomp: 2" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 3\n";exit} | ||
41 | "bingo2" | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 4\n";exit} | ||
45 | "Seccomp: 0" | ||
46 | } | ||
47 | after 100 | ||
48 | |||
49 | puts "all done\n" | ||