diff options
Diffstat (limited to 'test/filters/seccomp-debug-32.exp')
-rwxr-xr-x | test/filters/seccomp-debug-32.exp | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/test/filters/seccomp-debug-32.exp b/test/filters/seccomp-debug-32.exp new file mode 100755 index 000000000..6983758c3 --- /dev/null +++ b/test/filters/seccomp-debug-32.exp | |||
@@ -0,0 +1,145 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2017 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --debug sleep 1; echo done\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "SECCOMP Filter" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "BLACKLIST" | ||
18 | } | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 2\n";exit} | ||
21 | "open_by_handle_at" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3\n";exit} | ||
25 | "Child process initialized" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 4\n";exit} | ||
29 | "done" | ||
30 | } | ||
31 | after 100 | ||
32 | |||
33 | |||
34 | # i686 architecture | ||
35 | send -- "firejail --debug sleep 1; echo done\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 5\n";exit} | ||
38 | "Child process initialized" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 6\n";exit} | ||
42 | "Installing /run/firejail/mnt/seccomp seccomp filter" | ||
43 | } | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 7\n";exit} | ||
46 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" | ||
47 | } | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 9\n";exit} | ||
50 | "done" | ||
51 | } | ||
52 | after 100 | ||
53 | |||
54 | # i686 architecture - ignore seccomp | ||
55 | send -- "firejail --debug --ignore=seccomp sleep 1; echo done\r" | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 10\n";exit} | ||
58 | "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} | ||
59 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 12\n";exit} | ||
60 | "Child process initialized" | ||
61 | } | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 13\n";exit} | ||
64 | "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 14\n";exit} | ||
65 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 15\n";exit} | ||
66 | "done" | ||
67 | } | ||
68 | after 100 | ||
69 | |||
70 | # i686 architecture - ignore protocol | ||
71 | send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 17\n";exit} | ||
74 | "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit} | ||
75 | "Child process initialized" | ||
76 | } | ||
77 | expect { | ||
78 | timeout {puts "TESTING ERROR 19\n";exit} | ||
79 | "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 20\n";exit} | ||
80 | "Installing /run/firejail/mnt/seccomp seccomp filter" | ||
81 | } | ||
82 | expect { | ||
83 | timeout {puts "TESTING ERROR 21\n";exit} | ||
84 | "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 22\n";exit} | ||
85 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" | ||
86 | } | ||
87 | expect { | ||
88 | timeout {puts "TESTING ERROR 23\n";exit} | ||
89 | "done" | ||
90 | } | ||
91 | after 100 | ||
92 | |||
93 | # memory-deny-write-execute | ||
94 | send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" | ||
95 | expect { | ||
96 | timeout {puts "TESTING ERROR 24\n";exit} | ||
97 | "Child process initialized" | ||
98 | } | ||
99 | expect { | ||
100 | timeout {puts "TESTING ERROR 25\n";exit} | ||
101 | "Installing /run/firejail/mnt/seccomp.mdwx seccomp filter" | ||
102 | } | ||
103 | expect { | ||
104 | timeout {puts "TESTING ERROR 26\n";exit} | ||
105 | "done" | ||
106 | } | ||
107 | |||
108 | |||
109 | # i686 architecture - seccomp.block-secondary | ||
110 | send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r" | ||
111 | expect { | ||
112 | timeout {puts "TESTING ERROR 27\n";exit} | ||
113 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 28\n";exit} | ||
114 | "Child process initialized" | ||
115 | } | ||
116 | expect { | ||
117 | timeout {puts "TESTING ERROR 29\n";exit} | ||
118 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 30\n";exit} | ||
119 | "Installing /run/firejail/mnt/seccomp seccomp filter" | ||
120 | } | ||
121 | expect { | ||
122 | timeout {puts "TESTING ERROR 33\n";exit} | ||
123 | "done" | ||
124 | } | ||
125 | after 100 | ||
126 | |||
127 | # i686 architecture - seccomp.block-secondary, profile | ||
128 | send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\r" | ||
129 | expect { | ||
130 | timeout {puts "TESTING ERROR 33\n";exit} | ||
131 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 34\n";exit} | ||
132 | "Child process initialized" | ||
133 | } | ||
134 | expect { | ||
135 | timeout {puts "TESTING ERROR 35\n";exit} | ||
136 | "Installing /run/firejail/mnt/seccomp.amd64 seccomp filter" {puts "TESTING ERROR 35\n";exit} | ||
137 | "Installing /run/firejail/mnt/seccomp seccomp filter" | ||
138 | } | ||
139 | expect { | ||
140 | timeout {puts "TESTING ERROR 37\n";exit} | ||
141 | "done" | ||
142 | } | ||
143 | after 100 | ||
144 | |||
145 | puts "all done\n" | ||