aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.2.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.2.exp')
-rwxr-xr-xtest/features/3.2.exp72
1 files changed, 72 insertions, 0 deletions
diff --git a/test/features/3.2.exp b/test/features/3.2.exp
new file mode 100755
index 000000000..f6ed01310
--- /dev/null
+++ b/test/features/3.2.exp
@@ -0,0 +1,72 @@
1#!/usr/bin/expect -f
2#
3# disable /boot
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#
11# N
12#
13send -- "rm -f ~/.config/firejail-test-file\r"
14sleep 1
15send -- "firejail --noprofile --read-only=/home/netblue/.config\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20sleep 1
21
22send -- "touch ~/.config/firejail-test-file\r"
23expect {
24 timeout {puts "TESTING ERROR 1\n";exit}
25 "Read-only file system"
26}
27after 100
28send -- "exit\r"
29sleep 1
30
31#
32# O
33#
34send -- "firejail --noprofile --overlay --read-only=/home/netblue/.config\r"
35expect {
36 timeout {puts "TESTING ERROR 2\n";exit}
37 "Child process initialized"
38}
39sleep 1
40
41send -- "touch ~/.config/firejail-test-file\r"
42expect {
43 timeout {puts "TESTING ERROR 3\n";exit}
44 "Read-only file system"
45}
46after 100
47send -- "exit\r"
48sleep 1
49
50#
51# C
52#
53send -- "rm -f /tmp/chroot/home/netblue/.config/firejail-test-file\r"
54sleep 1
55send -- "firejail --noprofile --chroot=/tmp/chroot --read-only=/home/netblue/.config\r"
56expect {
57 timeout {puts "TESTING ERROR 4\n";exit}
58 "Child process initialized"
59}
60sleep 1
61
62send -- "touch ~/.config/firejail-test-file\r"
63expect {
64 timeout {puts "TESTING ERROR 5\n";exit}
65 "Read-only file system"
66}
67after 100
68send -- "exit\r"
69sleep 1
70
71
72puts "\nall done\n"