summaryrefslogtreecommitdiffstats
path: root/test/overlay/fs-named.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/overlay/fs-named.exp')
-rwxr-xr-xtest/overlay/fs-named.exp66
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
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --overlay-named=firejail-test\r"
8expect {
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}
14sleep 1
15
16send -- "echo xyzxyzxyz > ~/_firejail_test_file; echo done\r"
17expect {
18 timeout {puts "TESTING ERROR 3\n";exit}
19 "done"
20}
21after 100
22
23send -- "cat ~/_firejail_test_file; echo done\r"
24expect {
25 timeout {puts "TESTING ERROR 4\n";exit}
26 "xyzxyzxyz"
27}
28expect {
29 timeout {puts "TESTING ERROR 4.1\n";exit}
30 "done"
31}
32after 100
33
34send -- "exit\r"
35sleep 2
36
37send -- "cat ~/_firejail_test_file; echo done\r"
38expect {
39 timeout {puts "TESTING ERROR 5\n";exit}
40 "xyzxyzxyz" {puts "TESTING ERROR 5.1\n";exit}
41 "done"
42}
43after 100
44
45send -- "firejail --overlay-named=firejail-test\r"
46expect {
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}
52sleep 1
53
54send -- "cat ~/_firejail_test_file; echo done\r"
55expect {
56 timeout {puts "TESTING ERROR 4\n";exit}
57 "xyzxyzxyz"
58}
59expect {
60 timeout {puts "TESTING ERROR 4.1\n";exit}
61 "done"
62}
63after 100
64
65puts "\nall done\n"
66