aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.1.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.1.exp')
-rwxr-xr-xtest/features/3.1.exp167
1 files changed, 0 insertions, 167 deletions
diff --git a/test/features/3.1.exp b/test/features/3.1.exp
deleted file mode 100755
index fb144b857..000000000
--- a/test/features/3.1.exp
+++ /dev/null
@@ -1,167 +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# private
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 --private\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
59
60
61after 100
62send -- "exit\r"
63sleep 1
64
65#
66# O
67#
68if { $overlay == "overlay" } {
69 send -- "firejail --noprofile --overlay --private\r"
70 expect {
71 timeout {puts "TESTING ERROR 2\n";exit}
72 "overlay option is not available" {puts "grsecurity\n"; exit}
73 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
74 }
75 sleep 1
76
77 send -- "ls -al | wc -l\r"
78 expect {
79 timeout {puts "TESTING ERROR 3.1\n";exit}
80 "6"
81 }
82
83 send -- "ls -al .bashrc\r"
84 expect {
85 timeout {puts "TESTING ERROR 3.2\n";exit}
86 "netblue"
87 }
88 expect {
89 timeout {puts "TESTING ERROR 3.3\n";exit}
90 "netblue"
91 }
92 expect {
93 timeout {puts "TESTING ERROR 3.4\n";exit}
94 ".bashrc"
95 }
96
97 send -- "ls -al .Xauthority\r"
98 expect {
99 timeout {puts "TESTING ERROR 3.5\n";exit}
100 "netblue"
101 }
102 expect {
103 timeout {puts "TESTING ERROR 3.6\n";exit}
104 "netblue"
105 }
106 expect {
107 timeout {puts "TESTING ERROR 3.7\n";exit}
108 ".Xauthority"
109 }
110
111 after 100
112 send -- "exit\r"
113 sleep 1
114}
115
116#
117# C
118#
119if { $chroot == "chroot" } {
120 send -- "firejail --noprofile --chroot=/tmp/chroot --private\r"
121 expect {
122 timeout {puts "TESTING ERROR 4\n";exit}
123 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
124 }
125 sleep 1
126
127 send -- "ls -al | wc -l\r"
128 expect {
129 timeout {puts "TESTING ERROR 5.1\n";exit}
130 "5"
131 }
132
133 send -- "ls -al .bashrc\r"
134 expect {
135 timeout {puts "TESTING ERROR 5.2\n";exit}
136 "netblue"
137 }
138 expect {
139 timeout {puts "TESTING ERROR 5.3\n";exit}
140 "netblue"
141 }
142 expect {
143 timeout {puts "TESTING ERROR 5.4\n";exit}
144 ".bashrc"
145 }
146
147 send -- "ls -al .Xauthority\r"
148 expect {
149 timeout {puts "TESTING ERROR 5.5\n";exit}
150 "netblue"
151 }
152 expect {
153 timeout {puts "TESTING ERROR 5.6\n";exit}
154 "netblue"
155 }
156 expect {
157 timeout {puts "TESTING ERROR 5.7\n";exit}
158 ".Xauthority"
159 }
160
161 after 100
162 send -- "exit\r"
163 sleep 1
164}
165
166
167puts "\nall done\n"