aboutsummaryrefslogtreecommitdiffstats
path: root/test/pid.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-08 19:12:30 -0400
commit1379851360349d6617ad32944a25ee5e2bb74fc2 (patch)
treef69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/pid.exp
parentdelete files (diff)
downloadfirejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst
firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip
Baseline firejail 0.9.28
Diffstat (limited to 'test/pid.exp')
-rwxr-xr-xtest/pid.exp48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/pid.exp b/test/pid.exp
new file mode 100755
index 000000000..0baf3af0e
--- /dev/null
+++ b/test/pid.exp
@@ -0,0 +1,48 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14# test processes
15send -- "bash\r"
16sleep 1
17send -- "ps aux; pwd\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "/bin/bash"
21}
22expect {
23 timeout {puts "TESTING ERROR 2\n";exit}
24 "bash"
25}
26expect {
27 timeout {puts "TESTING ERROR 3\n";exit}
28 "ps aux"
29}
30expect {
31 timeout {puts "TESTING ERROR 4\n";exit}
32 "home"
33}
34sleep 1
35
36
37send -- "ps aux |wc -l; pwd\r"
38expect {
39 timeout {puts "TESTING ERROR 5\n";exit}
40 "5"
41}
42expect {
43 timeout {puts "TESTING ERROR 6\n";exit}
44 "home"
45}
46sleep 1
47
48puts "\n"