diff options
author | 2023-03-07 08:30:53 -0500 | |
---|---|---|
committer | 2023-03-07 08:30:53 -0500 | |
commit | a12601f02aecefd6fde2f227bd3536840f7f7b14 (patch) | |
tree | e35164d4ad8b63157170f355be3e0160eb6f172c /test/network/ip6_netfilter.exp | |
parent | Run make codespell (diff) | |
download | firejail-a12601f02aecefd6fde2f227bd3536840f7f7b14.tar.gz firejail-a12601f02aecefd6fde2f227bd3536840f7f7b14.tar.zst firejail-a12601f02aecefd6fde2f227bd3536840f7f7b14.zip |
testing
Diffstat (limited to 'test/network/ip6_netfilter.exp')
-rwxr-xr-x | test/network/ip6_netfilter.exp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/network/ip6_netfilter.exp b/test/network/ip6_netfilter.exp new file mode 100755 index 000000000..6c478d9e7 --- /dev/null +++ b/test/network/ip6_netfilter.exp | |||
@@ -0,0 +1,31 @@ | |||
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 default netfilter on br0 | ||
11 | send -- "firejail --name=test --net=br0 --netfilter6=ip6_netfilter.profile\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
15 | } | ||
16 | sleep 2 | ||
17 | spawn $env(SHELL) | ||
18 | |||
19 | # check default netfilter no new network | ||
20 | send -- "firejail --netfilter6.print=test\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 1\n";exit} | ||
23 | "DROP" | ||
24 | } | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "2001:db8:1f0a:3ec::2" | ||
28 | } | ||
29 | |||
30 | after 500 | ||
31 | puts "all done\n" | ||