summaryrefslogtreecommitdiffstats
path: root/test/fnetfilter/default.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/fnetfilter/default.exp')
-rwxr-xr-xtest/fnetfilter/default.exp40
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "rm outfile\r"
11after 100
12
13send -- "fnetfilter outfile\r"
14after 100
15
16send -- "cat outfile\r"
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 "*filter"
20}
21expect {
22 timeout {puts "TESTING ERROR 2\n";exit}
23 "INPUT -m state --state RELATED,ESTABLISHED"
24}
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "disable STUN"
28}
29after 100
30
31send -- "fnetfilter test1.net,33\r"
32expect {
33 timeout {puts "TESTING ERROR 4\n";exit}
34 "invalid destination file in netfilter command"
35}
36after 100
37send -- "rm outfile\r"
38after 100
39
40puts "\nall done\n"