Skip to content

Commit

Permalink
fix whitelist/allow in make test-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
startx2017 committed Jul 29, 2021
1 parent 0043826 commit e4307b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions test/utils/build.exp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ set timeout 10
spawn $env(SHELL)
match_max 100000

send -- "echo testing > ~/firejail-test-file-7699\r"
send -- "echo testing > ~/_firejail-test-file\r"
after 100

send -- "firejail --build cat ~/firejail-test-file-7699\r"
send -- "firejail --build cat ~/_firejail-test-file\r"
expect {
timeout {puts "TESTING ERROR 0\n";exit}
"whitelist $\{HOME\}/firejail-test-file-7699"
"allow $\{HOME\}/_firejail-test-file"
}
expect {
timeout {puts "TESTING ERROR 1\n";exit}
Expand Down Expand Up @@ -77,7 +77,8 @@ expect {
}
after 100


send -- "rm -f ~/_firejail-test-file\r"
after 100

send -- "firejail --build cat /etc/passwd\r"
expect {
Expand Down
4 changes: 2 additions & 2 deletions test/utils/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export PATH="$PATH:/usr/lib/firejail:/usr/lib64/firejail"

echo "TESTING: build (test/utils/build.exp)"
./build.exp
rm -f ~/firejail-test-file-7699
rm -f firejail-test-file-4388
rm -f ~/_firejail-test-file
rm -f _firejail-test-file

echo "TESTING: name (test/utils/name.exp)"
./name.exp
Expand Down

0 comments on commit e4307b4

Please sign in to comment.