diff options
author | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-08-08 19:12:30 -0400 |
commit | 1379851360349d6617ad32944a25ee5e2bb74fc2 (patch) | |
tree | f69b48e90708bfa3c2723d5a27ed3e024c827b43 /test/net_macvlan.exp | |
parent | delete files (diff) | |
download | firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.gz firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.tar.zst firejail-1379851360349d6617ad32944a25ee5e2bb74fc2.zip |
Baseline firejail 0.9.28
Diffstat (limited to 'test/net_macvlan.exp')
-rwxr-xr-x | test/net_macvlan.exp | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/test/net_macvlan.exp b/test/net_macvlan.exp new file mode 100755 index 000000000..20d022de9 --- /dev/null +++ b/test/net_macvlan.exp | |||
@@ -0,0 +1,88 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check the existing address | ||
8 | spawn $env(SHELL) | ||
9 | send -- "firejail --net=eth0 --ip=192.168.1.60\r" | ||
10 | expect { | ||
11 | timeout {puts "TESTING ERROR 1.1\n";puts "Please open a sandbox on 192.168.1.60\n";exit} | ||
12 | "the address 192.168.1.60 is already in use" | ||
13 | } | ||
14 | |||
15 | |||
16 | |||
17 | # grab 30 ip addresses | ||
18 | set MAXi 229 | ||
19 | set i 200 | ||
20 | while { $i <= $MAXi } { | ||
21 | spawn $env(SHELL) | ||
22 | send -- "firejail --net=eth0 --ip=192.168.1.$i\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 0\n";exit} | ||
25 | "Child process initialized" | ||
26 | } | ||
27 | incr i | ||
28 | after 100 | ||
29 | } | ||
30 | |||
31 | |||
32 | # check an existing address | ||
33 | spawn $env(SHELL) | ||
34 | send -- "firejail --net=eth0 --ip=192.168.1.200\r" | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 1\n";exit} | ||
37 | "the address 192.168.1.200 is already in use" | ||
38 | } | ||
39 | |||
40 | |||
41 | set MAXi 254 | ||
42 | set i 2 | ||
43 | while { $i <= $MAXi } { | ||
44 | spawn $env(SHELL) | ||
45 | send -- "firejail --net=eth0\r" | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 2.1\n";exit} | ||
48 | "192.168.1.60" {puts "TESTING ERROR 2.2\n";exit} | ||
49 | "192.168.1.200" {puts "TESTING ERROR 3\n";exit} | ||
50 | "192.168.1.201" {puts "TESTING ERROR 3\n";exit} | ||
51 | "192.168.1.202" {puts "TESTING ERROR 3\n";exit} | ||
52 | "192.168.1.203" {puts "TESTING ERROR 3\n";exit} | ||
53 | "192.168.1.204" {puts "TESTING ERROR 3\n";exit} | ||
54 | "192.168.1.205" {puts "TESTING ERROR 3\n";exit} | ||
55 | "192.168.1.206" {puts "TESTING ERROR 3\n";exit} | ||
56 | "192.168.1.207" {puts "TESTING ERROR 3\n";exit} | ||
57 | "192.168.1.208" {puts "TESTING ERROR 3\n";exit} | ||
58 | "192.168.1.209" {puts "TESTING ERROR 3\n";exit} | ||
59 | "192.168.1.210" {puts "TESTING ERROR 3\n";exit} | ||
60 | "192.168.1.211" {puts "TESTING ERROR 3\n";exit} | ||
61 | "192.168.1.212" {puts "TESTING ERROR 3\n";exit} | ||
62 | "192.168.1.213" {puts "TESTING ERROR 3\n";exit} | ||
63 | "192.168.1.214" {puts "TESTING ERROR 3\n";exit} | ||
64 | "192.168.1.215" {puts "TESTING ERROR 3\n";exit} | ||
65 | "192.168.1.216" {puts "TESTING ERROR 3\n";exit} | ||
66 | "192.168.1.217" {puts "TESTING ERROR 3\n";exit} | ||
67 | "192.168.1.218" {puts "TESTING ERROR 3\n";exit} | ||
68 | "192.168.1.219" {puts "TESTING ERROR 3\n";exit} | ||
69 | "192.168.1.220" {puts "TESTING ERROR 3\n";exit} | ||
70 | "192.168.1.221" {puts "TESTING ERROR 3\n";exit} | ||
71 | "192.168.1.222" {puts "TESTING ERROR 3\n";exit} | ||
72 | "192.168.1.223" {puts "TESTING ERROR 3\n";exit} | ||
73 | "192.168.1.224" {puts "TESTING ERROR 3\n";exit} | ||
74 | "192.168.1.225" {puts "TESTING ERROR 3\n";exit} | ||
75 | "192.168.1.226" {puts "TESTING ERROR 3\n";exit} | ||
76 | "192.168.1.227" {puts "TESTING ERROR 3\n";exit} | ||
77 | "192.168.1.228" {puts "TESTING ERROR 3\n";exit} | ||
78 | "192.168.1.229" {puts "TESTING ERROR 3\n";exit} | ||
79 | "Child process initialized" | ||
80 | } | ||
81 | puts "************ $i ******************\n" | ||
82 | incr i | ||
83 | after 100 | ||
84 | # sleep 1 | ||
85 | } | ||
86 | |||
87 | puts "\n" | ||
88 | |||