aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2019-10-31 15:49:41 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2019-10-31 15:49:41 -0400
commit0e723a8391caac5fec655747a58ba837abe3f4ce (patch)
tree4d34087d444155ca384a588ef7eb55af853780f7 /test/utils
parenttesting (diff)
downloadfirejail-0e723a8391caac5fec655747a58ba837abe3f4ce.tar.gz
firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.tar.zst
firejail-0e723a8391caac5fec655747a58ba837abe3f4ce.zip
testing
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/build.exp38
-rwxr-xr-xtest/utils/utils.sh1
2 files changed, 28 insertions, 11 deletions
diff --git a/test/utils/build.exp b/test/utils/build.exp
index e8dd2bbbc..44b73179c 100755
--- a/test/utils/build.exp
+++ b/test/utils/build.exp
@@ -61,24 +61,40 @@ expect {
61} 61}
62after 100 62after 100
63 63
64send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r" 64send -- "rm firejail-test-file-4388\r"
65expect {
66 timeout {puts "TESTING ERROR 11\n";exit}
67 "whitelist /var/tmp/firejail-test-file-7699"
68}
69after 100 65after 100
70 66send -- "firejail --build=firejail-test-file-4388 cat /etc/passwd\r"
71send -- "firejail --build man firejail\r" 67after 100
68send -- "cat firejail-test-file-4388\r"
72expect { 69expect {
73 timeout {puts "TESTING ERROR 12\n";exit} 70 timeout {puts "TESTING ERROR 10.1\n";exit}
74 "whitelist /usr/share/man" 71 "private-etc passwd,"
75} 72}
76after 100 73after 100
77 74
78send -- "firejail --build wget blablabla\r" 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"
79expect { 91expect {
80 timeout {puts "TESTING ERROR 13\n";exit} 92 timeout {puts "TESTING ERROR 13\n";exit}
81 "protocol inet" 93 "protocol"
94}
95expect {
96 timeout {puts "TESTING ERROR 13.1\n";exit}
97 "inet"
82} 98}
83after 100 99after 100
84 100
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 7ebd5a1d5..b5b90a22d 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -21,6 +21,7 @@ echo "TESTING: build (test/utils/build.exp)"
21rm -f ~/firejail-test-file-7699 21rm -f ~/firejail-test-file-7699
22rm -f /tmp/firejail-test-file-7699 22rm -f /tmp/firejail-test-file-7699
23rm -f /var/tmp/firejail-test-file-7699 23rm -f /var/tmp/firejail-test-file-7699
24rm -f firejail-test-file-4388
24 25
25if [ $(readlink /proc/self) -lt 100 ]; then 26if [ $(readlink /proc/self) -lt 100 ]; then
26 echo "TESTING SKIP: already running in pid namespace (test/utils/audit.exp)" 27 echo "TESTING SKIP: already running in pid namespace (test/utils/audit.exp)"