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/fs_overlay.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/fs_overlay.exp')
-rwxr-xr-x | test/fs_overlay.exp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/test/fs_overlay.exp b/test/fs_overlay.exp new file mode 100755 index 000000000..166970a5c --- /dev/null +++ b/test/fs_overlay.exp | |||
@@ -0,0 +1,64 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "rm -f /tmp/firejail-overlay-test;pwd\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "home" | ||
11 | } | ||
12 | |||
13 | send -- "ls > /tmp/firejail-overlay-test;pwd\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 1\n";exit} | ||
16 | "home" | ||
17 | } | ||
18 | |||
19 | send -- "firejail --overlay\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 2\n";exit} | ||
22 | "Child process initialized" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
26 | send -- "echo xyzxyzxyz > /tmp/firejail-overlay-test;pwd\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 3\n";exit} | ||
29 | "home" | ||
30 | } | ||
31 | sleep 1 | ||
32 | |||
33 | send -- "cat /tmp/firejail-overlay-test;pwd\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 4\n";exit} | ||
36 | "xyzxyzxyz" | ||
37 | } | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
40 | "home" | ||
41 | } | ||
42 | sleep 1 | ||
43 | |||
44 | send -- "exit\r" | ||
45 | sleep 2 | ||
46 | |||
47 | send -- "cat /tmp/firejail-overlay-test;pwd\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 5\n";exit} | ||
50 | "xyzxyzxyz" {puts "TESTING ERROR 5.1\n";exit} | ||
51 | "home" | ||
52 | } | ||
53 | |||
54 | sleep 1 | ||
55 | send -- "rm -f /tmp/firejail-overlay-test;pwd\r" | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 0\n";exit} | ||
58 | "home" | ||
59 | } | ||
60 | |||
61 | |||
62 | sleep 1 | ||
63 | puts "\n" | ||
64 | |||