diff options
Diffstat (limited to 'test/utils/seccomp.exp')
-rwxr-xr-x | test/utils/seccomp.exp | 48 |
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 | |||
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 | "bingo1" | ||
33 | } | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 2\n";exit} | ||
36 | "Seccomp: 2" | ||
37 | } | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 3\n";exit} | ||
40 | "bingo2" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 3\n";exit} | ||
44 | "Seccomp: 0" | ||
45 | } | ||
46 | after 100 | ||
47 | |||
48 | puts "all done\n" | ||