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