diff options
Diffstat (limited to 'test/fnetfilter/default.exp')
-rwxr-xr-x | test/fnetfilter/default.exp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/fnetfilter/default.exp b/test/fnetfilter/default.exp new file mode 100755 index 000000000..d7c9d91d5 --- /dev/null +++ b/test/fnetfilter/default.exp | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2017 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "rm outfile\r" | ||
11 | after 100 | ||
12 | |||
13 | send -- "fnetfilter outfile\r" | ||
14 | after 100 | ||
15 | |||
16 | send -- "cat outfile\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 1\n";exit} | ||
19 | "*filter" | ||
20 | } | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 2\n";exit} | ||
23 | "INPUT -m state --state RELATED,ESTABLISHED" | ||
24 | } | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | "disable STUN" | ||
28 | } | ||
29 | after 100 | ||
30 | |||
31 | send -- "fnetfilter test1.net,33\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 4\n";exit} | ||
34 | "invalid destination file in netfilter command" | ||
35 | } | ||
36 | after 100 | ||
37 | send -- "rm outfile\r" | ||
38 | after 100 | ||
39 | |||
40 | puts "\nall done\n" | ||