diff options
Diffstat (limited to 'test/network/net_local.exp')
-rwxr-xr-x | test/network/net_local.exp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/network/net_local.exp b/test/network/net_local.exp new file mode 100755 index 000000000..d58135785 --- /dev/null +++ b/test/network/net_local.exp | |||
@@ -0,0 +1,50 @@ | |||
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 --debug\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "Using the local network stack" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 4\n";exit} | ||
18 | "Child process initialized" | ||
19 | } | ||
20 | sleep 1 | ||
21 | send -- "exit\r" | ||
22 | sleep 1 | ||
23 | |||
24 | # check loopback | ||
25 | send -- "firejail --noprofile\r" | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 9\n";exit} | ||
28 | "Child process initialized" | ||
29 | } | ||
30 | sleep 1 | ||
31 | |||
32 | |||
33 | send -- "/sbin/ifconfig\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 5\n";exit} | ||
36 | "lo" | ||
37 | } | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 6\n";exit} | ||
40 | "127.0.0.1" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 7\n";exit} | ||
44 | "255.0.0.0" | ||
45 | } | ||
46 | send -- "exit\r" | ||
47 | after 100 | ||
48 | |||
49 | puts "all done\n" | ||
50 | |||