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