diff options
author | netblue30 <netblue30@yahoo.com> | 2017-12-06 18:06:46 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-12-06 18:06:46 -0500 |
commit | 30a15fe9d0907da202914b87111c700235319296 (patch) | |
tree | f198cc3ec1bb9b2c19e5410d952ca3951fcd0cae /test | |
parent | testing (diff) | |
download | firejail-30a15fe9d0907da202914b87111c700235319296.tar.gz firejail-30a15fe9d0907da202914b87111c700235319296.tar.zst firejail-30a15fe9d0907da202914b87111c700235319296.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/fnetfilter/copy.exp | 4 | ||||
-rw-r--r-- | test/fnetfilter/test1.net | 4 | ||||
-rwxr-xr-x | test/utils/cpu-print.exp | 16 |
3 files changed, 16 insertions, 8 deletions
diff --git a/test/fnetfilter/copy.exp b/test/fnetfilter/copy.exp index 65145ec4b..f619d503a 100755 --- a/test/fnetfilter/copy.exp +++ b/test/fnetfilter/copy.exp | |||
@@ -16,11 +16,11 @@ after 100 | |||
16 | send -- "cat outfile\r" | 16 | send -- "cat outfile\r" |
17 | expect { | 17 | expect { |
18 | timeout {puts "TESTING ERROR 1\n";exit} | 18 | timeout {puts "TESTING ERROR 1\n";exit} |
19 | "test1" | 19 | "*filter" |
20 | } | 20 | } |
21 | expect { | 21 | expect { |
22 | timeout {puts "TESTING ERROR 2\n";exit} | 22 | timeout {puts "TESTING ERROR 2\n";exit} |
23 | "*filter" | 23 | "test1" |
24 | } | 24 | } |
25 | expect { | 25 | expect { |
26 | timeout {puts "TESTING ERROR 3\n";exit} | 26 | timeout {puts "TESTING ERROR 3\n";exit} |
diff --git a/test/fnetfilter/test1.net b/test/fnetfilter/test1.net index 59bef1443..e60127373 100644 --- a/test/fnetfilter/test1.net +++ b/test/fnetfilter/test1.net | |||
@@ -1,5 +1,5 @@ | |||
1 | *filter | 1 | *filter |
2 | # test2 | 2 | # test1 |
3 | :INPUT DROP [0:0] | 3 | :INPUT DROP [0:0] |
4 | :FORWARD DROP [0:0] | 4 | :FORWARD DROP [0:0] |
5 | :OUTPUT ACCEPT [0:0] | 5 | :OUTPUT ACCEPT [0:0] |
@@ -9,7 +9,7 @@ | |||
9 | #-A INPUT -p icmp --icmp-type echo-reply -j ACCEPT | 9 | #-A INPUT -p icmp --icmp-type echo-reply -j ACCEPT |
10 | -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT | 10 | -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT |
11 | -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT | 11 | -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT |
12 | -A INPUT -p icmp --icmp-type echo-request -j ACCEPT | 12 | -A INPUT -p icmp --icmp-type echo-request -j ACCEPT |
13 | # disable STUN | 13 | # disable STUN |
14 | -A OUTPUT -p udp --dport 3478 -j DROP | 14 | -A OUTPUT -p udp --dport 3478 -j DROP |
15 | -A OUTPUT -p udp --dport 3479 -j DROP | 15 | -A OUTPUT -p udp --dport 3479 -j DROP |
diff --git a/test/utils/cpu-print.exp b/test/utils/cpu-print.exp index f639f7c9f..714745106 100755 --- a/test/utils/cpu-print.exp +++ b/test/utils/cpu-print.exp | |||
@@ -16,7 +16,11 @@ sleep 1 | |||
16 | send -- "cat /proc/self/status | grep Cpus\r" | 16 | send -- "cat /proc/self/status | grep Cpus\r" |
17 | expect { | 17 | expect { |
18 | timeout {puts "TESTING ERROR 1\n";exit} | 18 | timeout {puts "TESTING ERROR 1\n";exit} |
19 | "Cpus_allowed_list: 0" | 19 | "Cpus" |
20 | } | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 2\n";exit} | ||
23 | "_allowed_list: 0" | ||
20 | } | 24 | } |
21 | after 100 | 25 | after 100 |
22 | send -- "exit\r" | 26 | send -- "exit\r" |
@@ -25,7 +29,7 @@ sleep 1 | |||
25 | 29 | ||
26 | send -- "firejail --name=test --cpu=1\r" | 30 | send -- "firejail --name=test --cpu=1\r" |
27 | expect { | 31 | expect { |
28 | timeout {puts "TESTING ERROR 1\n";exit} | 32 | timeout {puts "TESTING ERROR 3\n";exit} |
29 | "Child process initialized" | 33 | "Child process initialized" |
30 | } | 34 | } |
31 | sleep 1 | 35 | sleep 1 |
@@ -33,8 +37,12 @@ sleep 1 | |||
33 | spawn $env(SHELL) | 37 | spawn $env(SHELL) |
34 | send -- "firejail --cpu.print=test\r" | 38 | send -- "firejail --cpu.print=test\r" |
35 | expect { | 39 | expect { |
36 | timeout {puts "TESTING ERROR 2\n";exit} | 40 | timeout {puts "TESTING ERROR 4\n";exit} |
37 | "Cpus_allowed_list: 1" | 41 | "Cpus" |
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 5\n";exit} | ||
45 | "_allowed_list: 1" | ||
38 | } | 46 | } |
39 | after 100 | 47 | after 100 |
40 | puts "\nall done\n" | 48 | puts "\nall done\n" |