diff options
Diffstat (limited to 'test/features/3.7.exp')
-rwxr-xr-x | test/features/3.7.exp | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/test/features/3.7.exp b/test/features/3.7.exp deleted file mode 100755 index f7f5fa67f..000000000 --- a/test/features/3.7.exp +++ /dev/null | |||
@@ -1,95 +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 | # private-tmp | ||
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 -- "touch /tmp/test1\r" | ||
19 | sleep 1 | ||
20 | send -- "touch /tmp/test2\r" | ||
21 | sleep 1 | ||
22 | send -- "firejail --noprofile --private-tmp\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 0\n";exit} | ||
25 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
26 | } | ||
27 | sleep 1 | ||
28 | |||
29 | send -- "ls -al /tmp | wc -l\r" | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
32 | "3" | ||
33 | } | ||
34 | |||
35 | |||
36 | after 100 | ||
37 | send -- "exit\r" | ||
38 | sleep 1 | ||
39 | |||
40 | # | ||
41 | # O | ||
42 | # | ||
43 | if { $overlay == "overlay" } { | ||
44 | send -- "touch /tmp/test1\r" | ||
45 | sleep 1 | ||
46 | send -- "touch /tmp/test2\r" | ||
47 | sleep 1 | ||
48 | send -- "firejail --noprofile --overlay --private-tmp\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 2\n";exit} | ||
51 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
52 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
53 | } | ||
54 | sleep 1 | ||
55 | |||
56 | send -- "ls -al /tmp | wc -l\r" | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
59 | "3" | ||
60 | } | ||
61 | |||
62 | |||
63 | after 100 | ||
64 | send -- "exit\r" | ||
65 | sleep 1 | ||
66 | } | ||
67 | |||
68 | # | ||
69 | # C | ||
70 | # | ||
71 | if { $chroot == "chroot" } { | ||
72 | send -- "touch /tmp/test1\r" | ||
73 | sleep 1 | ||
74 | send -- "touch /tmp/test2\r" | ||
75 | sleep 1 | ||
76 | send -- "firejail --noprofile --chroot=/tmp/chroot --private-tmp\r" | ||
77 | expect { | ||
78 | timeout {puts "TESTING ERROR 4\n";exit} | ||
79 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
80 | } | ||
81 | sleep 1 | ||
82 | |||
83 | send -- "ls -al /tmp | wc -l\r" | ||
84 | expect { | ||
85 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
86 | "3" | ||
87 | } | ||
88 | |||
89 | after 100 | ||
90 | send -- "exit\r" | ||
91 | sleep 1 | ||
92 | } | ||
93 | |||
94 | |||
95 | puts "\nall done\n" | ||