firejail/test/kmsg.exp
2016-01-23 10:30:56 -05:00

29 lines
422 B
Text
Executable file

#!/usr/bin/expect -f
set timeout 10
spawn $env(SHELL)
match_max 100000
send -- "firejail\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"Child process initialized"
}
sleep 1
send -- "cat /dev/kmsg\r"
expect {
timeout {puts "TESTING ERROR 2\n";exit}
"Permission denied"
}
sleep 1
send -- "cat /proc/kmsg\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
"Permission denied"
}
sleep 1
puts "\nall done\n"