aboutsummaryrefslogtreecommitdiffstats
path: root/test/profiles/profile_readonly.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-05-03 08:41:24 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-05-03 08:41:24 -0400
commit57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc (patch)
tree60f90718665a1a812b552f589bc4d85616232df1 /test/profiles/profile_readonly.exp
parentMerge branch 'master' of https://github.com/netblue30/firejail (diff)
downloadfirejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.gz
firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.zst
firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.zip
networking features testing
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"