diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-12 07:36:41 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-12 07:36:41 -0500 |
commit | ca79ff961cc303670f1ccb8841495ddd7f17a76b (patch) | |
tree | 51de876c47e405afec28eed5562337782265eebe /test/overlay/fs-named.exp | |
parent | testing (diff) | |
download | firejail-ca79ff961cc303670f1ccb8841495ddd7f17a76b.tar.gz firejail-ca79ff961cc303670f1ccb8841495ddd7f17a76b.tar.zst firejail-ca79ff961cc303670f1ccb8841495ddd7f17a76b.zip |
testing
Diffstat (limited to 'test/overlay/fs-named.exp')
-rwxr-xr-x | test/overlay/fs-named.exp | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/test/overlay/fs-named.exp b/test/overlay/fs-named.exp new file mode 100755 index 000000000..2ccb22bb1 --- /dev/null +++ b/test/overlay/fs-named.exp | |||
@@ -0,0 +1,66 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --overlay-named=firejail-test\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 2\n";exit} | ||
10 | "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit} | ||
11 | "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit} | ||
12 | "Child process initialized" {puts "found\n"} | ||
13 | } | ||
14 | sleep 1 | ||
15 | |||
16 | send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 3\n";exit} | ||
19 | "done" | ||
20 | } | ||
21 | after 100 | ||
22 | |||
23 | send -- "cat ~/_firejail_test_file; echo done\r" | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 4\n";exit} | ||
26 | "xyzxyzxyz" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
30 | "done" | ||
31 | } | ||
32 | after 100 | ||
33 | |||
34 | send -- "exit\r" | ||
35 | sleep 2 | ||
36 | |||
37 | send -- "cat ~/_firejail_test_file; echo done\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 5\n";exit} | ||
40 | "xyzxyzxyz" {puts "TESTING ERROR 5.1\n";exit} | ||
41 | "done" | ||
42 | } | ||
43 | after 100 | ||
44 | |||
45 | send -- "firejail --overlay-named=firejail-test\r" | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 2\n";exit} | ||
48 | "not available for kernels older than 3.18" {puts "\nTESTING: overlayfs not available\n"; exit} | ||
49 | "Error: --overlay option is not available on Grsecurity systems" {puts "\nTESTING: overlayfs not available\n"; exit} | ||
50 | "Child process initialized" {puts "found\n"} | ||
51 | } | ||
52 | sleep 1 | ||
53 | |||
54 | send -- "cat ~/_firejail_test_file; echo done\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 4\n";exit} | ||
57 | "xyzxyzxyz" | ||
58 | } | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 4.1\n";exit} | ||
61 | "done" | ||
62 | } | ||
63 | after 100 | ||
64 | |||
65 | puts "\nall done\n" | ||
66 | |||