mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 06:45:29 -06:00
testing
This commit is contained in:
parent
91e2867eaf
commit
e19a332008
5 changed files with 10 additions and 73 deletions
|
|
@ -5,36 +5,27 @@ cd /home
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
send -- "firejail --profile=/etc/firejail/firefox.profile --allow-debuggers strace ls\r"
|
||||
send -- "firejail --allow-debuggers\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Child process initialized" { puts "\n"}
|
||||
"is disabled on Linux kernels prior to 4.8" { puts "TESTING SKIP: kernel too old\n"; exit }
|
||||
}
|
||||
after 100
|
||||
|
||||
send -- "strace ls\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
"ioctl"
|
||||
"open"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"exit_group"
|
||||
}
|
||||
after 100
|
||||
send -- "exit\r"
|
||||
sleep 1
|
||||
|
||||
send -- "firejail --allow-debuggers --profile=/etc/firejail/firefox.profile strace ls\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"Child process initialized"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"ioctl"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"exit_group"
|
||||
}
|
||||
after 100
|
||||
|
||||
|
||||
puts "\nall done\n"
|
||||
|
|
|
|||
|
|
@ -68,9 +68,6 @@ fi
|
|||
echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)"
|
||||
./firejail-in-firejail.exp
|
||||
|
||||
echo "TESTING: firejail in firejail - force new sandbox (test/environment/firejail-in-firejail2.exp)"
|
||||
./firejail-in-firejail2.exp
|
||||
|
||||
which aplay
|
||||
if [ "$?" -eq 0 ];
|
||||
then
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2018 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
send -- "firejail --noprofile\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
"Child process initialized"
|
||||
}
|
||||
sleep 1
|
||||
|
||||
send -- "firejail\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"Warning: an existing sandbox was detected"
|
||||
}
|
||||
after 100
|
||||
|
||||
send -- "exit\r"
|
||||
after 100
|
||||
|
||||
send -- "firejail --force\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"Child process initialized"
|
||||
}
|
||||
after 100
|
||||
|
||||
send -- "exit\r"
|
||||
after 100
|
||||
|
||||
send -- "firejail --version\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"firejail version"
|
||||
}
|
||||
after 100
|
||||
|
||||
send -- "firejail --version --force\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"firejail version"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\nall done\n"
|
||||
|
|
@ -31,7 +31,7 @@ after 100
|
|||
send -- "fnetfilter test1.net,33\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"invalid destination file in netfilter command"
|
||||
"cannot open test1.net,33"
|
||||
}
|
||||
after 100
|
||||
send -- "rm outfile\r"
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ after 100
|
|||
send -- "fnetfilter test2.net,icmp-type,destination-unreachable,time-exceeded,echo-request\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 12\n";exit}
|
||||
"invalid destination file in netfilter command"
|
||||
"cannot open test2.net,"
|
||||
}
|
||||
after 100
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue