diff options
Diffstat (limited to 'test/filters')
-rwxr-xr-x | test/filters/filters.sh | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-su.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-umount.exp | 31 |
3 files changed, 2 insertions, 33 deletions
diff --git a/test/filters/filters.sh b/test/filters/filters.sh index 67b9f2c0d..5093c8614 100755 --- a/test/filters/filters.sh +++ b/test/filters/filters.sh | |||
@@ -45,7 +45,7 @@ echo "TESTING: seccomp chmod - seccomp lists (test/filters/seccomp-chmod.exp)" | |||
45 | echo "TESTING: seccomp chmod profile - seccomp lists (test/filters/seccomp-chmod-profile.exp)" | 45 | echo "TESTING: seccomp chmod profile - seccomp lists (test/filters/seccomp-chmod-profile.exp)" |
46 | ./seccomp-chmod-profile.exp | 46 | ./seccomp-chmod-profile.exp |
47 | 47 | ||
48 | # todo: fix pwd and add seccomp-chown.exp and seccomp-umount.exp | 48 | # todo: fix pwd and add seccomp-chown.exp |
49 | 49 | ||
50 | echo "TESTING: seccomp empty (test/filters/seccomp-empty.exp)" | 50 | echo "TESTING: seccomp empty (test/filters/seccomp-empty.exp)" |
51 | ./seccomp-empty.exp | 51 | ./seccomp-empty.exp |
diff --git a/test/filters/seccomp-su.exp b/test/filters/seccomp-su.exp index 7833c69b0..3feabc20f 100755 --- a/test/filters/seccomp-su.exp +++ b/test/filters/seccomp-su.exp | |||
@@ -30,7 +30,7 @@ expect { | |||
30 | 30 | ||
31 | send -- "ping google.com\r" | 31 | send -- "ping google.com\r" |
32 | expect { | 32 | expect { |
33 | timeout {puts "TESTING ERROR 2\n";exit} | 33 | timeout {puts "TESTING ERROR 3\n";exit} |
34 | "Operation not permitted" {puts "OK\n"} | 34 | "Operation not permitted" {puts "OK\n"} |
35 | "unknown host" {puts "OK\n"} | 35 | "unknown host" {puts "OK\n"} |
36 | } | 36 | } |
diff --git a/test/filters/seccomp-umount.exp b/test/filters/seccomp-umount.exp deleted file mode 100755 index df38dba5e..000000000 --- a/test/filters/seccomp-umount.exp +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "sudo ls; sudo whoami; sudo pwd\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR: you need to root run this test as root\n";exit} | ||
13 | "root" | ||
14 | } | ||
15 | |||
16 | send -- "firejail --net=br0 --ip=10.10.20.5 --seccomp --noprofile\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 0\n";exit} | ||
19 | "Child process initialized" | ||
20 | } | ||
21 | sleep 2 | ||
22 | |||
23 | send -- "umount /proc\r" | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 1\n";exit} | ||
26 | "Bad system call" | ||
27 | } | ||
28 | |||
29 | send -- "exit\r" | ||
30 | after 100 | ||
31 | puts "\n" | ||