mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 06:45:29 -06:00
testing
This commit is contained in:
parent
b26054f890
commit
f2f3f1edba
2 changed files with 81 additions and 0 deletions
72
test/google-chrome.exp
Executable file
72
test/google-chrome.exp
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
#!/usr/bin/expect -f
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
send -- "firejail google-chrome www.gentoo.org\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/chromium.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
"Child process initialized"
|
||||
}
|
||||
sleep 10
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
":firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3.1\n";exit}
|
||||
"google-chrome"
|
||||
}
|
||||
sleep 1
|
||||
|
||||
send -- "firejail --name=blablabla\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"Child process initialized"
|
||||
}
|
||||
sleep 2
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
":firejail google-chrome"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5.1\n";exit}
|
||||
"Seccomp: 0"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5.1\n";exit}
|
||||
"name=blablabla"
|
||||
}
|
||||
sleep 1
|
||||
send -- "firemon --caps\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 6\n";exit}
|
||||
":firejail google-chrome"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 6.1\n";exit}
|
||||
"CapBnd:"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 6.2\n";exit}
|
||||
"fffffffff"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 6.3\n";exit}
|
||||
"name=blablabla"
|
||||
}
|
||||
sleep 1
|
||||
|
||||
puts "\n"
|
||||
|
||||
|
|
@ -179,6 +179,15 @@ else
|
|||
echo "TESTING: chromium not found"
|
||||
fi
|
||||
|
||||
which google-chrome
|
||||
if [ "$?" -eq 0 ];
|
||||
then
|
||||
echo "TESTING: google-chrome"
|
||||
./chromium.exp
|
||||
else
|
||||
echo "TESTING: google-chrome not found"
|
||||
fi
|
||||
|
||||
which opera
|
||||
if [ "$?" -eq 0 ];
|
||||
then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue