diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
commit | 1379851360349d6617ad32944a25ee5e2bb74fc2 (patch) | |
tree | f69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/doubledash.exp | |
parent | delete files (diff) | |
download | firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip |
Baseline firejail 0.9.28
Diffstat (limited to 'test/doubledash.exp')
-rwxr-xr-x | test/doubledash.exp | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/doubledash.exp b/test/doubledash.exp new file mode 100755 index 000000000..3c8a42471 --- /dev/null +++ b/test/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;pwd\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 | "home" | ||
47 | } | ||
48 | send -- "firejail --list;pwd\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 | "home" | ||
56 | } | ||
57 | |||
58 | sleep 1 | ||
59 | |||
60 | puts "\n" | ||