diff options
author | netblue30 <netblue30@protonmail.com> | 2023-02-28 09:51:26 -0500 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2023-02-28 09:51:26 -0500 |
commit | 27c4d069f322fbeca07c88e0e96208233103a5db (patch) | |
tree | fb4b4fdc75eb5e633ab55b8228a60f54176446a0 /test/stress/net_macvlan.exp | |
parent | fix cppcheck/scan-build problems (diff) | |
download | firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.gz firejail-27c4d069f322fbeca07c88e0e96208233103a5db.tar.zst firejail-27c4d069f322fbeca07c88e0e96208233103a5db.zip |
chroot testing
Diffstat (limited to 'test/stress/net_macvlan.exp')
-rwxr-xr-x | test/stress/net_macvlan.exp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/test/stress/net_macvlan.exp b/test/stress/net_macvlan.exp deleted file mode 100755 index 6471979e9..000000000 --- a/test/stress/net_macvlan.exp +++ /dev/null | |||
@@ -1,51 +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 | # grab 10 ip addresses | ||
11 | set MAXi 210 | ||
12 | set i 201 | ||
13 | while { $i <= $MAXi } { | ||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --net=eth0 --ip=192.168.1.$i\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 0\n";exit} | ||
18 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
19 | } | ||
20 | incr i | ||
21 | after 100 | ||
22 | } | ||
23 | |||
24 | |||
25 | # grab 10 more | ||
26 | set MAXi 210 | ||
27 | set i 201 | ||
28 | while { $i <= $MAXi } { | ||
29 | spawn $env(SHELL) | ||
30 | send -- "firejail --net=eth0 --iprange=192.168.1.201,192.168.1.220\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 2\n";exit} | ||
33 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
34 | } | ||
35 | puts "************ $i ******************\n" | ||
36 | incr i | ||
37 | after 100 | ||
38 | } | ||
39 | |||
40 | # the next one should fail, all 20 addresses are in use | ||
41 | spawn $env(SHELL) | ||
42 | send -- "firejail --debug --net=eth0 --iprange=192.168.1.201,192.168.1.220\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "cannot assign an IP address" | ||
46 | } | ||
47 | |||
48 | |||
49 | |||
50 | after 100 | ||
51 | puts "\nall done\n" | ||