diff options
Diffstat (limited to 'test/network/net_none.exp')
-rwxr-xr-x | test/network/net_none.exp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/test/network/net_none.exp b/test/network/net_none.exp index 54b6cb946..1c1577d76 100755 --- a/test/network/net_none.exp +++ b/test/network/net_none.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -16,20 +19,20 @@ sleep 1 | |||
16 | # test default gw | 19 | # test default gw |
17 | send -- "bash\r" | 20 | send -- "bash\r" |
18 | sleep 1 | 21 | sleep 1 |
19 | send -- "netstat -rn; pwd\r" | 22 | send -- "netstat -rn; echo done\r" |
20 | expect { | 23 | expect { |
21 | timeout {puts "TESTING ERROR 1\n";exit} | 24 | timeout {puts "TESTING ERROR 1\n";exit} |
22 | "0.0.0.0" {puts "TESTING ERROR 1.1\n";exit} | 25 | "0.0.0.0" {puts "TESTING ERROR 1.1\n";exit} |
23 | "home" | 26 | "done" |
24 | } | 27 | } |
25 | sleep 1 | 28 | sleep 1 |
26 | 29 | ||
27 | # check again devices | 30 | # check again devices |
28 | send -- "cat /proc/1/net/dev;pwd\r" | 31 | send -- "cat /proc/1/net/dev;echo done\r" |
29 | expect { | 32 | expect { |
30 | timeout {puts "TESTING ERROR 2\n";exit} | 33 | timeout {puts "TESTING ERROR 2\n";exit} |
31 | "eth0" {puts "TESTING ERROR 2.1\n";exit} | 34 | "eth0" {puts "TESTING ERROR 2.1\n";exit} |
32 | "home" | 35 | "done" |
33 | } | 36 | } |
34 | send -- "exit\r" | 37 | send -- "exit\r" |
35 | sleep 1 | 38 | sleep 1 |
@@ -48,21 +51,21 @@ sleep 1 | |||
48 | # test default gw | 51 | # test default gw |
49 | send -- "bash\r" | 52 | send -- "bash\r" |
50 | sleep 1 | 53 | sleep 1 |
51 | send -- "netstat -rn; pwd\r" | 54 | send -- "netstat -rn; echo done\r" |
52 | expect { | 55 | expect { |
53 | timeout {puts "TESTING ERROR 4\n";exit} | 56 | timeout {puts "TESTING ERROR 4\n";exit} |
54 | "0.0.0.0" {puts "TESTING ERROR 4.1\n";exit} | 57 | "0.0.0.0" {puts "TESTING ERROR 4.1\n";exit} |
55 | "home" | 58 | "done" |
56 | } | 59 | } |
57 | sleep 1 | 60 | sleep 1 |
58 | 61 | ||
59 | # check again devices | 62 | # check again devices |
60 | send -- "cat /proc/1/net/dev;pwd\r" | 63 | send -- "cat /proc/1/net/dev;echo done\r" |
61 | expect { | 64 | expect { |
62 | timeout {puts "TESTING ERROR 5\n";exit} | 65 | timeout {puts "TESTING ERROR 5\n";exit} |
63 | "eth0" {puts "TESTING ERROR 5.1\n";exit} | 66 | "eth0" {puts "TESTING ERROR 5.1\n";exit} |
64 | "home" | 67 | "done" |
65 | } | 68 | } |
66 | sleep 1 | 69 | sleep 1 |
67 | 70 | ||
68 | puts "\n" | 71 | puts "\nall done\n" |