diff options
Diffstat (limited to 'test/utils/join-profile.exp')
-rwxr-xr-x | test/utils/join-profile.exp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/utils/join-profile.exp b/test/utils/join-profile.exp new file mode 100755 index 000000000..a2078c2f6 --- /dev/null +++ b/test/utils/join-profile.exp | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | |||
8 | send -- "firejail --profile=name.profile\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 2 | ||
14 | |||
15 | spawn $env(SHELL) | ||
16 | send -- "firejail --join=jointesting\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 1\n";exit} | ||
19 | "Switching to pid" | ||
20 | } | ||
21 | sleep 1 | ||
22 | send -- "ps aux\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 2\n";exit} | ||
25 | "/bin/bash" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 3\n";exit} | ||
29 | "/bin/bash" | ||
30 | } | ||
31 | |||
32 | send -- "exit" | ||
33 | after 100 | ||
34 | |||
35 | puts "\nall done\n" | ||