diff options
Diffstat (limited to 'test/network/net_local.exp')
-rwxr-xr-x | test/network/net_local.exp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/network/net_local.exp b/test/network/net_local.exp new file mode 100755 index 000000000..642213658 --- /dev/null +++ b/test/network/net_local.exp | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check ip address | ||
8 | send -- "firejail --noprofile --debug\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "Using the local network stack" | ||
12 | } | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 4\n";exit} | ||
15 | "Child process initialized" | ||
16 | } | ||
17 | sleep 2 | ||
18 | send -- "exit\r" | ||
19 | sleep 2 | ||
20 | |||
21 | # check loopback | ||
22 | send -- "firejail --noprofile\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 9\n";exit} | ||
25 | "Child process initialized" | ||
26 | } | ||
27 | sleep 1 | ||
28 | |||
29 | |||
30 | send -- "/sbin/ifconfig\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 5\n";exit} | ||
33 | "lo" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 6\n";exit} | ||
37 | "127.0.0.1" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 7\n";exit} | ||
41 | "255.0.0.0" | ||
42 | } | ||
43 | |||
44 | puts "all done\n" | ||
45 | |||