allow-debuggers.exp 525 Bytes
Newer Older
netblue30's avatar
netblue30 committed
1 2 3 4 5 6 7
#!/usr/bin/expect -f

set timeout 10
cd /home
spawn $env(SHELL)
match_max 100000

8
send -- "firejail --allow-debuggers\r"
netblue30's avatar
netblue30 committed
9 10
expect {
	timeout {puts "TESTING ERROR 0\n";exit}
netblue30's avatar
netblue30 committed
11 12
	"Child process initialized" { puts "\n"}
	"is disabled on Linux kernels prior to 4.8" { puts "TESTING SKIP: kernel too old\n"; exit }
netblue30's avatar
netblue30 committed
13 14 15
}
after 100

16
send -- "strace ls\r"
netblue30's avatar
netblue30 committed
17
expect {
18 19
	timeout {puts "TESTING ERROR 1\n";exit}
	"open"
20
}
netblue30's avatar
netblue30 committed
21
expect {
22
	timeout {puts "TESTING ERROR 2\n";exit}
netblue30's avatar
netblue30 committed
23
	"exit_group"
netblue30's avatar
netblue30 committed
24 25
}
after 100
26 27 28
send -- "exit\r"
sleep 1

netblue30's avatar
netblue30 committed
29 30 31


puts "\nall done\n"