mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
tests: skip audit.exp if tests are already running in a pid namespace
This commit is contained in:
parent
244aac8031
commit
df1831299f
2 changed files with 10 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ send -- "stty -echo\r"
|
|||
after 100
|
||||
send -- "firejail --shutdown=shutdowntesting; echo done\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
timeout {puts "TESTING ERROR 1\n";exit}
|
||||
"done"
|
||||
}
|
||||
sleep 5
|
||||
|
|
@ -28,15 +28,15 @@ sleep 5
|
|||
spawn $env(SHELL)
|
||||
send -- "firejail --list;echo done\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
"shutdowntesting" {puts "TESTING ERROR 6\n";exit}
|
||||
timeout {puts "TESTING ERROR 2\n";exit}
|
||||
"shutdowntesting" {puts "TESTING ERROR 3\n";exit}
|
||||
"done"
|
||||
}
|
||||
sleep 1
|
||||
|
||||
send -- "firejail --shutdown=sutdowntesting\r"
|
||||
expect {
|
||||
timeout {puts "TESTING ERROR 5\n";exit}
|
||||
timeout {puts "TESTING ERROR 4\n";exit}
|
||||
"cannot find sandbox sutdowntesting"
|
||||
}
|
||||
after 100
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@ rm -f ~/firejail-test-file-7699
|
|||
rm -f /tmp/firejail-test-file-7699
|
||||
rm -f /var/tmp/firejail-test-file-7699
|
||||
|
||||
echo "TESTING: audit (test/utils/audit.exp)"
|
||||
./audit.exp
|
||||
if [ $(readlink /proc/self) -lt 100 ]; then
|
||||
echo "TESTING SKIP: already running in pid namespace (test/utils/audit.exp)"
|
||||
else
|
||||
echo "TESTING: audit (test/utils/audit.exp)"
|
||||
./audit.exp
|
||||
fi
|
||||
|
||||
echo "TESTING: name (test/utils/name.exp)"
|
||||
./name.exp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue