aboutsummaryrefslogtreecommitdiffstats
path: root/test/fnetfilter/copy.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-11-18 08:39:02 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2017-11-18 08:39:02 -0500
commitead4ec3089b97eda1b438da248caf76f169345ad (patch)
tree31bc22bcba4e6530b5f0daba3f332702efa7a4b9 /test/fnetfilter/copy.exp
parentConsistent home directory nomenclature (diff)
downloadfirejail-ead4ec3089b97eda1b438da248caf76f169345ad.tar.gz
firejail-ead4ec3089b97eda1b438da248caf76f169345ad.tar.zst
firejail-ead4ec3089b97eda1b438da248caf76f169345ad.zip
netfilter template support
Diffstat (limited to 'test/fnetfilter/copy.exp')
-rwxr-xr-xtest/fnetfilter/copy.exp52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/fnetfilter/copy.exp b/test/fnetfilter/copy.exp
new file mode 100755
index 000000000..65145ec4b
--- /dev/null
+++ b/test/fnetfilter/copy.exp
@@ -0,0 +1,52 @@
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 test1.net outfile\r"
14after 100
15
16send -- "cat outfile\r"
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 "test1"
20}
21expect {
22 timeout {puts "TESTING ERROR 2\n";exit}
23 "*filter"
24}
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "INPUT -m state --state RELATED,ESTABLISHED"
28}
29expect {
30 timeout {puts "TESTING ERROR 4\n";exit}
31 "disable STUN"
32}
33after 100
34
35send -- "fnetfilter foo outfile\r"
36expect {
37 timeout {puts "TESTING ERROR 5\n";exit}
38 "cannot open foo"
39}
40after 100
41
42send -- "fnetfilter test1.net outlocked\r"
43expect {
44 timeout {puts "TESTING ERROR 6\n";exit}
45 "cannot open outlocked"
46}
47after 100
48
49send -- "rm outfile\r"
50after 100
51
52puts "\nall done\n"