aboutsummaryrefslogtreecommitdiffstats
path: root/test/tty.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-03-09 09:51:47 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-03-09 09:51:47 -0500
commitdc3564b18f1eafde1ccf46e722f8c2a9c1ee8555 (patch)
tree6178c2c6fc5912a63f5d54b1e3562d7049270418 /test/tty.exp
parentfs work (diff)
downloadfirejail-dc3564b18f1eafde1ccf46e722f8c2a9c1ee8555.tar.gz
firejail-dc3564b18f1eafde1ccf46e722f8c2a9c1ee8555.tar.zst
firejail-dc3564b18f1eafde1ccf46e722f8c2a9c1ee8555.zip
fixes
Diffstat (limited to 'test/tty.exp')
-rwxr-xr-xtest/tty.exp97
1 files changed, 97 insertions, 0 deletions
diff --git a/test/tty.exp b/test/tty.exp
new file mode 100755
index 000000000..116f297b2
--- /dev/null
+++ b/test/tty.exp
@@ -0,0 +1,97 @@
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 2
13send -- "xterm &\r"
14sleep 2
15send -- "urxvt &\r"
16sleep 2
17send -- "rxvt &\r"
18sleep 2
19
20send -- "ps aux\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "USER"
24}
25expect {
26 timeout {puts "TESTING ERROR 2\n";exit}
27 "xterm"
28}
29expect {
30 timeout {puts "TESTING ERROR 3\n";exit}
31 "urxvt"
32}
33expect {
34 timeout {puts "TESTING ERROR 4\n";exit}
35 "rxvt"
36}
37expect {
38 timeout {puts "TESTING ERROR 5\n";exit}
39 "ps aux"
40}
41
42send -- "pkill xterm\r"
43sleep 1
44send -- "pkill urxvt\r"
45sleep 1
46send -- "pkill rxvt\r"
47sleep 1
48send -- "exit\r"
49sleep 2
50
51
52send -- "firejail --private-dev\r"
53expect {
54 timeout {puts "TESTING ERROR 10\n";exit}
55 "Child process initialized"
56}
57sleep 2
58send -- "xterm &\r"
59sleep 2
60send -- "urxvt &\r"
61sleep 2
62send -- "rxvt &\r"
63sleep 2
64
65send -- "ps aux\r"
66expect {
67 timeout {puts "TESTING ERROR 11\n";exit}
68 "USER"
69}
70expect {
71 timeout {puts "TESTING ERROR 12\n";exit}
72 "xterm"
73}
74expect {
75 timeout {puts "TESTING ERROR 13\n";exit}
76 "urxvt"
77}
78expect {
79 timeout {puts "TESTING ERROR 14\n";exit}
80 "rxvt"
81}
82expect {
83 timeout {puts "TESTING ERROR 15\n";exit}
84 "ps aux"
85}
86
87send -- "pkill xterm\r"
88sleep 1
89send -- "pkill urxvt\r"
90sleep 1
91send -- "pkill rxvt\r"
92sleep 1
93send -- "exit\r"
94sleep 2
95
96puts "\n"
97