aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.2.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-11-22 21:50:28 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-11-22 21:50:28 -0500
commit1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b (patch)
treeec8782a9924ee48266b58e342d3c11dcc971d528 /test/features/2.2.exp
parentfeature testing (diff)
downloadfirejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.tar.gz
firejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.tar.zst
firejail-1cb3f220153b733e9fe86fc0b5ed6d7dbe27670b.zip
feature testing
Diffstat (limited to 'test/features/2.2.exp')
-rwxr-xr-xtest/features/2.2.exp105
1 files changed, 105 insertions, 0 deletions
diff --git a/test/features/2.2.exp b/test/features/2.2.exp
new file mode 100755
index 000000000..7dc1e6a7d
--- /dev/null
+++ b/test/features/2.2.exp
@@ -0,0 +1,105 @@
1#!/usr/bin/expect -f
2#
3# DNS
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#
11# N
12#
13send -- "firejail --noprofile --dns=4.2.2.1\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 1
19
20send -- "dig google.com\r"
21expect {
22 timeout {puts "TESTING ERROR 1\n";exit}
23 "ANSWER SECTION"
24}
25expect {
26 timeout {puts "TESTING ERROR 1.1\n";exit}
27 "google.com"
28}
29expect {
30 timeout {puts "TESTING ERROR 1.2\n";exit}
31 "google.com"
32}
33expect {
34 timeout {puts "TESTING ERROR 1.3\n";exit}
35 "SERVER: 4.2.2.1"
36}
37after 100
38send -- "exit\r"
39sleep 1
40
41
42#
43# O
44#
45send -- "firejail --noprofile --dns=4.2.2.1 --overlay\r"
46expect {
47 timeout {puts "TESTING ERROR 2\n";exit}
48 "Child process initialized"
49}
50sleep 1
51
52send -- "dig google.com\r"
53expect {
54 timeout {puts "TESTING ERROR 3\n";exit}
55 "ANSWER SECTION"
56}
57expect {
58 timeout {puts "TESTING ERROR 3.1\n";exit}
59 "google.com"
60}
61expect {
62 timeout {puts "TESTING ERROR 3.2\n";exit}
63 "google.com"
64}
65expect {
66 timeout {puts "TESTING ERROR 3.3\n";exit}
67 "SERVER: 4.2.2.1"
68}
69after 100
70send -- "exit\r"
71sleep 1
72
73#
74# C
75#
76send -- "firejail --noprofile --dns=4.2.2.1 --chroot=/tmp/chroot\r"
77expect {
78 timeout {puts "TESTING ERROR 4\n";exit}
79 "Child process initialized"
80}
81sleep 1
82
83send -- "dig google.com\r"
84expect {
85 timeout {puts "TESTING ERROR 5\n";exit}
86 "ANSWER SECTION"
87}
88expect {
89 timeout {puts "TESTING ERROR 5.1\n";exit}
90 "google.com"
91}
92expect {
93 timeout {puts "TESTING ERROR 5.2\n";exit}
94 "google.com"
95}
96expect {
97 timeout {puts "TESTING ERROR 5.3\n";exit}
98 "SERVER: 4.2.2.1"
99}
100after 100
101send -- "exit\r"
102sleep 1
103
104
105puts "\nall done\n"