diff options
author | netblue30 <netblue30@protonmail.com> | 2023-02-28 09:51:26 -0500 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2023-02-28 09:51:26 -0500 |
commit | 27c4d069f322fbeca07c88e0e96208233103a5db (patch) | |
tree | fb4b4fdc75eb5e633ab55b8228a60f54176446a0 /test/features/1.2.exp | |
parent | fix cppcheck/scan-build problems (diff) | |
download | firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip |
chroot testing
Diffstat (limited to 'test/features/1.2.exp')
-rwxr-xr-x | test/features/1.2.exp | 143 |
1 files changed, 0 insertions, 143 deletions
diff --git a/test/features/1.2.exp b/test/features/1.2.exp deleted file mode 100755 index 56750670d..000000000 --- a/test/features/1.2.exp +++ /dev/null | |||
@@ -1,143 +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 | # new /proc | ||
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 -- "firejail --noprofile\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 0\n";exit} | ||
21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | send -- "cat /proc/mounts | grep proc --color=never\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
28 | "proc /proc proc" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
32 | "proc /proc proc" | ||
33 | } | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
36 | "proc /proc/sys proc" | ||
37 | } | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
40 | "/proc/sysrq-trigger" | ||
41 | } | ||
42 | #expect { | ||
43 | # timeout {puts "TESTING ERROR 1.5\n";exit} | ||
44 | # "proc /proc/sys/kernel/hotplug" | ||
45 | #} | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 1.6\n";exit} | ||
48 | "/proc/irq" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 1.7\n";exit} | ||
52 | "/proc/bus" | ||
53 | } | ||
54 | after 100 | ||
55 | send -- "exit\r" | ||
56 | sleep 1 | ||
57 | |||
58 | |||
59 | # | ||
60 | # O | ||
61 | # | ||
62 | if { $overlay == "overlay" } { | ||
63 | send -- "firejail --noprofile --overlay\r" | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 2\n";exit} | ||
66 | "overlay option is not available" {puts "grsecurity\n"; exit} | ||
67 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} | ||
68 | } | ||
69 | sleep 1 | ||
70 | |||
71 | send -- "cat /proc/mounts | grep proc --color=never\r" | ||
72 | expect { | ||
73 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
74 | "proc /proc proc" | ||
75 | } | ||
76 | expect { | ||
77 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
78 | "proc /proc/sys proc" | ||
79 | } | ||
80 | expect { | ||
81 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
82 | "proc /proc/sysrq-trigger proc" | ||
83 | } | ||
84 | # expect { | ||
85 | # timeout {puts "TESTING ERROR 3.5\n";exit} | ||
86 | # "proc /proc/sys/kernel/hotplug" | ||
87 | # } | ||
88 | expect { | ||
89 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
90 | "proc /proc/irq proc" | ||
91 | } | ||
92 | expect { | ||
93 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
94 | "proc /proc/bus proc" | ||
95 | } | ||
96 | after 100 | ||
97 | send -- "exit\r" | ||
98 | sleep 1 | ||
99 | } | ||
100 | |||
101 | # | ||
102 | # C | ||
103 | # | ||
104 | if { $chroot == "chroot" } { | ||
105 | send -- "firejail --noprofile --chroot=/tmp/chroot\r" | ||
106 | expect { | ||
107 | timeout {puts "TESTING ERROR 4\n";exit} | ||
108 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
109 | } | ||
110 | sleep 1 | ||
111 | |||
112 | send -- "cat /proc/mounts | grep proc --color=never\r" | ||
113 | expect { | ||
114 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
115 | "proc /proc proc" | ||
116 | } | ||
117 | expect { | ||
118 | timeout {puts "TESTING ERROR 5.3\n";exit} | ||
119 | "proc /proc/sys proc" | ||
120 | } | ||
121 | # expect { | ||
122 | # timeout {puts "TESTING ERROR 5.4\n";exit} | ||
123 | # "proc /proc/sysrq-trigger proc" | ||
124 | # } | ||
125 | # expect { | ||
126 | # timeout {puts "TESTING ERROR 5.5\n";exit} | ||
127 | # "proc /proc/sys/kernel/hotplug" | ||
128 | # } | ||
129 | # expect { | ||
130 | # timeout {puts "TESTING ERROR 5.6\n";exit} | ||
131 | # "proc /proc/irq proc" | ||
132 | # } | ||
133 | # expect { | ||
134 | # timeout {puts "TESTING ERROR 5.7\n";exit} | ||
135 | # "proc /proc/bus proc" | ||
136 | # } | ||
137 | after 100 | ||
138 | send -- "exit\r" | ||
139 | sleep 1 | ||
140 | } | ||
141 | |||
142 | |||
143 | puts "\nall done\n" | ||