aboutsummaryrefslogtreecommitdiffstats
path: root/test/ssh/login.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/ssh/login.exp')
-rwxr-xr-xtest/ssh/login.exp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/ssh/login.exp b/test/ssh/login.exp
new file mode 100755
index 000000000..479292c91
--- /dev/null
+++ b/test/ssh/login.exp
@@ -0,0 +1,49 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "ssh firejail-test@0\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized" {puts "OK\n"}
11 "an existing sandbox was detected" {puts "OK\n"}
12}
13sleep 1
14
15send -- "ps aux | wc -l\r"
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "5"
19}
20after 100
21
22send -- "ls -l /home | grep drw | wc -l\r"
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 "1"
26}
27after 100
28
29send -- "cat /proc/self/status | grep Seccomp\r"
30expect {
31 timeout {puts "TESTING ERROR 3\n";exit}
32 "2"
33}
34after 100
35
36send -- "cat /proc/self/status | grep CapBnd\r"
37expect {
38 timeout {puts "TESTING ERROR 4\n";exit}
39 "0000000000000000"
40}
41after 100
42
43# preparing scp/sftp tests
44send -- "rm testfile\r"
45
46send -- "exit\r"
47sleep 1
48
49puts "\nall done\n"