diff options
-rwxr-xr-x | test/utils/join4.exp | 38 | ||||
-rwxr-xr-x | test/utils/utils.sh | 3 |
2 files changed, 41 insertions, 0 deletions
diff --git a/test/utils/join4.exp b/test/utils/join4.exp new file mode 100755 index 000000000..c367dd770 --- /dev/null +++ b/test/utils/join4.exp | |||
@@ -0,0 +1,38 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | cd /home | ||
8 | spawn $env(SHELL) | ||
9 | match_max 100000 | ||
10 | |||
11 | send -- "firejail --name=123test\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | sleep 2 | ||
17 | |||
18 | spawn $env(SHELL) | ||
19 | send -- "firejail --join=123test\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "Switching to pid" | ||
23 | } | ||
24 | sleep 1 | ||
25 | send -- "ps aux\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 2\n";exit} | ||
28 | "/bin/bash" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 3\n";exit} | ||
32 | "/bin/bash" | ||
33 | } | ||
34 | |||
35 | send -- "exit" | ||
36 | after 100 | ||
37 | |||
38 | puts "\nall done\n" | ||
diff --git a/test/utils/utils.sh b/test/utils/utils.sh index 0428c4807..ff4e5e086 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh | |||
@@ -71,6 +71,9 @@ echo "TESTING: join2 (test/utils/join2.exp)" | |||
71 | echo "TESTING: join3 (test/utils/join3.exp)" | 71 | echo "TESTING: join3 (test/utils/join3.exp)" |
72 | ./join3.exp | 72 | ./join3.exp |
73 | 73 | ||
74 | echo "TESTING: join3 (test/utils/join4.exp)" | ||
75 | ./join4.exp | ||
76 | |||
74 | echo "TESTING: join profile (test/utils/join-profile.exp)" | 77 | echo "TESTING: join profile (test/utils/join-profile.exp)" |
75 | ./join-profile.exp | 78 | ./join-profile.exp |
76 | 79 | ||