diff options
Diffstat (limited to 'test/features/3.10.exp')
-rwxr-xr-x | test/features/3.10.exp | 187 |
1 files changed, 0 insertions, 187 deletions
diff --git a/test/features/3.10.exp b/test/features/3.10.exp deleted file mode 100755 index 728ad91f5..000000000 --- a/test/features/3.10.exp +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | # | ||
6 | # whitelist tmp | ||
7 | # | ||
8 | |||
9 | set timeout 10 | ||
10 | spawn $env(SHELL) | ||
11 | match_max 100000 | ||
12 | set overlay [lindex $argv 0] | ||
13 | set chroot [lindex $argv 1] | ||
14 | |||
15 | # | ||
16 | # N | ||
17 | # | ||
18 | send -- "mkdir /tmp/test1dir\r" | ||
19 | sleep 1 | ||
20 | send -- "touch /tmp/test1dir/test1\r" | ||
21 | sleep 1 | ||
22 | send -- "firejail --noprofile --whitelist=/tmp/test1dir\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 0\n";exit} | ||
25 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
26 | } | ||
27 | sleep 1 | ||
28 | |||
29 | send -- "ls -l /tmp | wc -l\r" | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
32 | "2" | ||
33 | } | ||
34 | send -- "ls -l /tmp\r" | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
37 | "netblue" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
41 | "netblue" | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
45 | "test1dir" | ||
46 | } | ||
47 | |||
48 | send -- "ls -l /tmp/test1dir | wc -l\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 1.5\n";exit} | ||
51 | "2" | ||
52 | } | ||
53 | send -- "ls -l /tmp/test1dir\r" | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 1.6\n";exit} | ||
56 | "netblue" | ||
57 | } | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 1.7\n";exit} | ||
60 | "netblue" | ||
61 | } | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 1.8\n";exit} | ||
64 | "test1" | ||
65 | } | ||
66 | |||
67 | |||
68 | after 100 | ||
69 | send -- "exit\r" | ||
70 | sleep 1 | ||
71 | |||
72 | |||
73 | # | ||
74 | # O | ||
75 | # | ||
76 | if { $overlay == "overlay" } { | ||
77 | send -- "firejail --noprofile --overlay --whitelist=/tmp/test1dir\r" | ||
78 | expect { | ||
79 | timeout {puts "TESTING ERROR 2\n";exit} | ||
80 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
81 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
82 | } | ||
83 | sleep 1 | ||
84 | |||
85 | send -- "ls -l /tmp | wc -l\r" | ||
86 | expect { | ||
87 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
88 | "2" | ||
89 | } | ||
90 | send -- "ls -l /tmp\r" | ||
91 | expect { | ||
92 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
93 | "netblue" | ||
94 | } | ||
95 | expect { | ||
96 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
97 | "netblue" | ||
98 | } | ||
99 | expect { | ||
100 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
101 | "test1dir" | ||
102 | } | ||
103 | |||
104 | send -- "ls -l /tmp/test1dir | wc -l\r" | ||
105 | expect { | ||
106 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
107 | "2" | ||
108 | } | ||
109 | send -- "ls -l /tmp/test1dir\r" | ||
110 | expect { | ||
111 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
112 | "netblue" | ||
113 | } | ||
114 | expect { | ||
115 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
116 | "netblue" | ||
117 | } | ||
118 | expect { | ||
119 | timeout {puts "TESTING ERROR 3.8\n";exit} | ||
120 | "test1" | ||
121 | } | ||
122 | |||
123 | after 100 | ||
124 | send -- "exit\r" | ||
125 | sleep 1 | ||
126 | } | ||
127 | |||
128 | # | ||
129 | # C | ||
130 | # | ||
131 | if { $chroot == "chroot" } { | ||
132 | send -- "mkdir /tmp/chroot/tmp/test1dir\r" | ||
133 | sleep 1 | ||
134 | send -- "touch /tmp/chroot/tmp/test1dir/test1\r" | ||
135 | sleep 1 | ||
136 | send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/tmp/test1dir\r" | ||
137 | expect { | ||
138 | timeout {puts "TESTING ERROR 4\n";exit} | ||
139 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
140 | } | ||
141 | sleep 1 | ||
142 | |||
143 | send -- "ls -l /tmp | wc -l\r" | ||
144 | expect { | ||
145 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
146 | "2" | ||
147 | } | ||
148 | send -- "ls -l /tmp\r" | ||
149 | expect { | ||
150 | timeout {puts "TESTING ERROR 5.2\n";exit} | ||
151 | "netblue" | ||
152 | } | ||
153 | expect { | ||
154 | timeout {puts "TESTING ERROR 5.3\n";exit} | ||
155 | "netblue" | ||
156 | } | ||
157 | expect { | ||
158 | timeout {puts "TESTING ERROR 5.4\n";exit} | ||
159 | "test1dir" | ||
160 | } | ||
161 | |||
162 | send -- "ls -l /tmp/test1dir | wc -l\r" | ||
163 | expect { | ||
164 | timeout {puts "TESTING ERROR 5.5\n";exit} | ||
165 | "2" | ||
166 | } | ||
167 | send -- "ls -l /tmp/test1dir\r" | ||
168 | expect { | ||
169 | timeout {puts "TESTING ERROR 5.6\n";exit} | ||
170 | "netblue" | ||
171 | } | ||
172 | expect { | ||
173 | timeout {puts "TESTING ERROR 5.7\n";exit} | ||
174 | "netblue" | ||
175 | } | ||
176 | expect { | ||
177 | timeout {puts "TESTING ERROR 5.8\n";exit} | ||
178 | "test1" | ||
179 | } | ||
180 | |||
181 | after 100 | ||
182 | send -- "exit\r" | ||
183 | sleep 1 | ||
184 | } | ||
185 | |||
186 | |||
187 | puts "\nall done\n" | ||