diff options
Diffstat (limited to 'test/features/3.2.exp')
-rwxr-xr-x | test/features/3.2.exp | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/test/features/3.2.exp b/test/features/3.2.exp deleted file mode 100755 index 1fdb74a42..000000000 --- a/test/features/3.2.exp +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | # | ||
6 | # read-only | ||
7 | # | ||
8 | |||
9 | set timeout 10 | ||
10 | spawn $env(SHELL) | ||
11 | match_max 100000 | ||
12 | set overlay [lindex $argv 0] | ||
13 | set chroot [lindex $argv 1] | ||
14 | |||
15 | # | ||
16 | # N | ||
17 | # | ||
18 | send -- "rm -f ~/.config/firejail-test-file\r" | ||
19 | sleep 1 | ||
20 | send -- "firejail --noprofile --read-only=/home/netblue/.config\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 0\n";exit} | ||
23 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
24 | } | ||
25 | sleep 1 | ||
26 | |||
27 | send -- "touch ~/.config/firejail-test-file\r" | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 1\n";exit} | ||
30 | "Read-only file system" | ||
31 | } | ||
32 | after 100 | ||
33 | send -- "exit\r" | ||
34 | sleep 1 | ||
35 | |||
36 | # | ||
37 | # O | ||
38 | # | ||
39 | if { $overlay == "overlay" } { | ||
40 | send -- "firejail --noprofile --overlay --read-only=/home/netblue/.config\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 2\n";exit} | ||
43 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
45 | } | ||
46 | sleep 1 | ||
47 | |||
48 | send -- "touch ~/.config/firejail-test-file\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 3\n";exit} | ||
51 | "Read-only file system" | ||
52 | } | ||
53 | after 100 | ||
54 | send -- "exit\r" | ||
55 | sleep 1 | ||
56 | } | ||
57 | |||
58 | # | ||
59 | # C | ||
60 | # | ||
61 | if { $chroot == "chroot" } { | ||
62 | send -- "rm -f /tmp/chroot/home/netblue/.config/firejail-test-file\r" | ||
63 | sleep 1 | ||
64 | send -- "firejail --noprofile --chroot=/tmp/chroot --read-only=/home/netblue/.config\r" | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 4\n";exit} | ||
67 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
68 | } | ||
69 | sleep 1 | ||
70 | |||
71 | send -- "touch ~/.config/firejail-test-file\r" | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 5\n";exit} | ||
74 | "Read-only file system" | ||
75 | } | ||
76 | after 100 | ||
77 | send -- "exit\r" | ||
78 | sleep 1 | ||
79 | } | ||
80 | |||
81 | |||
82 | puts "\nall done\n" | ||