aboutsummaryrefslogtreecommitdiffstats
path: root/test/profiles/profile_readonly.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/profiles/profile_readonly.exp')
-rwxr-xr-xtest/profiles/profile_readonly.exp36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/profiles/profile_readonly.exp b/test/profiles/profile_readonly.exp
new file mode 100755
index 000000000..e8e78d6ad
--- /dev/null
+++ b/test/profiles/profile_readonly.exp
@@ -0,0 +1,36 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "mkdir /tmp/firejailtestdir\r"
8send -- "touch /tmp/firejailtestfile\r"
9sleep 1
10
11send -- "firejail --profile=readonly.profile\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized"
15}
16sleep 2
17
18send -- "ls > /tmp/firejailtestdir/ttt\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "Read-only file system"
22}
23sleep 1
24
25send -- "ls > /tmp/firejailtestfile\r"
26expect {
27 timeout {puts "TESTING ERROR 2\n";exit}
28 "Read-only file system"
29}
30send -- "exit\r"
31sleep 1
32
33send -- "rm -fr /tmp/firejailtest*\r"
34sleep 1
35
36puts "\nall done\n"