aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.11.exp
blob: b3d3af18df6e3bd4dd11804a78c9cfb3e35cd24b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#!/usr/bin/expect -f
#
# mkdir
#

set timeout 10
spawn $env(SHELL)
match_max 100000
set overlay [lindex $argv 0]
set chroot [lindex $argv 1]

#
# N
#
send -- "rm -fr ~/firejail-xy76_u9\r"
sleep 1

send -- "firejail --profile=3.11.profile\r"
expect {
	timeout {puts "TESTING ERROR 0\n";exit}
	"Child process initialized"
}
sleep 1

send -- "ls -l ~ | grep firejail-xy76_u9\r"
expect {
	timeout {puts "TESTING ERROR 1\n";exit}
	"drwx------"
}
expect {
	timeout {puts "TESTING ERROR 2\n";exit}
	"netblue netblue"
}
expect {
	timeout {puts "TESTING ERROR 3\n";exit}
	"firejail-xy76_u9"
}
after 100

send -- "ls -l ~/firejail-xy76_u9\r"
expect {
	timeout {puts "TESTING ERROR 4\n";exit}
	"drwx------"
}
expect {
	timeout {puts "TESTING ERROR 5\n";exit}
	"netblue netblue"
}
expect {
	timeout {puts "TESTING ERROR 6\n";exit}
	"testdir"
}
after 100

send -- "exit\r"
sleep 1
send -- "rm -fr ~/firejail-xy76_u9\r"
sleep 1

#
# O
#
if { $overlay == "overlay" } {
	send -- "rm -fr ~/firejail-xy76_u9\r"
	sleep 1
	
	send -- "firejail --profile=3.11.profile\r"
	expect {
		timeout {puts "TESTING ERROR 10\n";exit}
		"Child process initialized"
	}
	sleep 1
	
	send -- "ls -l ~ | grep firejail-xy76_u9\r"
	expect {
		timeout {puts "TESTING ERROR 11\n";exit}
		"drwx------"
	}
	expect {
		timeout {puts "TESTING ERROR 12\n";exit}
		"netblue netblue"
	}
	expect {
		timeout {puts "TESTING ERROR 13\n";exit}
		"firejail-xy76_u9"
	}
	after 100
	
	send -- "ls -l ~/firejail-xy76_u9\r"
	expect {
		timeout {puts "TESTING ERROR 14\n";exit}
		"drwx------"
	}
	expect {
		timeout {puts "TESTING ERROR 15\n";exit}
		"netblue netblue"
	}
	expect {
		timeout {puts "TESTING ERROR 16\n";exit}
		"testdir"
	}
	after 100
	
	send -- "exit\r"
	sleep 1
	send -- "rm -fr ~/firejail-xy76_u9\r"
	sleep 1


}

#
# C
#
if { $chroot == "chroot" } {
	send -- "rm -fr ~/firejail-xy76_u9\r"
	sleep 1
	
	send -- "firejail --profile=3.11.profile\r"
	expect {
		timeout {puts "TESTING ERROR 20\n";exit}
		"Child process initialized"
	}
	sleep 1
	
	send -- "ls -l ~ | grep firejail-xy76_u9\r"
	expect {
		timeout {puts "TESTING ERROR 21\n";exit}
		"drwx------"
	}
	expect {
		timeout {puts "TESTING ERROR 22\n";exit}
		"netblue netblue"
	}
	expect {
		timeout {puts "TESTING ERROR 23\n";exit}
		"firejail-xy76_u9"
	}
	after 100
	
	send -- "ls -l ~/firejail-xy76_u9\r"
	expect {
		timeout {puts "TESTING ERROR 24\n";exit}
		"drwx------"
	}
	expect {
		timeout {puts "TESTING ERROR 25\n";exit}
		"netblue netblue"
	}
	expect {
		timeout {puts "TESTING ERROR 26\n";exit}
		"testdir"
	}
	after 100
	
	send -- "rm -fr ~/firejail-xy76_u9\r"
	sleep 1

	send -- "exit\r"

}


puts "\nall done\n"