diff options
author | 2016-05-03 08:41:24 -0400 | |
---|---|---|
committer | 2016-05-03 08:41:24 -0400 | |
commit | 57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc (patch) | |
tree | 60f90718665a1a812b552f589bc4d85616232df1 /test/bandwidth.exp | |
parent | Merge branch 'master' of https://github.com/netblue30/firejail (diff) | |
download | firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.gz firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.tar.zst firejail-57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc.zip |
networking features testing
Diffstat (limited to 'test/bandwidth.exp')
-rwxr-xr-x | test/bandwidth.exp | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/test/bandwidth.exp b/test/bandwidth.exp deleted file mode 100755 index 33b351296..000000000 --- a/test/bandwidth.exp +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=test --net=br0\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 2 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --bandwidth=test status\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1\n";exit} | ||
18 | "qdisc noqueue 0: dev eth0" | ||
19 | } | ||
20 | sleep 1 | ||
21 | |||
22 | send -- "firejail --bandwidth=test set br0 50 10\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 2\n";exit} | ||
25 | "Configuring interface eth0" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 3\n";exit} | ||
29 | "configuring tc ingress" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 4\n";exit} | ||
33 | "configuring tc egress" | ||
34 | } | ||
35 | |||
36 | send -- "firejail --bandwidth=test status\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 5\n";exit} | ||
39 | "dev eth0" | ||
40 | } | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 6\n";exit} | ||
43 | "rate 80Kbit burst 10Kb" | ||
44 | } | ||
45 | sleep 1 | ||
46 | |||
47 | send -- "firejail --bandwidth=test clear br0\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 7\n";exit} | ||
50 | "Removing bandwith limits" | ||
51 | } | ||
52 | sleep 1 | ||
53 | |||
54 | send -- "firejail --bandwidth=test status; pwd\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 8\n";exit} | ||
57 | "rate 80Kbit burst 10Kb" {puts "TESTING ERROR 9\n";exit} | ||
58 | "home" {puts "ok\n"} | ||
59 | } | ||
60 | sleep 1 | ||
61 | |||
62 | puts "\nall done\n" | ||