aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar startx2017 <vradu.startx@protonmail.com>2021-07-29 08:07:28 -0400
committerLibravatar startx2017 <vradu.startx@protonmail.com>2021-07-29 08:07:28 -0400
commite4307b409b72a7329ede7a3c54a8c8cd793c8d42 (patch)
tree3c0ce4ac2d312463603b82e4398a863176d403fe
parentcleanup make test-fs (diff)
downloadfirejail-e4307b409.tar.gz
firejail-e4307b409.tar.zst
firejail-e4307b409.zip
fix whitelist/allow in make test-utils
-rwxr-xr-xtest/utils/build.exp9
-rwxr-xr-xtest/utils/utils.sh4
2 files changed, 7 insertions, 6 deletions
diff --git a/test/utils/build.exp b/test/utils/build.exp
index 7fbe969a4..104ac037c 100755
--- a/test/utils/build.exp
+++ b/test/utils/build.exp
@@ -7,13 +7,13 @@ 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" 10send -- "echo testing > ~/_firejail-test-file\r"
11after 100 11after 100
12 12
13send -- "firejail --build cat ~/firejail-test-file-7699\r" 13send -- "firejail --build cat ~/_firejail-test-file\r"
14expect { 14expect {
15 timeout {puts "TESTING ERROR 0\n";exit} 15 timeout {puts "TESTING ERROR 0\n";exit}
16 "whitelist $\{HOME\}/firejail-test-file-7699" 16 "allow $\{HOME\}/_firejail-test-file"
17} 17}
18expect { 18expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
@@ -77,7 +77,8 @@ expect {
77} 77}
78after 100 78after 100
79 79
80 80send -- "rm -f ~/_firejail-test-file\r"
81after 100
81 82
82send -- "firejail --build cat /etc/passwd\r" 83send -- "firejail --build cat /etc/passwd\r"
83expect { 84expect {
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index c021d6287..e3e24bd9a 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -15,8 +15,8 @@ export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail"
15 15
16echo "TESTING: build (test/utils/build.exp)" 16echo "TESTING: build (test/utils/build.exp)"
17./build.exp 17./build.exp
18rm -f ~/firejail-test-file-7699 18rm -f ~/_firejail-test-file
19rm -f firejail-test-file-4388 19rm -f _firejail-test-file
20 20
21echo "TESTING: name (test/utils/name.exp)" 21echo "TESTING: name (test/utils/name.exp)"
22./name.exp 22./name.exp