diff options
author | netblue30 <netblue30@yahoo.com> | 2018-04-01 10:41:00 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-04-01 10:41:00 -0400 |
commit | 80d0d452d660f2c77af94fc35d2caaea7cfd1cae (patch) | |
tree | 6887b38cef478cf917cc99b56e1d622635e78e02 /test/utils | |
parent | testing (diff) | |
download | firejail-80d0d452d660f2c77af94fc35d2caaea7cfd1cae.tar.gz firejail-80d0d452d660f2c77af94fc35d2caaea7cfd1cae.tar.zst firejail-80d0d452d660f2c77af94fc35d2caaea7cfd1cae.zip |
testing
Diffstat (limited to 'test/utils')
-rwxr-xr-x | test/utils/build.exp | 33 | ||||
-rwxr-xr-x | test/utils/utils.sh | 4 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/utils/build.exp b/test/utils/build.exp index de2a9b6ae..5e883e4ba 100755 --- a/test/utils/build.exp +++ b/test/utils/build.exp | |||
@@ -54,5 +54,38 @@ expect { | |||
54 | } | 54 | } |
55 | after 100 | 55 | after 100 |
56 | 56 | ||
57 | send -- "firejail --build cat /etc/passwd\r" | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 10\n";exit} | ||
60 | "private-etc passwd," | ||
61 | } | ||
62 | after 100 | ||
63 | |||
64 | send -- "firejail --build cat /var/tmp/firejail-test-file-7699\r" | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 11\n";exit} | ||
67 | "whitelist /var/tmp/firejail-test-file-7699" | ||
68 | } | ||
69 | after 100 | ||
70 | |||
71 | send -- "firejail --build man firejail\r" | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 12\n";exit} | ||
74 | "whitelist /usr/share/man" | ||
75 | } | ||
76 | after 100 | ||
77 | |||
78 | send -- "firejail --build wget blablabla\r" | ||
79 | expect { | ||
80 | timeout {puts "TESTING ERROR 13\n";exit} | ||
81 | "protocol inet" | ||
82 | } | ||
83 | after 100 | ||
84 | |||
85 | |||
86 | send -- "firejail --build cat /tmp/firejail-test-file-7699\r" | ||
87 | #todo - bug: it comes back with private-tmp | ||
88 | sleep 1 | ||
89 | |||
57 | 90 | ||
58 | puts "all done\n" | 91 | puts "all done\n" |
diff --git a/test/utils/utils.sh b/test/utils/utils.sh index 9259ee33a..5438e11a8 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh | |||
@@ -13,9 +13,13 @@ fi | |||
13 | export PATH="$PATH:/usr/lib/firejail" | 13 | export PATH="$PATH:/usr/lib/firejail" |
14 | 14 | ||
15 | echo "testing" > ~/firejail-test-file-7699 | 15 | echo "testing" > ~/firejail-test-file-7699 |
16 | echo "testing" > /tmp/firejail-test-file-7699 | ||
17 | echo "testing" > /var/tmp/firejail-test-file-7699 | ||
16 | echo "TESTING: build (test/utils/build.exp)" | 18 | echo "TESTING: build (test/utils/build.exp)" |
17 | ./build.exp | 19 | ./build.exp |
18 | rm -f ~/firejail-test-file-7699 | 20 | rm -f ~/firejail-test-file-7699 |
21 | rm -f /tmp/firejail-test-file-7699 | ||
22 | rm -f /var/tmp/firejail-test-file-7699 | ||
19 | 23 | ||
20 | echo "TESTING: audit (test/utils/audit.exp)" | 24 | echo "TESTING: audit (test/utils/audit.exp)" |
21 | ./audit.exp | 25 | ./audit.exp |