aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/net_profile.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/net_profile.exp')
-rwxr-xr-xtest/network/net_profile.exp78
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10# check eth0
11send -- "firejail --profile=net-profile.profile\r"
12expect {
13 timeout {puts "TESTING ERROR 0.0\n";exit}
14 "eth0"
15}
16expect {
17 timeout {puts "TESTING ERROR 0.1\n";exit}
18 "00:11:22:33:44:55"
19}
20expect {
21 timeout {puts "TESTING ERROR 0.1\n";exit}
22 "10.10.20"
23}
24expect {
25 timeout {puts "TESTING ERROR 0.2\n";exit}
26 "255.255.255.248"
27}
28expect {
29 timeout {puts "TESTING ERROR 0.3\n";exit}
30 "UP"
31}
32expect {
33 timeout {puts "TESTING ERROR 0.4\n";exit}
34 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
35}
36sleep 1
37
38send -- "ip route show\r"
39expect {
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
45send -- "ip route show\r"
46expect {
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
54send -- "ip route show\r"
55expect {
56 timeout {puts "TESTING ERROR 3\n";exit}
57 "default via 10.10.20.2 dev eth0"
58}
59
60# check mtu
61send -- "ip link show\r"
62expect {
63 timeout {puts "TESTING ERROR 4\n";exit}
64 "eth0"
65}
66expect {
67 timeout {puts "TESTING ERROR 5\n";exit}
68 "mtu 1000"
69}
70expect {
71 timeout {puts "TESTING ERROR 6\n";exit}
72 "state UP"
73}
74
75send -- "exit\r"
76after 100
77
78puts "\nall done\n"