mirror of
https://github.com/netblue30/firejail.git
synced 2026-06-30 09:05:57 -06:00
testing
This commit is contained in:
parent
01ac6260f7
commit
1c54aadb6f
17 changed files with 542 additions and 23 deletions
|
|
@ -25,7 +25,7 @@ for app in "${apps[@]}"; do
|
|||
done
|
||||
rm -f index.html
|
||||
rm wget-log*
|
||||
sudo ls
|
||||
sudo true
|
||||
|
||||
# testing seccomp @clock group
|
||||
echo "TESTING: seccomp @clock group (test/apps/seccomp-clock.exp)"
|
||||
|
|
@ -36,19 +36,17 @@ echo "TESTING: pid 1 functionality (test/apps/pid1.exp)"
|
|||
|
||||
# X11 apps
|
||||
x11apps=(firefox qbittorrent firefox-xephyr galculator libreoffice firefox-xorg \
|
||||
lowriter gimp inkscape firefox-neteth emacs okular kdiff3 gpicview audacity \
|
||||
pauvcontrol mpv dosbox gnome-screenshot \
|
||||
lowriter gimp inkscape firefox-neteth emacs okular kdiff3 \
|
||||
gpicview audacity meld vlc warzone2100 audacious \
|
||||
pauvcontrol mpv dosbox gnome-screenshot brave \
|
||||
flameshot ghb kdenlive krita meld \
|
||||
vlc warzone2100 \
|
||||
xterm x11-none xterm-xorg xterm-xephyr xterm-xpra firefox-xpra)
|
||||
|
||||
for app in "${x11apps[@]}"; do
|
||||
sudo ls
|
||||
if file -v "$app".exp
|
||||
then
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
./"$app".exp
|
||||
else
|
||||
echo "TESTING SKIP: $app not found"
|
||||
fi
|
||||
sudo true
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
./"$app".exp
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
|
|
|||
53
test/apps/audacious.exp
Executable file
53
test/apps/audacious.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/audacious]} {
|
||||
puts "TESTING: audacious not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private audacious\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/audacious.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"audacious"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"audacious"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
41
test/apps/brave.exp
Executable file
41
test/apps/brave.exp
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/brave]} {
|
||||
puts "TESTING: brave not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet brave\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/brave.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"brave"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
|
|
@ -7,9 +7,7 @@ set timeout 10
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {[file exists /usr/bin/Xephyr]} {
|
||||
puts "TESTING: Xephyr available\n"
|
||||
} else {
|
||||
if {![file exists /usr/bin/Xephyr]} {
|
||||
puts "TESTING: xpra not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ set timeout 10
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {[file exists /usr/bin/xpra]} {
|
||||
puts "TESTING: xpra available\n"
|
||||
} else {
|
||||
if {![file exists /usr/bin/xpra]} {
|
||||
puts "TESTING: xpra not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
|
|
|
|||
53
test/apps/flameshot.exp
Executable file
53
test/apps/flameshot.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/flameshot]} {
|
||||
puts "TESTING: flameshot not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet flameshot\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/flameshot.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"flameshot"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"flameshot"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/ghb.exp
Executable file
53
test/apps/ghb.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/ghb]} {
|
||||
puts "TESTING: ghb (handbrake) not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet ghb\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/ghb.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"ghb"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"ghb"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/kdenlive.exp
Executable file
53
test/apps/kdenlive.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/kdenlive]} {
|
||||
puts "TESTING: kdenlive not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet kdenlive\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/kdenlive.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"kdenlive"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"kdenlive"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
|
|
@ -7,6 +7,12 @@ set timeout 10
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/kdiff3]} {
|
||||
puts "TESTING: kdiff3 not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
send -- "firejail --private kdiff3\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
|
|
|
|||
53
test/apps/krita.exp
Executable file
53
test/apps/krita.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/krita]} {
|
||||
puts "TESTING: krita not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet krita\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/krita.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"krita"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"krita"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
51
test/apps/meld.exp
Executable file
51
test/apps/meld.exp
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/meld]} {
|
||||
puts "TESTING: medl not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
send -- "firejail --private meld\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/meld.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"meld"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"meld"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "alldone \n"
|
||||
|
|
@ -7,6 +7,14 @@ set timeout 10
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/qbittorrent]} {
|
||||
puts "TESTING: qbittorrent not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private qbittorrent\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
|
|
|
|||
53
test/apps/template.exp
Executable file
53
test/apps/template.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/template]} {
|
||||
puts "TESTING: TEMPLATE not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet template\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/template.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"template"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"template"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/vlc.exp
Executable file
53
test/apps/vlc.exp
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {![file exists /usr/bin/vlc]} {
|
||||
puts "TESTING: vlc not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private vlc\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/vlc.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 5
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"vlc"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"vlc"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "alldone \n"
|
||||
52
test/apps/warzone2100.exp
Executable file
52
test/apps/warzone2100.exp
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/expect -f
|
||||
# This file is part of Firejail project
|
||||
# Copyright (C) 2014-2026 Firejail Authors
|
||||
# License GPL v2
|
||||
|
||||
set timeout 10
|
||||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
send -- "which -a warzone2100\r"
|
||||
expect {
|
||||
timeout {puts "TESTING: warzone2100 not installed\n"; exit}
|
||||
"/warzone2100"
|
||||
}
|
||||
after 100
|
||||
|
||||
send -- "firejail --private warzone2100\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/warzone2100.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
sleep 8
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firejail --list\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"firejail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 3\n";exit}
|
||||
"warzone"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"warzone"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "all done \n"
|
||||
|
|
@ -7,9 +7,7 @@ set timeout 10
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {[file exists /usr/bin/Xephyr]} {
|
||||
puts "TESTING: Xephyr available\n"
|
||||
} else {
|
||||
if {![file exists /usr/bin/Xephyr]} {
|
||||
puts "TESTING: xpra not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ set timeout 10
|
|||
spawn $env(SHELL)
|
||||
match_max 100000
|
||||
|
||||
if {[file exists /usr/bin/xpra]} {
|
||||
puts "TESTING: xpra available\n"
|
||||
} else {
|
||||
if {![file exists /usr/bin/xpra]} {
|
||||
puts "TESTING: xpra not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue