aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.10.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.10.exp')
-rwxr-xr-xtest/features/3.10.exp187
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
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 -- "mkdir /tmp/test1dir\r"
19sleep 1
20send -- "touch /tmp/test1dir/test1\r"
21sleep 1
22send -- "firejail --noprofile --whitelist=/tmp/test1dir\r"
23expect {
24 timeout {puts "TESTING ERROR 0\n";exit}
25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26}
27sleep 1
28
29send -- "ls -l /tmp | wc -l\r"
30expect {
31 timeout {puts "TESTING ERROR 1.1\n";exit}
32 "2"
33}
34send -- "ls -l /tmp\r"
35expect {
36 timeout {puts "TESTING ERROR 1.2\n";exit}
37 "netblue"
38}
39expect {
40 timeout {puts "TESTING ERROR 1.3\n";exit}
41 "netblue"
42}
43expect {
44 timeout {puts "TESTING ERROR 1.4\n";exit}
45 "test1dir"
46}
47
48send -- "ls -l /tmp/test1dir | wc -l\r"
49expect {
50 timeout {puts "TESTING ERROR 1.5\n";exit}
51 "2"
52}
53send -- "ls -l /tmp/test1dir\r"
54expect {
55 timeout {puts "TESTING ERROR 1.6\n";exit}
56 "netblue"
57}
58expect {
59 timeout {puts "TESTING ERROR 1.7\n";exit}
60 "netblue"
61}
62expect {
63 timeout {puts "TESTING ERROR 1.8\n";exit}
64 "test1"
65}
66
67
68after 100
69send -- "exit\r"
70sleep 1
71
72
73#
74# O
75#
76if { $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#
131if { $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
187puts "\nall done\n"