firejail/test/firemon-cgroup.exp
2015-08-08 19:12:30 -04:00

40 lines
628 B
Text
Executable file

#!/usr/bin/expect -f
set timeout 10
spawn $env(SHELL)
match_max 100000
send -- "firejail --name=bingo1 --cgroup=/sys/fs/cgroup/g1/tasks\r"
expect {
timeout {puts "TESTING ERROR 0\n";exit}
"Child process initialized"
}
sleep 1
spawn $env(SHELL)
send -- "firejail --name=bingo2\r"
expect {
timeout {puts "TESTING ERROR 0\n";exit}
"Child process initialized"
}
sleep 1
spawn $env(SHELL)
send -- "firemon --cgroup\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"bingo1"
}
expect {
timeout {puts "TESTING ERROR 2\n";exit}
":/g1"
}
expect {
timeout {puts "TESTING ERROR 3\n";exit}
"bingo2"
}
sleep 1
puts "\n"