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.exp117
1 files changed, 101 insertions, 16 deletions
diff --git a/test/features/3.1.exp b/test/features/3.1.exp
index bcac4bf04..52a929651 100755
--- a/test/features/3.1.exp
+++ b/test/features/3.1.exp
@@ -12,20 +12,49 @@ set chroot [lindex $argv 1]
12# 12#
13# N 13# N
14# 14#
15send -- "touch ~/.config/firejail-test-file\r" 15send -- "firejail --noprofile --private\r"
16sleep 1
17send -- "firejail --noprofile --tmpfs=/home/netblue/.config\r"
18expect { 16expect {
19 timeout {puts "TESTING ERROR 0\n";exit} 17 timeout {puts "TESTING ERROR 0\n";exit}
20 "Child process initialized" 18 "Child process initialized"
21} 19}
22sleep 1 20sleep 1
23 21
24send -- "ls ~/.config | wc -l\r" 22send -- "ls -al | wc -l\r"
23expect {
24 timeout {puts "TESTING ERROR 1.1\n";exit}
25 "5"
26}
27
28send -- "ls -al .bashrc\r"
29expect {
30 timeout {puts "TESTING ERROR 1.2\n";exit}
31 "netblue"
32}
33expect {
34 timeout {puts "TESTING ERROR 1.3\n";exit}
35 "netblue"
36}
37expect {
38 timeout {puts "TESTING ERROR 1.4\n";exit}
39 ".bashrc"
40}
41
42send -- "ls -al .Xauthority\r"
43expect {
44 timeout {puts "TESTING ERROR 1.5\n";exit}
45 "netblue"
46}
25expect { 47expect {
26 timeout {puts "TESTING ERROR 1\n";exit} 48 timeout {puts "TESTING ERROR 1.6\n";exit}
27 "0" 49 "netblue"
28} 50}
51expect {
52 timeout {puts "TESTING ERROR 1.7\n";exit}
53 ".Xauthority"
54}
55
56
57
29after 100 58after 100
30send -- "exit\r" 59send -- "exit\r"
31sleep 1 60sleep 1
@@ -34,18 +63,47 @@ sleep 1
34# O 63# O
35# 64#
36if { $overlay == "overlay" } { 65if { $overlay == "overlay" } {
37 send -- "firejail --noprofile --overlay --tmpfs=/home/netblue/.config\r" 66 send -- "firejail --noprofile --overlay --private\r"
38 expect { 67 expect {
39 timeout {puts "TESTING ERROR 2\n";exit} 68 timeout {puts "TESTING ERROR 2\n";exit}
40 "Child process initialized" 69 "Child process initialized"
41 } 70 }
42 sleep 1 71 sleep 1
43 72
44 send -- "ls ~/.config | wc -l\r" 73 send -- "ls -al | wc -l\r"
74 expect {
75 timeout {puts "TESTING ERROR 3.1\n";exit}
76 "5"
77 }
78
79 send -- "ls -al .bashrc\r"
80 expect {
81 timeout {puts "TESTING ERROR 3.2\n";exit}
82 "netblue"
83 }
84 expect {
85 timeout {puts "TESTING ERROR 3.3\n";exit}
86 "netblue"
87 }
45 expect { 88 expect {
46 timeout {puts "TESTING ERROR 3\n";exit} 89 timeout {puts "TESTING ERROR 3.4\n";exit}
47 "0" 90 ".bashrc"
48 } 91 }
92
93 send -- "ls -al .Xauthority\r"
94 expect {
95 timeout {puts "TESTING ERROR 3.5\n";exit}
96 "netblue"
97 }
98 expect {
99 timeout {puts "TESTING ERROR 3.6\n";exit}
100 "netblue"
101 }
102 expect {
103 timeout {puts "TESTING ERROR 3.7\n";exit}
104 ".Xauthority"
105 }
106
49 after 100 107 after 100
50 send -- "exit\r" 108 send -- "exit\r"
51 sleep 1 109 sleep 1
@@ -55,20 +113,47 @@ if { $overlay == "overlay" } {
55# C 113# C
56# 114#
57if { $chroot == "chroot" } { 115if { $chroot == "chroot" } {
58 send -- "touch /tmp/chroot/home/netblue/.config/firejail-test-file\r" 116 send -- "firejail --noprofile --chroot=/tmp/chroot --private\r"
59 sleep 1
60 send -- "firejail --noprofile --chroot=/tmp/chroot --tmpfs=/home/netblue/.config\r"
61 expect { 117 expect {
62 timeout {puts "TESTING ERROR 4\n";exit} 118 timeout {puts "TESTING ERROR 4\n";exit}
63 "Child process initialized" 119 "Child process initialized"
64 } 120 }
65 sleep 1 121 sleep 1
66 122
67 send -- "ls ~/.config | wc -l\r" 123 send -- "ls -al | wc -l\r"
124 expect {
125 timeout {puts "TESTING ERROR 5.1\n";exit}
126 "5"
127 }
128
129 send -- "ls -al .bashrc\r"
68 expect { 130 expect {
69 timeout {puts "TESTING ERROR 5\n";exit} 131 timeout {puts "TESTING ERROR 5.2\n";exit}
70 "0" 132 "netblue"
71 } 133 }
134 expect {
135 timeout {puts "TESTING ERROR 5.3\n";exit}
136 "netblue"
137 }
138 expect {
139 timeout {puts "TESTING ERROR 5.4\n";exit}
140 ".bashrc"
141 }
142
143 send -- "ls -al .Xauthority\r"
144 expect {
145 timeout {puts "TESTING ERROR 5.5\n";exit}
146 "netblue"
147 }
148 expect {
149 timeout {puts "TESTING ERROR 5.6\n";exit}
150 "netblue"
151 }
152 expect {
153 timeout {puts "TESTING ERROR 5.7\n";exit}
154 ".Xauthority"
155 }
156
72 after 100 157 after 100
73 send -- "exit\r" 158 send -- "exit\r"
74 sleep 1 159 sleep 1