diff options
Diffstat (limited to 'test/network/net_profile.exp')
-rwxr-xr-x | test/network/net_profile.exp | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/test/network/net_profile.exp b/test/network/net_profile.exp deleted file mode 100755 index d9ce166fd..000000000 --- a/test/network/net_profile.exp +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # check eth0 | ||
11 | send -- "firejail --profile=net-profile.profile\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0.0\n";exit} | ||
14 | "eth0" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
18 | "00:11:22:33:44:55" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 0.1\n";exit} | ||
22 | "10.10.20" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 0.2\n";exit} | ||
26 | "255.255.255.248" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 0.3\n";exit} | ||
30 | "UP" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 0.4\n";exit} | ||
34 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
35 | } | ||
36 | sleep 1 | ||
37 | |||
38 | send -- "ip route show\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 1\n";exit} | ||
41 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "old iproute2\n";} | ||
42 | "10.10.30.0/24 dev eth1 proto kernel scope link src 10.10.30.50" {puts "new iproute2\n";} | ||
43 | } | ||
44 | |||
45 | send -- "ip route show\r" | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 2\n";exit} | ||
48 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "old iproute2\n";} | ||
49 | "10.10.40.0/24 dev eth2 proto kernel scope link src 10.10.40.100" {puts "new iproute2\n";} | ||
50 | } | ||
51 | |||
52 | |||
53 | # check default gw | ||
54 | send -- "ip route show\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 3\n";exit} | ||
57 | "default via 10.10.20.2 dev eth0" | ||
58 | } | ||
59 | |||
60 | # check mtu | ||
61 | send -- "ip link show\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 4\n";exit} | ||
64 | "eth0" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 5\n";exit} | ||
68 | "mtu 1000" | ||
69 | } | ||
70 | expect { | ||
71 | timeout {puts "TESTING ERROR 6\n";exit} | ||
72 | "state UP" | ||
73 | } | ||
74 | |||
75 | send -- "exit\r" | ||
76 | after 100 | ||
77 | |||
78 | puts "\nall done\n" | ||