aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/seccomp-debug.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-08-21 07:44:50 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2017-08-21 07:44:50 -0400
commitcad5625f037b06b1d190a6cc88bbeb41a1010dd4 (patch)
treef644a908960512971358f4a75b4cea618c7f5365 /test/filters/seccomp-debug.exp
parentTypo for notv (diff)
downloadfirejail-cad5625f037b06b1d190a6cc88bbeb41a1010dd4.tar.gz
firejail-cad5625f037b06b1d190a6cc88bbeb41a1010dd4.tar.zst
firejail-cad5625f037b06b1d190a6cc88bbeb41a1010dd4.zip
testing, merges
Diffstat (limited to 'test/filters/seccomp-debug.exp')
-rwxr-xr-xtest/filters/seccomp-debug.exp137
1 files changed, 132 insertions, 5 deletions
diff --git a/test/filters/seccomp-debug.exp b/test/filters/seccomp-debug.exp
index a95f3bd23..7f03e45e8 100755
--- a/test/filters/seccomp-debug.exp
+++ b/test/filters/seccomp-debug.exp
@@ -7,25 +7,152 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail --seccomp --debug\r" 10send -- "firejail --debug sleep 1; echo done\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 12 timeout {puts "TESTING ERROR 0\n";exit}
13 "SECCOMP Filter" 13 "SECCOMP Filter"
14} 14}
15expect { 15expect {
16 timeout {puts "TESTING ERROR 2\n";exit} 16 timeout {puts "TESTING ERROR 1\n";exit}
17 "BLACKLIST" 17 "BLACKLIST"
18} 18}
19expect { 19expect {
20 timeout {puts "TESTING ERROR 3\n";exit} 20 timeout {puts "TESTING ERROR 2\n";exit}
21 "open_by_handle_at" 21 "open_by_handle_at"
22} 22}
23expect { 23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "Child process initialized"
26}
27expect {
24 timeout {puts "TESTING ERROR 4\n";exit} 28 timeout {puts "TESTING ERROR 4\n";exit}
29 "done"
30}
31after 100
32
33
34# amd64 architecture
35send -- "firejail --debug sleep 1; echo done\r"
36expect {
37 timeout {puts "TESTING ERROR 5\n";exit}
25 "Child process initialized" 38 "Child process initialized"
26} 39}
27sleep 2 40expect {
41 timeout {puts "TESTING ERROR 6\n";exit}
42 "Installing /run/firejail/mnt/seccomp seccomp filter"
43}
44expect {
45 timeout {puts "TESTING ERROR 7\n";exit}
46 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter"
47}
48expect {
49 timeout {puts "TESTING ERROR 8\n";exit}
50 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter"
51}
52expect {
53 timeout {puts "TESTING ERROR 9\n";exit}
54 "done"
55}
56after 100
28 57
29send -- "exit\r" 58# amd64 architecture - ignore seccomp
59send -- "firejail --debug --ignore=seccomp sleep 1; echo done\r"
60expect {
61 timeout {puts "TESTING ERROR 10\n";exit}
62 "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit}
63 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 12\n";exit}
64 "Child process initialized"
65}
66expect {
67 timeout {puts "TESTING ERROR 13\n";exit}
68 "Installing /run/firejail/mnt/seccomp seccomp filter" {puts "TESTING ERROR 14\n";exit}
69 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 15\n";exit}
70 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter"
71}
72expect {
73 timeout {puts "TESTING ERROR 16\n";exit}
74 "done"
75}
30after 100 76after 100
77
78# amd64 architecture - ignore protocol
79send -- "firejail --debug --ignore=protocol sleep 1; echo done\r"
80expect {
81 timeout {puts "TESTING ERROR 17\n";exit}
82 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit}
83 "Child process initialized"
84}
85expect {
86 timeout {puts "TESTING ERROR 19\n";exit}
87 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 20\n";exit}
88 "Installing /run/firejail/mnt/seccomp seccomp filter"
89}
90expect {
91 timeout {puts "TESTING ERROR 21\n";exit}
92 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter" {puts "TESTING ERROR 22\n";exit}
93 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter"
94}
95expect {
96 timeout {puts "TESTING ERROR 23\n";exit}
97 "done"
98}
99after 100
100
101# memory-deny-write-execute
102send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r"
103expect {
104 timeout {puts "TESTING ERROR 24\n";exit}
105 "Child process initialized"
106}
107expect {
108 timeout {puts "TESTING ERROR 25\n";exit}
109 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter"
110}
111expect {
112 timeout {puts "TESTING ERROR 26\n";exit}
113 "done"
114}
115
116
117# amd64 architecture - seccomp.block-secondary
118send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r"
119expect {
120 timeout {puts "TESTING ERROR 27\n";exit}
121 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 28\n";exit}
122 "Child process initialized"
123}
124expect {
125 timeout {puts "TESTING ERROR 29\n";exit}
126 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 30\n";exit}
127 "Installing /run/firejail/mnt/seccomp seccomp filter"
128}
129expect {
130 timeout {puts "TESTING ERROR 31\n";exit}
131 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 32\n";exit}
132 "Installing /run/firejail/mnt/seccomp.protocol seccomp filter"
133}
134expect {
135 timeout {puts "TESTING ERROR 33\n";exit}
136 "done"
137}
138after 100
139
140# amd64 architecture - seccomp.block-secondary, profile
141send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\r"
142expect {
143 timeout {puts "TESTING ERROR 33\n";exit}
144 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 34\n";exit}
145 "Child process initialized"
146}
147expect {
148 timeout {puts "TESTING ERROR 35\n";exit}
149 "Installing /run/firejail/mnt/seccomp.i386 seccomp filter" {puts "TESTING ERROR 35\n";exit}
150 "Installing /run/firejail/mnt/seccomp seccomp filter"
151}
152expect {
153 timeout {puts "TESTING ERROR 37\n";exit}
154 "done"
155}
156after 100
157
31puts "all done\n" 158puts "all done\n"