diff options
Diffstat (limited to 'test/features/1.8.exp')
-rwxr-xr-x | test/features/1.8.exp | 169 |
1 files changed, 0 insertions, 169 deletions
diff --git a/test/features/1.8.exp b/test/features/1.8.exp deleted file mode 100755 index 028077b6f..000000000 --- a/test/features/1.8.exp +++ /dev/null | |||
@@ -1,169 +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 | # disable /etc/firejail and ~/.config/firejail | ||
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 | sleep 1 | ||
19 | send -- "firejail --noprofile\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 0\n";exit} | ||
22 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
26 | send -- "ls ~/.config/firejail\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
29 | "Permission denied" | ||
30 | } | ||
31 | after 100 | ||
32 | send -- "ls /run/firejail/bandwidth\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
35 | "Permission denied" | ||
36 | } | ||
37 | after 100 | ||
38 | #send -- "ls /run/firejail/mnt\r" | ||
39 | #expect { | ||
40 | # timeout {puts "TESTING ERROR 1.3\n";exit} | ||
41 | # "Permission denied" | ||
42 | #} | ||
43 | #after 100 | ||
44 | send -- "ls /run/firejail/name\r" | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
47 | "Permission denied" | ||
48 | } | ||
49 | after 100 | ||
50 | send -- "ls /run/firejail/network\r" | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 1.5\n";exit} | ||
53 | "Permission denied" | ||
54 | } | ||
55 | after 100 | ||
56 | send -- "ls /run/firejail/x11\r" | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 1.6\n";exit} | ||
59 | "Permission denied" | ||
60 | } | ||
61 | after 100 | ||
62 | send -- "exit\r" | ||
63 | sleep 1 | ||
64 | |||
65 | |||
66 | # | ||
67 | # O | ||
68 | # | ||
69 | if { $overlay == "overlay" } { | ||
70 | send -- "firejail --noprofile --overlay\r" | ||
71 | expect { | ||
72 | timeout {puts "TESTING ERROR 2\n";exit} | ||
73 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
74 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
75 | } | ||
76 | sleep 1 | ||
77 | send -- "ls ~/.config/firejail\r" | ||
78 | expect { | ||
79 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
80 | "Permission denied" | ||
81 | } | ||
82 | after 100 | ||
83 | send -- "ls /run/firejail/bandwidth\r" | ||
84 | expect { | ||
85 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
86 | "Permission denied" | ||
87 | } | ||
88 | after 100 | ||
89 | #send -- "ls /run/firejail/mnt\r" | ||
90 | #expect { | ||
91 | # timeout {puts "TESTING ERROR 3.3\n";exit} | ||
92 | # "Permission denied" | ||
93 | #} | ||
94 | #after 100 | ||
95 | send -- "ls /run/firejail/name\r" | ||
96 | expect { | ||
97 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
98 | "Permission denied" | ||
99 | } | ||
100 | after 100 | ||
101 | send -- "ls /run/firejail/network\r" | ||
102 | expect { | ||
103 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
104 | "Permission denied" | ||
105 | } | ||
106 | after 100 | ||
107 | send -- "ls /run/firejail/x11\r" | ||
108 | expect { | ||
109 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
110 | "Permission denied" | ||
111 | } | ||
112 | after 100 | ||
113 | |||
114 | send -- "exit\r" | ||
115 | sleep 1 | ||
116 | } | ||
117 | |||
118 | # | ||
119 | # C | ||
120 | # | ||
121 | if { $chroot == "chroot" } { | ||
122 | send -- "firejail --noprofile --chroot=/tmp/chroot\r" | ||
123 | expect { | ||
124 | timeout {puts "TESTING ERROR 4\n";exit} | ||
125 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
126 | } | ||
127 | sleep 1 | ||
128 | send -- "ls ~/.config/firejail\r" | ||
129 | expect { | ||
130 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
131 | "Permission denied" | ||
132 | } | ||
133 | after 100 | ||
134 | send -- "ls /run/firejail/bandwidth\r" | ||
135 | expect { | ||
136 | timeout {puts "TESTING ERROR 5.2\n";exit} | ||
137 | "Permission denied" | ||
138 | } | ||
139 | after 100 | ||
140 | #send -- "ls /run/firejail/mnt\r" | ||
141 | #expect { | ||
142 | # timeout {puts "TESTING ERROR 5.3\n";exit} | ||
143 | # "Permission denied" | ||
144 | #} | ||
145 | #after 100 | ||
146 | send -- "ls /run/firejail/name\r" | ||
147 | expect { | ||
148 | timeout {puts "TESTING ERROR 5.4\n";exit} | ||
149 | "Permission denied" | ||
150 | } | ||
151 | after 100 | ||
152 | send -- "ls /run/firejail/network\r" | ||
153 | expect { | ||
154 | timeout {puts "TESTING ERROR 5.5\n";exit} | ||
155 | "Permission denied" | ||
156 | } | ||
157 | after 100 | ||
158 | send -- "ls /run/firejail/x11\r" | ||
159 | expect { | ||
160 | timeout {puts "TESTING ERROR 5.6\n";exit} | ||
161 | "Permission denied" | ||
162 | } | ||
163 | after 100 | ||
164 | send -- "exit\r" | ||
165 | sleep 1 | ||
166 | } | ||
167 | |||
168 | |||
169 | puts "\nall done\n" | ||