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.exp99
1 files changed, 99 insertions, 0 deletions
diff --git a/test/features/2.1.exp b/test/features/2.1.exp
new file mode 100755
index 000000000..6b2b3f7f5
--- /dev/null
+++ b/test/features/2.1.exp
@@ -0,0 +1,99 @@
1#!/usr/bin/expect -f
2#
3# hostname
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#
11# N
12#
13send -- "firejail --noprofile --hostname=bingo\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 1
19
20send -- "hostname\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "bingo"
24}
25after 100
26send -- "getent hosts bingo\r"
27expect {
28 timeout {puts "TESTING ERROR 1.1\n";exit}
29 "127.0.0.1"
30}
31expect {
32 timeout {puts "TESTING ERROR 1.2\n";exit}
33 "bingo"
34}
35after 100
36send -- "exit\r"
37sleep 1
38
39
40#
41# O
42#
43send -- "firejail --noprofile --hostname=bingo --overlay\r"
44expect {
45 timeout {puts "TESTING ERROR 2\n";exit}
46 "Child process initialized"
47}
48sleep 1
49
50send -- "hostname\r"
51expect {
52 timeout {puts "TESTING ERROR 3\n";exit}
53 "bingo"
54}
55after 100
56send -- "getent hosts bingo\r"
57expect {
58 timeout {puts "TESTING ERROR 3.1\n";exit}
59 "127.0.0.1"
60}
61expect {
62 timeout {puts "TESTING ERROR 3.2\n";exit}
63 "bingo"
64}
65after 100
66send -- "exit\r"
67sleep 1
68
69#
70# C
71#
72send -- "firejail --noprofile --hostname=bingo --chroot=/tmp/chroot\r"
73expect {
74 timeout {puts "TESTING ERROR 4\n";exit}
75 "Child process initialized"
76}
77sleep 1
78
79send -- "hostname\r"
80expect {
81 timeout {puts "TESTING ERROR 5\n";exit}
82 "bingo"
83}
84after 100
85send -- "getent hosts bingo\r"
86expect {
87 timeout {puts "TESTING ERROR 5.1\n";exit}
88 "127.0.0.1"
89}
90expect {
91 timeout {puts "TESTING ERROR 5.2\n";exit}
92 "bingo"
93}
94after 100
95send -- "exit\r"
96sleep 1
97
98
99puts "\nall done\n"