aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/build.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2020-05-18 07:33:28 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2020-05-18 07:33:28 -0400
commite7a61d334b704b3fb8dd2da1f6fdace918274fa3 (patch)
tree9ac2b114a0eca9309e1ccdcacd956a2ff12f18a7 /test/utils/build.exp
parentbetter blacklist ordering (diff)
downloadfirejail-e7a61d334b704b3fb8dd2da1f6fdace918274fa3.tar.gz
firejail-e7a61d334b704b3fb8dd2da1f6fdace918274fa3.tar.zst
firejail-e7a61d334b704b3fb8dd2da1f6fdace918274fa3.zip
fixing some of the tests
Diffstat (limited to 'test/utils/build.exp')
-rwxr-xr-xtest/utils/build.exp56
1 files changed, 24 insertions, 32 deletions
diff --git a/test/utils/build.exp b/test/utils/build.exp
index ae46ffa6e..ac4f30326 100755
--- a/test/utils/build.exp
+++ b/test/utils/build.exp
@@ -7,22 +7,21 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "echo testing > ~/firejail-test-file-7699\r"
11after 100
12
10send -- "firejail --build cat ~/firejail-test-file-7699\r" 13send -- "firejail --build cat ~/firejail-test-file-7699\r"
11expect { 14expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 15 timeout {puts "TESTING ERROR 0\n";exit}
13 "whitelist ~/firejail-test-file-7699" 16 "whitelist $\{HOME\}/firejail-test-file-7699"
14}
15expect {
16 timeout {puts "TESTING ERROR 0.1\n";exit}
17 "include /etc/firejail/whitelist-common.inc"
18} 17}
19expect { 18expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
21 "private-tmp" 20 "include whitelist-common.inc"
22} 21}
23expect { 22expect {
24 timeout {puts "TESTING ERROR 2\n";exit} 23 timeout {puts "TESTING ERROR 2\n";exit}
25 "private-dev" 24 "blacklist /usr/share"
26} 25}
27expect { 26expect {
28 timeout {puts "TESTING ERROR 3\n";exit} 27 timeout {puts "TESTING ERROR 3\n";exit}
@@ -34,26 +33,40 @@ expect {
34} 33}
35expect { 34expect {
36 timeout {puts "TESTING ERROR 5\n";exit} 35 timeout {puts "TESTING ERROR 5\n";exit}
37 "caps.drop all" 36 "private-dev"
38} 37}
39expect { 38expect {
40 timeout {puts "TESTING ERROR 6\n";exit} 39 timeout {puts "TESTING ERROR 6\n";exit}
41 "nonewprivs" 40 "private-etc"
42} 41}
43expect { 42expect {
44 timeout {puts "TESTING ERROR 7\n";exit} 43 timeout {puts "TESTING ERROR 7\n";exit}
45 "seccomp" 44 "private-tmp"
46} 45}
47expect { 46expect {
48 timeout {puts "TESTING ERROR 8\n";exit} 47 timeout {puts "TESTING ERROR 8\n";exit}
49 "net none" 48 "caps.drop all"
50} 49}
51expect { 50expect {
52 timeout {puts "TESTING ERROR 9\n";exit} 51 timeout {puts "TESTING ERROR 9\n";exit}
52 "nonewprivs"
53}
54expect {
55 timeout {puts "TESTING ERROR 10\n";exit}
56 "seccomp"
57}
58expect {
59 timeout {puts "TESTING ERROR 11\n";exit}
60 "net none"
61}
62expect {
63 timeout {puts "TESTING ERROR 12\n";exit}
53 "shell none" 64 "shell none"
54} 65}
55after 100 66after 100
56 67
68
69
57send -- "firejail --build cat /etc/passwd\r" 70send -- "firejail --build cat /etc/passwd\r"
58expect { 71expect {
59 timeout {puts "TESTING ERROR 10\n";exit} 72 timeout {puts "TESTING ERROR 10\n";exit}
@@ -72,21 +85,6 @@ expect {
72} 85}
73after 100 86after 100
74 87
75
76#send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r"
77#expect {
78# timeout {puts "TESTING ERROR 11\n";exit}
79# "whitelist /var/tmp/firejail-test-file-7699"
80#}
81#after 100
82
83#send -- "firejail --build man firejail\r"
84#expect {
85# timeout {puts "TESTING ERROR 12\n";exit}
86# "whitelist /usr/share/man"
87#}
88#after 100
89
90send -- "firejail --build wget --output-document=~ debian.org\r" 88send -- "firejail --build wget --output-document=~ debian.org\r"
91expect { 89expect {
92 timeout {puts "TESTING ERROR 13\n";exit} 90 timeout {puts "TESTING ERROR 13\n";exit}
@@ -98,10 +96,4 @@ expect {
98} 96}
99after 100 97after 100
100 98
101
102send -- "firejail --build cat /tmp/firejail-test-file-7699\r"
103#todo - bug: it comes back with private-tmp
104sleep 1
105
106
107puts "all done\n" 99puts "all done\n"