forked from netblue30/firejail
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
netblue30
committed
Nov 14, 2016
1 parent
2f8688a
commit 745742f
Showing
5 changed files
with
127 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
generate() { | ||
lcov --capture -d src/firejail -d src/firemon -d src/fseccomp -d src/fnet -d src/ftee -d src/lib -d src/firecfg --output-file gcov-file | ||
rm -fr gcov-dir | ||
genhtml gcov-file --output-directory gcov-dir | ||
} | ||
|
||
# init | ||
USER=`whoami` | ||
firejail --help | ||
firemon --help | ||
/usr/lib/firejail/fnet --help | ||
/usr/lib/firejail/fseccomp --help | ||
/usr/lib/firejail/ftee --help | ||
firecfg --help | ||
sudo chown $USER:$USER `find .` | ||
generate | ||
|
||
# running tests | ||
make test-root | ||
generate | ||
sleep 2 | ||
|
||
make test-network | ||
generate | ||
sleep 2 | ||
|
||
make test-appimage | ||
generate | ||
sleep 2 | ||
|
||
make test-overlay | ||
generate | ||
sleep 2 | ||
|
||
make test-profiles | ||
generate | ||
sleep 2 | ||
|
||
make test-fs | ||
generate | ||
sleep 2 | ||
|
||
make test-utils | ||
generate | ||
sleep 2 | ||
|
||
make test-environment | ||
generate | ||
sleep 2 | ||
|
||
make test-apps | ||
generate | ||
sleep 2 | ||
|
||
make test-apps-x11 | ||
generate | ||
sleep 2 | ||
|
||
make test-apps-x11-xorg | ||
generate | ||
sleep 2 | ||
|
||
make test-filters | ||
generate | ||
sleep 2 | ||
|
||
make test-arguments | ||
generate | ||
sleep 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# This file is part of Firejail project | ||
# Copyright (C) 2014-2016 Firejail Authors | ||
# License GPL v2 | ||
|
||
export MALLOC_CHECK_=3 | ||
export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
|
||
echo "TESTING: rlimit (test/rlimit/rlimit.exp)" | ||
./rlimit.exp | ||
|
||
echo "TESTING: rlimit profile (test/rlimit/rlimit-profile.exp)" | ||
./rlimit-profile.exp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/expect -f | ||
# This file is part of Firejail project | ||
# Copyright (C) 2014-2016 Firejail Authors | ||
# License GPL v2 | ||
|
||
set timeout 10 | ||
spawn $env(SHELL) | ||
match_max 100000 | ||
|
||
send -- "firejail --private\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 0\n";exit} | ||
"Child process initialized" | ||
} | ||
sleep 2 | ||
|
||
send -- "ls -l /home\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 1\n";exit} | ||
"total 0" | ||
} | ||
after 100 | ||
|
||
send -- "ls -l /root\r" | ||
expect { | ||
timeout {puts "TESTING ERROR 2\n";exit} | ||
"total 0" | ||
} | ||
after 100 | ||
|
||
send -- "exit\r" | ||
after 100 | ||
puts "\nall done\n" |