diff options
Diffstat (limited to 'test/environment/doubledash.exp')
-rwxr-xr-x | test/environment/doubledash.exp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/environment/doubledash.exp b/test/environment/doubledash.exp new file mode 100755 index 000000000..2eaa7d9ce --- /dev/null +++ b/test/environment/doubledash.exp | |||
@@ -0,0 +1,60 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail -- ls -- -testdir\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 2\n";exit} | ||
14 | "ttt" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 3\n";exit} | ||
18 | "Parent is shutting down" | ||
19 | } | ||
20 | sleep 1 | ||
21 | |||
22 | |||
23 | send -- "firejail --name=testing -- -testdir/bash\r" | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 4\n";exit} | ||
26 | "Child process initialized" | ||
27 | } | ||
28 | sleep 3 | ||
29 | |||
30 | spawn $env(SHELL) | ||
31 | send -- "firejail --join=testing -- -testdir/bash\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 5\n";exit} | ||
34 | "the first child process inside the sandbox" | ||
35 | } | ||
36 | sleep 3 | ||
37 | |||
38 | spawn $env(SHELL) | ||
39 | send -- "firejail --list;ls -d /tmp\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 6\n";exit} | ||
42 | "name=testing" | ||
43 | } | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 7\n";exit} | ||
46 | "/tmp" | ||
47 | } | ||
48 | send -- "firejail --list;ls -d /tmp\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 8 (join)\n";exit} | ||
51 | "join=testing" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 9\n";exit} | ||
55 | "/tmp" | ||
56 | } | ||
57 | |||
58 | after 100 | ||
59 | |||
60 | puts "\n" | ||