aboutsummaryrefslogtreecommitdiffstats
path: root/test/overlay/fs.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-11 07:47:46 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-11 07:47:46 -0500
commita8b23c83998c7964f8898c39784ac186a0216c3f (patch)
treeeeccf98bab92b5b3818f0b30af688d736a92a599 /test/overlay/fs.exp
parenttesting (diff)
downloadfirejail-a8b23c83998c7964f8898c39784ac186a0216c3f.tar.gz
firejail-a8b23c83998c7964f8898c39784ac186a0216c3f.tar.zst
firejail-a8b23c83998c7964f8898c39784ac186a0216c3f.zip
testing
Diffstat (limited to 'test/overlay/fs.exp')
-rwxr-xr-xtest/overlay/fs.exp46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/overlay/fs.exp b/test/overlay/fs.exp
new file mode 100755
index 000000000..15ada9203
--- /dev/null
+++ b/test/overlay/fs.exp
@@ -0,0 +1,46 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --overlay\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}
43
44after 100
45puts "\nall done\n"
46