aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/1.2.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/1.2.exp')
-rwxr-xr-xtest/features/1.2.exp143
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
9set timeout 10
10spawn $env(SHELL)
11match_max 100000
12set overlay [lindex $argv 0]
13set chroot [lindex $argv 1]
14
15#
16# N
17#
18send -- "firejail --noprofile\r"
19expect {
20 timeout {puts "TESTING ERROR 0\n";exit}
21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22}
23sleep 1
24
25send -- "cat /proc/mounts | grep proc --color=never\r"
26expect {
27 timeout {puts "TESTING ERROR 1.1\n";exit}
28 "proc /proc proc"
29}
30expect {
31 timeout {puts "TESTING ERROR 1.2\n";exit}
32 "proc /proc proc"
33}
34expect {
35 timeout {puts "TESTING ERROR 1.3\n";exit}
36 "proc /proc/sys proc"
37}
38expect {
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#}
46expect {
47 timeout {puts "TESTING ERROR 1.6\n";exit}
48 "/proc/irq"
49}
50expect {
51 timeout {puts "TESTING ERROR 1.7\n";exit}
52 "/proc/bus"
53}
54after 100
55send -- "exit\r"
56sleep 1
57
58
59#
60# O
61#
62if { $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#
104if { $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
143puts "\nall done\n"