diff options
author | curiosity-seeker <seeker@posteo.org> | 2016-12-15 12:58:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-15 12:58:32 +0100 |
commit | d8ee390a6ca56fde4baad57dea7572c39d595809 (patch) | |
tree | 255252b15232086e6f65203cda676859ab4117a0 /test/network/net_noip2.exp | |
parent | Update quiterss.profile (diff) | |
parent | added a 1 second delay after xpra server is started (diff) | |
download | firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.gz firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.zst firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.zip |
Merge pull request #1 from netblue30/master
Bring fork up-to-date
Diffstat (limited to 'test/network/net_noip2.exp')
-rwxr-xr-x | test/network/net_noip2.exp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/network/net_noip2.exp b/test/network/net_noip2.exp new file mode 100755 index 000000000..c86ea4900 --- /dev/null +++ b/test/network/net_noip2.exp | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # check ip address | ||
11 | send -- "firejail --noprofile --net=br1 --ip=none --defaultgw=10.10.30.78\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "eth0" {puts "TESTING ERROR 1\n";exit} | ||
15 | "Child process initialized" | ||
16 | } | ||
17 | sleep 1 | ||
18 | send -- "bash\r" | ||
19 | sleep 1 | ||
20 | |||
21 | # no default gateway configured | ||
22 | send -- "netstat -rn;echo done\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 2\n";exit} | ||
25 | "0.0.0.0" {puts "TESTING ERROR 3\n";exit} | ||
26 | "eth0" {puts "TESTING ERROR 4\n";exit} | ||
27 | "done" | ||
28 | } | ||
29 | sleep 1 | ||
30 | |||
31 | # eth0 configured | ||
32 | send -- "/sbin/ifconfig;echo done\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 5\n";exit} | ||
35 | "eth0" | ||
36 | } | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 6\n";exit} | ||
39 | "done" | ||
40 | } | ||
41 | send -- "exit\r" | ||
42 | after 100 | ||
43 | |||
44 | puts "all done\n" | ||
45 | |||