mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 06:45:29 -06:00
97 lines
1.4 KiB
Text
Executable file
97 lines
1.4 KiB
Text
Executable file
#!/usr/bin/expect -f
|
|
|
|
set timeout 10
|
|
spawn $env(SHELL)
|
|
match_max 100000
|
|
|
|
send -- "firejail\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 0\n";exit}
|
|
"Child process initialized"
|
|
}
|
|
sleep 2
|
|
send -- "xterm &\r"
|
|
sleep 2
|
|
send -- "urxvt &\r"
|
|
sleep 2
|
|
send -- "rxvt &\r"
|
|
sleep 2
|
|
|
|
send -- "ps aux\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 1\n";exit}
|
|
"USER"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 2\n";exit}
|
|
"xterm"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 3\n";exit}
|
|
"urxvt"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 4\n";exit}
|
|
"rxvt"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 5\n";exit}
|
|
"ps aux"
|
|
}
|
|
|
|
send -- "pkill xterm\r"
|
|
sleep 1
|
|
send -- "pkill urxvt\r"
|
|
sleep 1
|
|
send -- "pkill rxvt\r"
|
|
sleep 1
|
|
send -- "exit\r"
|
|
sleep 2
|
|
|
|
|
|
send -- "firejail --private-dev\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 10\n";exit}
|
|
"Child process initialized"
|
|
}
|
|
sleep 2
|
|
send -- "xterm &\r"
|
|
sleep 2
|
|
send -- "urxvt &\r"
|
|
sleep 2
|
|
send -- "rxvt &\r"
|
|
sleep 2
|
|
|
|
send -- "ps aux\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 11\n";exit}
|
|
"USER"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 12\n";exit}
|
|
"xterm"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 13\n";exit}
|
|
"urxvt"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 14\n";exit}
|
|
"rxvt"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 15\n";exit}
|
|
"ps aux"
|
|
}
|
|
|
|
send -- "pkill xterm\r"
|
|
sleep 1
|
|
send -- "pkill urxvt\r"
|
|
sleep 1
|
|
send -- "pkill rxvt\r"
|
|
sleep 1
|
|
send -- "exit\r"
|
|
sleep 2
|
|
|
|
puts "\n"
|
|
|