aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.1.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/2.1.exp')
-rwxr-xr-xtest/features/2.1.exp127
1 files changed, 0 insertions, 127 deletions
diff --git a/test/features/2.1.exp b/test/features/2.1.exp
deleted file mode 100755
index 8f7ddce2c..000000000
--- a/test/features/2.1.exp
+++ /dev/null
@@ -1,127 +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# hostname
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 --hostname=bingo\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 -- "hostname\r"
26expect {
27 timeout {puts "TESTING ERROR 1\n";exit}
28 "bingo"
29}
30after 100
31send -- "cat /etc/hostname\r"
32expect {
33 timeout {puts "TESTING ERROR 1.0\n";exit}
34 "bingo"
35}
36after 100
37send -- "getent hosts bingo\r"
38expect {
39 timeout {puts "TESTING ERROR 1.1\n";exit}
40 "127.0.0.1"
41}
42expect {
43 timeout {puts "TESTING ERROR 1.2\n";exit}
44 "bingo"
45}
46after 100
47send -- "exit\r"
48sleep 1
49
50
51#
52# O
53#
54if { $overlay == "overlay" } {
55 send -- "firejail --noprofile --hostname=bingo --overlay\r"
56 expect {
57 timeout {puts "TESTING ERROR 2\n";exit}
58 "overlay option is not available" {puts "grsecurity\n"; exit}
59 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
60 }
61 sleep 1
62
63 send -- "hostname\r"
64 expect {
65 timeout {puts "TESTING ERROR 3\n";exit}
66 "bingo"
67 }
68 after 100
69 send -- "cat /etc/hostname\r"
70 expect {
71 timeout {puts "TESTING ERROR 3.0\n";exit}
72 "bingo"
73 }
74 after 100
75 send -- "getent hosts bingo\r"
76 expect {
77 timeout {puts "TESTING ERROR 3.1\n";exit}
78 "127.0.0.1"
79 }
80 expect {
81 timeout {puts "TESTING ERROR 3.2\n";exit}
82 "bingo"
83 }
84 after 100
85 send -- "exit\r"
86 sleep 1
87}
88
89#
90# C
91#
92if { $chroot == "chroot" } {
93 send -- "firejail --noprofile --hostname=bingo --chroot=/tmp/chroot\r"
94 expect {
95 timeout {puts "TESTING ERROR 4\n";exit}
96 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
97 }
98 sleep 1
99
100 send -- "hostname\r"
101 expect {
102 timeout {puts "TESTING ERROR 5\n";exit}
103 "bingo"
104 }
105 after 100
106 send -- "cat /etc/hostname\r"
107 expect {
108 timeout {puts "TESTING ERROR 5.0\n";exit}
109 "bingo"
110 }
111 after 100
112 send -- "getent hosts bingo\r"
113 expect {
114 timeout {puts "TESTING ERROR 5.1\n";exit}
115 "127.0.0.1"
116 }
117 expect {
118 timeout {puts "TESTING ERROR 5.2\n";exit}
119 "bingo"
120 }
121 after 100
122 send -- "exit\r"
123 sleep 1
124}
125
126
127puts "\nall done\n"