mirror of
https://github.com/netblue30/firejail.git
synced 2026-07-16 06:17:09 -06:00
more testing
This commit is contained in:
parent
133bfce49b
commit
c4a99f41cc
18 changed files with 881 additions and 13 deletions
53
test/apps/amarok.exp
Executable file
53
test/apps/amarok.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/amarok]} {
|
||||
puts "TESTING: amarok not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet amarok\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/amarok.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}
|
||||
"amarok"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"amarok"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
|
|
@ -13,6 +13,7 @@ export LC_ALL=C
|
|||
sudo ls
|
||||
|
||||
# console apps
|
||||
echo "TESTING: console apps **************************"
|
||||
apps=(ping dig wget curl ftp telnet ffmpeg)
|
||||
for app in "${apps[@]}"; do
|
||||
if command -v "$app"
|
||||
|
|
@ -28,23 +29,17 @@ rm wget-log*
|
|||
sudo true
|
||||
|
||||
# testing seccomp @clock group
|
||||
echo "TESTING: firejail problems **************************"
|
||||
echo "TESTING: seccomp @clock group (test/apps/seccomp-clock.exp)"
|
||||
./seccomp-clock.exp
|
||||
|
||||
echo "TESTING: pid 1 functionality (test/apps/pid1.exp)"
|
||||
./pid1.exp
|
||||
|
||||
# X11 apps
|
||||
x11apps=(firefox qbittorrent firefox-xephyr galculator libreoffice firefox-xorg \
|
||||
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 evince atril rhythmbox kate eom eog \
|
||||
gwenview chromium loupe showtime totem gnome-calculator \
|
||||
darktable brasero \
|
||||
xterm x11-none xterm-xorg xterm-xephyr xterm-xpra firefox-xpra)
|
||||
|
||||
# x11 sandboxing
|
||||
echo "TESTING: x11 sandboxing *********************************"
|
||||
x11apps=(firefox-xephyr x11-none firefox-xorg xterm-xorg xterm-xephyr \
|
||||
xterm-xpra firefox-xpra)
|
||||
for app in "${x11apps[@]}"; do
|
||||
sudo true
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
|
|
@ -52,5 +47,52 @@ for app in "${x11apps[@]}"; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
cd ../../
|
||||
./mkgcov.sh
|
||||
# browsers
|
||||
echo "TESTING: browsers ***************************************"
|
||||
browsers=(firefox brave chromium vivaldi)
|
||||
for app in "${browsers[@]}"; do
|
||||
sudo true
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
./"$app".exp
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# multimedia apps
|
||||
echo "TESTING: multimedia apps ************************************"
|
||||
multimedia=(vlc mpv rhythmbox totem showtime audacious smplayer mplayer \
|
||||
cmus strawberry amarok quodlibet qmmp)
|
||||
for app in "${multimedia[@]}"; do
|
||||
sudo true
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
./"$app".exp
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "TESTING: games ************************************"
|
||||
games=(warzone2100 dosbox)
|
||||
for app in "${games[@]}"; do
|
||||
sudo true
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
./"$app".exp
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# dektop apps
|
||||
echo "TESTING: desktop apps ************************************"
|
||||
desktopapps=(xterm qbittorrent galculator libreoffice \
|
||||
lowriter gimp inkscape firefox-neteth emacs okular kdiff3 \
|
||||
gpicview audacity meld \
|
||||
pauvcontrol gnome-screenshot \
|
||||
flameshot ghb kdenlive krita \
|
||||
evince atril kate eom eog \
|
||||
gwenview oupe gnome-calculator \
|
||||
darktable brasero \
|
||||
transmission-qt transmission-gtk \
|
||||
thunderbird kmail xpdf zathura)
|
||||
|
||||
for app in "${desktopapps[@]}"; do
|
||||
sudo true
|
||||
echo "TESTING: $app (test/apps/$app.exp)"
|
||||
./"$app".exp
|
||||
sleep 1
|
||||
done
|
||||
|
|
|
|||
32
test/apps/cmus.exp
Executable file
32
test/apps/cmus.exp
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/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/cmus]} {
|
||||
puts "TESTING: cmus not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet cmus --help\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/cmus.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"Curses based music player"
|
||||
}
|
||||
|
||||
puts "all done\n"
|
||||
53
test/apps/fragments.exp
Executable file
53
test/apps/fragments.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/fragments]} {
|
||||
puts "TESTING: fragments not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet fragments\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/fragments.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}
|
||||
"fragments"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"fragments"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/kmail.exp
Executable file
53
test/apps/kmail.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/kmail]} {
|
||||
puts "TESTING: kmail not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet kmail\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/kmail.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}
|
||||
"kmail"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"kmail"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/ktorrent.exp
Executable file
53
test/apps/ktorrent.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/ktorrent]} {
|
||||
puts "TESTING: ktorrent not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet ktorrent\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/ktorrent.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}
|
||||
"ktorrent"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"ktorrent"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
32
test/apps/less.exp
Executable file
32
test/apps/less.exp
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/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/less]} {
|
||||
puts "TESTING: less not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet less --help\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/less.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"Commands marked with"
|
||||
}
|
||||
|
||||
puts "all done\n"
|
||||
32
test/apps/mplayer.exp
Executable file
32
test/apps/mplayer.exp
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/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/mplayer]} {
|
||||
puts "TESTING: mplayer not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet mplayer --help\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/mplayer.profile"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"Basic keys"
|
||||
}
|
||||
|
||||
puts "all done\n"
|
||||
53
test/apps/qmmp.exp
Executable file
53
test/apps/qmmp.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/qmmp]} {
|
||||
puts "TESTING: qmmp not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet qmmp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/qmmp.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}
|
||||
"qmmp"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"qmmp"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/quodlibet.exp
Executable file
53
test/apps/quodlibet.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/quodlibet]} {
|
||||
puts "TESTING: quodlibet not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet quodlibet\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/quodlibet.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}
|
||||
"quodlibet"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"quodlibet"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/smplayer.exp
Executable file
53
test/apps/smplayer.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/smplayer]} {
|
||||
puts "TESTING: smplayer not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet smplayer\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/smplayer.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}
|
||||
"smplayer"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"smplayer"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/strawberry.exp
Executable file
53
test/apps/strawberry.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/strawberry]} {
|
||||
puts "TESTING: strawberry not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet strawberry\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/strawberry.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}
|
||||
"strawberry"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"strawberry"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/thunderbird.exp
Executable file
53
test/apps/thunderbird.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/thunderbird]} {
|
||||
puts "TESTING: thunderbird not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet thunderbird\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/thunderbird.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}
|
||||
"thunderbird"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"thunderbird"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/transmission-gtk.exp
Executable file
53
test/apps/transmission-gtk.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/transmission-gtk]} {
|
||||
puts "TESTING: transmission-gtk not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet transmission-gtk\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/transmission-gtk.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}
|
||||
"transmission-gtk"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"transmission-gtk"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/transmission-qt.exp
Executable file
53
test/apps/transmission-qt.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/transmission-qt]} {
|
||||
puts "TESTING: transmission-qt not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet transmission-qt\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/transmission-qt.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}
|
||||
"transmission-qt"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"transmission-qt"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
41
test/apps/vivaldi.exp
Executable file
41
test/apps/vivaldi.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/vivaldi]} {
|
||||
puts "TESTING: vivaldi not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet vivaldi\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/vivaldi.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}
|
||||
"vivaldi"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/xpdf.exp
Executable file
53
test/apps/xpdf.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/xpdf]} {
|
||||
puts "TESTING: xpdf not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet xpdf\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/xpdf.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}
|
||||
"xpdf"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"xpdf"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
53
test/apps/zathura.exp
Executable file
53
test/apps/zathura.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/zathura]} {
|
||||
puts "TESTING: zathura not installed, skipping...\n"
|
||||
after 100
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
|
||||
send -- "firejail --private --ignore=quiet zathura\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 0\n";exit}
|
||||
"Reading profile /etc/firejail/zathura.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}
|
||||
"zathura"
|
||||
}
|
||||
after 100
|
||||
|
||||
spawn $env(SHELL)
|
||||
send -- "firemon --seccomp\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"zathura"
|
||||
}
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"Seccomp: 2"
|
||||
}
|
||||
after 100
|
||||
|
||||
puts "\n"
|
||||
Loading…
Add table
Add a link
Reference in a new issue