diff options
author | netblue30 <netblue30@yahoo.com> | 2016-05-05 10:22:18 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-05-05 10:22:18 -0400 |
commit | 37a5a3545ef6d8d03dad8bbd888f53e13274c9e5 (patch) | |
tree | 5d56a4b0a0933963d97eb0a88dd00fec9ea58bf2 | |
parent | rename generic.profile as default.profile (diff) | |
download | firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.gz firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.tar.zst firejail-37a5a3545ef6d8d03dad8bbd888f53e13274c9e5.zip |
testing
-rw-r--r-- | Makefile.in | 6 | ||||
-rwxr-xr-x | test/environment/environment.sh | 5 | ||||
-rwxr-xr-x | test/environment/quiet.exp | 21 | ||||
-rwxr-xr-x | test/fs/fs.sh | 50 | ||||
-rwxr-xr-x | test/fs/fs_dev_shm.exp (renamed from test/fs_dev_shm.exp) | 61 | ||||
-rwxr-xr-x | test/fs/fs_var_lock.exp (renamed from test/fs_var_lock.exp) | 61 | ||||
-rwxr-xr-x | test/fs/fs_var_tmp.exp (renamed from test/fs_var_tmp.exp) | 61 | ||||
-rwxr-xr-x | test/fs/invalid_filename.exp (renamed from test/invalid_filename.exp) | 24 | ||||
-rwxr-xr-x | test/fs/kmsg.exp (renamed from test/kmsg.exp) | 7 | ||||
-rwxr-xr-x | test/fs/option_bind_user.exp (renamed from test/option_bind_user.exp) | 0 | ||||
-rwxr-xr-x | test/fs/option_blacklist.exp (renamed from test/option_blacklist.exp) | 11 | ||||
-rwxr-xr-x | test/fs/option_blacklist_file.exp (renamed from test/option_blacklist_file.exp) | 4 | ||||
-rwxr-xr-x | test/fs/private-bin.exp (renamed from test/private-bin.exp) | 6 | ||||
-rw-r--r-- | test/fs/private-bin.profile (renamed from test/private-bin.profile) | 0 | ||||
-rwxr-xr-x | test/fs/private-etc.exp (renamed from test/private-etc.exp) | 3 | ||||
-rwxr-xr-x | test/fs/private-whitelist.exp (renamed from test/private-whitelist.exp) | 3 | ||||
-rwxr-xr-x | test/fs/private.exp (renamed from test/private.exp) | 41 | ||||
-rwxr-xr-x | test/fs/whitelist-empty.exp (renamed from test/whitelist-empty.exp) | 3 | ||||
-rwxr-xr-x | test/pid.exp | 49 | ||||
-rwxr-xr-x | test/quiet.exp | 17 | ||||
-rwxr-xr-x | test/test-nonet.sh | 44 | ||||
-rwxr-xr-x | test/test.sh | 112 |
22 files changed, 228 insertions, 361 deletions
diff --git a/Makefile.in b/Makefile.in index 92254fbc0..9a6044fcb 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -255,6 +255,7 @@ dist: | |||
255 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/dist-compile test/.; cd .. | 255 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/dist-compile test/.; cd .. |
256 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/filters test/.; cd .. | 256 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/filters test/.; cd .. |
257 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/network test/.; cd .. | 257 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/network test/.; cd .. |
258 | cd $(NAME)-$(VERSION); mkdir -p test; cp -a ../test/fs test/.; cd .. | ||
258 | cd $(NAME)-$(VERSION); rm -fr `find . -name .svn`; rm -fr $(NAME)-$(VERSION); cd .. | 259 | cd $(NAME)-$(VERSION); rm -fr `find . -name .svn`; rm -fr $(NAME)-$(VERSION); cd .. |
259 | tar -cjvf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION) | 260 | tar -cjvf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION) |
260 | rm -fr $(NAME)-$(VERSION) | 261 | rm -fr $(NAME)-$(VERSION) |
@@ -304,5 +305,8 @@ test-filters: | |||
304 | test-network: | 305 | test-network: |
305 | echo "Please read test/netwok/README file and run the test manually" | 306 | echo "Please read test/netwok/README file and run the test manually" |
306 | 307 | ||
307 | test: test-profiles test-utils test-environment test-apps test-apps-x11 test-filters test-network | 308 | test-fs: |
309 | cd test/fs; ./fs.sh | grep TESTING | ||
310 | |||
311 | test: test-profiles test-fs test-utils test-environment test-apps test-apps-x11 test-filters test-network | ||
308 | echo "TEST COMPLETE" | 312 | echo "TEST COMPLETE" |
diff --git a/test/environment/environment.sh b/test/environment/environment.sh index 7b29a3482..49b50797a 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh | |||
@@ -62,3 +62,8 @@ fi | |||
62 | 62 | ||
63 | echo "TESTING: nice (test/environment/nice.exp)" | 63 | echo "TESTING: nice (test/environment/nice.exp)" |
64 | ./nice.exp | 64 | ./nice.exp |
65 | |||
66 | echo "TESTING: quiet (test/environment/quiet.exp)" | ||
67 | ./quiet.exp | ||
68 | |||
69 | |||
diff --git a/test/environment/quiet.exp b/test/environment/quiet.exp new file mode 100755 index 000000000..38da4673e --- /dev/null +++ b/test/environment/quiet.exp | |||
@@ -0,0 +1,21 @@ | |||
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 4 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # check ip address | ||
11 | send -- "firejail --quiet echo done\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "Reading profile" {puts "TESTING ERROR 2\n";exit} | ||
15 | "Child process initialized" {puts "TESTING ERROR 3\n";exit} | ||
16 | "done" | ||
17 | } | ||
18 | sleep 1 | ||
19 | |||
20 | puts "\nall done\n" | ||
21 | |||
diff --git a/test/fs/fs.sh b/test/fs/fs.sh new file mode 100755 index 000000000..425af45a6 --- /dev/null +++ b/test/fs/fs.sh | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | echo "TESTING: kmsg access (test/fs/kmsg.exp)" | ||
10 | ./kmsg.exp | ||
11 | |||
12 | echo "TESTING: read/write /var/tmp (test/fs/fs_var_tmp.exp)" | ||
13 | ./fs_var_tmp.exp | ||
14 | |||
15 | echo "TESTING: read/write /var/lock (test/fs/fs_var_lock.exp)" | ||
16 | ./fs_var_lock.exp | ||
17 | |||
18 | echo "TESTING: read/write /dev/shm (test/fs/fs_dev_shm.exp)" | ||
19 | ./fs_dev_shm.exp | ||
20 | |||
21 | echo "TESTING: private (test/fs/private.exp)" | ||
22 | ./private.exp `whoami` | ||
23 | |||
24 | echo "TESTING: private-etc (test/fs/private-etc.exp)" | ||
25 | ./private-etc.exp | ||
26 | |||
27 | echo "TESTING: private-bin (test/fs/private-bin.exp)" | ||
28 | ./private-bin.exp | ||
29 | |||
30 | echo "TESTING: whitelist empty (test/fs/whitelist-empty.exp)" | ||
31 | ./whitelist-empty.exp | ||
32 | |||
33 | echo "TESTING: private whitelist (test/fs/private-whitelist.exp)" | ||
34 | echo "TESTING: (failing on OpenSUSE)" | ||
35 | ./private-whitelist.exp | ||
36 | |||
37 | echo "TESTING: invalid filename (test/fs/invalid_filename.exp)" | ||
38 | ./invalid_filename.exp | ||
39 | |||
40 | echo "TESTING: blacklist directory (test/fs/option_blacklist.exp)" | ||
41 | ./option_blacklist.exp | ||
42 | |||
43 | echo "TESTING: blacklist file (test/fs/option_blacklist_file.exp)" | ||
44 | ./option_blacklist_file.exp | ||
45 | |||
46 | echo "TESTING: bind as user (test/fs/option_bind_user.exp)" | ||
47 | ./option_bind_user.exp | ||
48 | |||
49 | |||
50 | |||
diff --git a/test/fs_dev_shm.exp b/test/fs/fs_dev_shm.exp index b54f24eb5..6d27978e2 100755 --- a/test/fs_dev_shm.exp +++ b/test/fs/fs_dev_shm.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -12,33 +15,33 @@ expect { | |||
12 | } | 15 | } |
13 | sleep 1 | 16 | sleep 1 |
14 | 17 | ||
15 | send -- "echo mytest > /dev/shm/ttt;pwd\r" | 18 | send -- "echo mytest > /dev/shm/ttt;echo done\r" |
16 | expect { | 19 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
18 | "home" | 21 | "done" |
19 | } | 22 | } |
20 | 23 | ||
21 | send -- "cat /dev/shm/ttt;pwd\r" | 24 | send -- "cat /dev/shm/ttt;echo done\r" |
22 | expect { | 25 | expect { |
23 | timeout {puts "TESTING ERROR 2.1\n";exit} | 26 | timeout {puts "TESTING ERROR 2\n";exit} |
24 | "mytest" | 27 | "mytest" |
25 | } | 28 | } |
26 | expect { | 29 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 30 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "home" | 31 | "done" |
29 | } | 32 | } |
30 | 33 | ||
31 | send -- "rm /dev/shm/ttt;pwd\r" | 34 | send -- "rm /dev/shm/ttt;echo done\r" |
32 | expect { | 35 | expect { |
33 | timeout {puts "TESTING ERROR 3\n";exit} | 36 | timeout {puts "TESTING ERROR 4\n";exit} |
34 | "home" | 37 | "done" |
35 | } | 38 | } |
36 | 39 | ||
37 | send -- "cat /dev/shm/ttt;pwd\r" | 40 | send -- "cat /dev/shm/ttt;echo done\r" |
38 | expect { | 41 | expect { |
39 | timeout {puts "TESTING ERROR 4\n";exit} | 42 | timeout {puts "TESTING ERROR 5\n";exit} |
40 | "mytest" {puts "TESTING ERROR 4.1\n";exit} | 43 | "mytest" {puts "TESTING ERROR 6\n";exit} |
41 | "home" | 44 | "done" |
42 | } | 45 | } |
43 | 46 | ||
44 | sleep 1 | 47 | sleep 1 |
@@ -48,40 +51,40 @@ sleep 1 | |||
48 | # redo the test with --private | 51 | # redo the test with --private |
49 | send -- "firejail\r" | 52 | send -- "firejail\r" |
50 | expect { | 53 | expect { |
51 | timeout {puts "TESTING ERROR 10\n";exit} | 54 | timeout {puts "TESTING ERROR 7\n";exit} |
52 | "Child process initialized" | 55 | "Child process initialized" |
53 | } | 56 | } |
54 | sleep 1 | 57 | sleep 1 |
55 | 58 | ||
56 | send -- "echo mytest > /dev/shm/ttt;pwd\r" | 59 | send -- "echo mytest > /dev/shm/ttt;echo done\r" |
57 | expect { | 60 | expect { |
58 | timeout {puts "TESTING ERROR 11\n";exit} | 61 | timeout {puts "TESTING ERROR 8\n";exit} |
59 | "home" | 62 | "done" |
60 | } | 63 | } |
61 | 64 | ||
62 | send -- "cat /dev/shm/ttt;pwd\r" | 65 | send -- "cat /dev/shm/ttt;echo done\r" |
63 | expect { | 66 | expect { |
64 | timeout {puts "TESTING ERROR 12.1\n";exit} | 67 | timeout {puts "TESTING ERROR 9\n";exit} |
65 | "mytest" | 68 | "mytest" |
66 | } | 69 | } |
67 | expect { | 70 | expect { |
68 | timeout {puts "TESTING ERROR 12\n";exit} | 71 | timeout {puts "TESTING ERROR 10\n";exit} |
69 | "home" | 72 | "done" |
70 | } | 73 | } |
71 | 74 | ||
72 | send -- "rm /dev/shm/ttt;pwd\r" | 75 | send -- "rm /dev/shm/ttt;echo done\r" |
73 | expect { | 76 | expect { |
74 | timeout {puts "TESTING ERROR 13\n";exit} | 77 | timeout {puts "TESTING ERROR 11\n";exit} |
75 | "home" | 78 | "done" |
76 | } | 79 | } |
77 | 80 | ||
78 | send -- "cat /dev/shm/ttt;pwd\r" | 81 | send -- "cat /dev/shm/ttt;echo done\r" |
79 | expect { | 82 | expect { |
80 | timeout {puts "TESTING ERROR 14\n";exit} | 83 | timeout {puts "TESTING ERROR 12\n";exit} |
81 | "mytest" {puts "TESTING ERROR 14.1\n";exit} | 84 | "mytest" {puts "TESTING ERROR 13\n";exit} |
82 | "home" | 85 | "done" |
83 | } | 86 | } |
84 | 87 | ||
85 | sleep 1 | 88 | sleep 1 |
86 | 89 | ||
87 | puts "\n" | 90 | puts "\nall done\n" |
diff --git a/test/fs_var_lock.exp b/test/fs/fs_var_lock.exp index dfcf571f4..0e2b3181a 100755 --- a/test/fs_var_lock.exp +++ b/test/fs/fs_var_lock.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -12,33 +15,33 @@ expect { | |||
12 | } | 15 | } |
13 | sleep 1 | 16 | sleep 1 |
14 | 17 | ||
15 | send -- "echo mytest > /var/lock/ttt;pwd\r" | 18 | send -- "echo mytest > /var/lock/ttt;echo done\r" |
16 | expect { | 19 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
18 | "home" | 21 | "done" |
19 | } | 22 | } |
20 | 23 | ||
21 | send -- "cat /var/lock/ttt;pwd\r" | 24 | send -- "cat /var/lock/ttt;echo done\r" |
22 | expect { | 25 | expect { |
23 | timeout {puts "TESTING ERROR 2.1\n";exit} | 26 | timeout {puts "TESTING ERROR 2\n";exit} |
24 | "mytest" | 27 | "mytest" |
25 | } | 28 | } |
26 | expect { | 29 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 30 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "home" | 31 | "done" |
29 | } | 32 | } |
30 | 33 | ||
31 | send -- "rm /var/lock/ttt;pwd\r" | 34 | send -- "rm /var/lock/ttt;echo done\r" |
32 | expect { | 35 | expect { |
33 | timeout {puts "TESTING ERROR 3\n";exit} | 36 | timeout {puts "TESTING ERROR 4\n";exit} |
34 | "home" | 37 | "done" |
35 | } | 38 | } |
36 | 39 | ||
37 | send -- "cat /var/lock/ttt;pwd\r" | 40 | send -- "cat /var/lock/ttt;echo done\r" |
38 | expect { | 41 | expect { |
39 | timeout {puts "TESTING ERROR 4\n";exit} | 42 | timeout {puts "TESTING ERROR 5\n";exit} |
40 | "mytest" {puts "TESTING ERROR 4.1\n";exit} | 43 | "mytest" {puts "TESTING ERROR 6\n";exit} |
41 | "home" | 44 | "done" |
42 | } | 45 | } |
43 | 46 | ||
44 | sleep 1 | 47 | sleep 1 |
@@ -48,40 +51,40 @@ sleep 1 | |||
48 | # redo the test with --private | 51 | # redo the test with --private |
49 | send -- "firejail\r" | 52 | send -- "firejail\r" |
50 | expect { | 53 | expect { |
51 | timeout {puts "TESTING ERROR 10\n";exit} | 54 | timeout {puts "TESTING ERROR 7\n";exit} |
52 | "Child process initialized" | 55 | "Child process initialized" |
53 | } | 56 | } |
54 | sleep 1 | 57 | sleep 1 |
55 | 58 | ||
56 | send -- "echo mytest > /var/lock/ttt;pwd\r" | 59 | send -- "echo mytest > /var/lock/ttt;echo done\r" |
57 | expect { | 60 | expect { |
58 | timeout {puts "TESTING ERROR 11\n";exit} | 61 | timeout {puts "TESTING ERROR 8\n";exit} |
59 | "home" | 62 | "done" |
60 | } | 63 | } |
61 | 64 | ||
62 | send -- "cat /var/lock/ttt;pwd\r" | 65 | send -- "cat /var/lock/ttt;echo done\r" |
63 | expect { | 66 | expect { |
64 | timeout {puts "TESTING ERROR 12.1\n";exit} | 67 | timeout {puts "TESTING ERROR 9\n";exit} |
65 | "mytest" | 68 | "mytest" |
66 | } | 69 | } |
67 | expect { | 70 | expect { |
68 | timeout {puts "TESTING ERROR 12\n";exit} | 71 | timeout {puts "TESTING ERROR 10\n";exit} |
69 | "home" | 72 | "done" |
70 | } | 73 | } |
71 | 74 | ||
72 | send -- "rm /var/lock/ttt;pwd\r" | 75 | send -- "rm /var/lock/ttt;echo done\r" |
73 | expect { | 76 | expect { |
74 | timeout {puts "TESTING ERROR 13\n";exit} | 77 | timeout {puts "TESTING ERROR 11\n";exit} |
75 | "home" | 78 | "done" |
76 | } | 79 | } |
77 | 80 | ||
78 | send -- "cat /var/lock/ttt;pwd\r" | 81 | send -- "cat /var/lock/ttt;echo done\r" |
79 | expect { | 82 | expect { |
80 | timeout {puts "TESTING ERROR 14\n";exit} | 83 | timeout {puts "TESTING ERROR 12\n";exit} |
81 | "mytest" {puts "TESTING ERROR 14.1\n";exit} | 84 | "mytest" {puts "TESTING ERROR 13\n";exit} |
82 | "home" | 85 | "done" |
83 | } | 86 | } |
84 | 87 | ||
85 | sleep 1 | 88 | sleep 1 |
86 | 89 | ||
87 | puts "\n" | 90 | puts "\nall done\n" |
diff --git a/test/fs_var_tmp.exp b/test/fs/fs_var_tmp.exp index 95ceeb2a4..811baac68 100755 --- a/test/fs_var_tmp.exp +++ b/test/fs/fs_var_tmp.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -12,33 +15,33 @@ expect { | |||
12 | } | 15 | } |
13 | sleep 1 | 16 | sleep 1 |
14 | 17 | ||
15 | send -- "echo mytest > /var/tmp/ttt;pwd\r" | 18 | send -- "echo mytest > /var/tmp/ttt;echo done\r" |
16 | expect { | 19 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
18 | "home" | 21 | "done" |
19 | } | 22 | } |
20 | 23 | ||
21 | send -- "cat /var/tmp/ttt;pwd\r" | 24 | send -- "cat /var/tmp/ttt;echo done\r" |
22 | expect { | 25 | expect { |
23 | timeout {puts "TESTING ERROR 2.1\n";exit} | 26 | timeout {puts "TESTING ERROR 2\n";exit} |
24 | "mytest" | 27 | "mytest" |
25 | } | 28 | } |
26 | expect { | 29 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 30 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "home" | 31 | "done" |
29 | } | 32 | } |
30 | 33 | ||
31 | send -- "rm /var/tmp/ttt;pwd\r" | 34 | send -- "rm /var/tmp/ttt;echo done\r" |
32 | expect { | 35 | expect { |
33 | timeout {puts "TESTING ERROR 3\n";exit} | 36 | timeout {puts "TESTING ERROR 4\n";exit} |
34 | "home" | 37 | "done" |
35 | } | 38 | } |
36 | 39 | ||
37 | send -- "cat /var/tmp/ttt;pwd\r" | 40 | send -- "cat /var/tmp/ttt;echo done\r" |
38 | expect { | 41 | expect { |
39 | timeout {puts "TESTING ERROR 4\n";exit} | 42 | timeout {puts "TESTING ERROR 5\n";exit} |
40 | "mytest" {puts "TESTING ERROR 4.1\n";exit} | 43 | "mytest" {puts "TESTING ERROR 6\n";exit} |
41 | "home" | 44 | "done" |
42 | } | 45 | } |
43 | 46 | ||
44 | sleep 1 | 47 | sleep 1 |
@@ -48,40 +51,40 @@ sleep 1 | |||
48 | # redo the test with --private | 51 | # redo the test with --private |
49 | send -- "firejail\r" | 52 | send -- "firejail\r" |
50 | expect { | 53 | expect { |
51 | timeout {puts "TESTING ERROR 10\n";exit} | 54 | timeout {puts "TESTING ERROR 7\n";exit} |
52 | "Child process initialized" | 55 | "Child process initialized" |
53 | } | 56 | } |
54 | sleep 1 | 57 | sleep 1 |
55 | 58 | ||
56 | send -- "echo mytest > /var/tmp/ttt;pwd\r" | 59 | send -- "echo mytest > /var/tmp/ttt;echo done\r" |
57 | expect { | 60 | expect { |
58 | timeout {puts "TESTING ERROR 11\n";exit} | 61 | timeout {puts "TESTING ERROR 8\n";exit} |
59 | "home" | 62 | "done" |
60 | } | 63 | } |
61 | 64 | ||
62 | send -- "cat /var/tmp/ttt;pwd\r" | 65 | send -- "cat /var/tmp/ttt;echo done\r" |
63 | expect { | 66 | expect { |
64 | timeout {puts "TESTING ERROR 12.1\n";exit} | 67 | timeout {puts "TESTING ERROR 9\n";exit} |
65 | "mytest" | 68 | "mytest" |
66 | } | 69 | } |
67 | expect { | 70 | expect { |
68 | timeout {puts "TESTING ERROR 12\n";exit} | 71 | timeout {puts "TESTING ERROR 10\n";exit} |
69 | "home" | 72 | "done" |
70 | } | 73 | } |
71 | 74 | ||
72 | send -- "rm /var/tmp/ttt;pwd\r" | 75 | send -- "rm /var/tmp/ttt;echo done\r" |
73 | expect { | 76 | expect { |
74 | timeout {puts "TESTING ERROR 13\n";exit} | 77 | timeout {puts "TESTING ERROR 11\n";exit} |
75 | "home" | 78 | "done" |
76 | } | 79 | } |
77 | 80 | ||
78 | send -- "cat /var/tmp/ttt;pwd\r" | 81 | send -- "cat /var/tmp/ttt;echo done\r" |
79 | expect { | 82 | expect { |
80 | timeout {puts "TESTING ERROR 14\n";exit} | 83 | timeout {puts "TESTING ERROR 12\n";exit} |
81 | "mytest" {puts "TESTING ERROR 14.1\n";exit} | 84 | "mytest" {puts "TESTING ERROR 13\n";exit} |
82 | "home" | 85 | "done" |
83 | } | 86 | } |
84 | 87 | ||
85 | sleep 1 | 88 | sleep 1 |
86 | 89 | ||
87 | puts "\n" | 90 | puts "\nall done\n" |
diff --git a/test/invalid_filename.exp b/test/fs/invalid_filename.exp index fe8bd8c25..1acc85491 100755 --- a/test/invalid_filename.exp +++ b/test/fs/invalid_filename.exp | |||
@@ -1,23 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | 2 | # This file is part of Firejail project | |
3 | #invalid_filename checks: | 3 | # Copyright (C) 2014-2016 Firejail Authors |
4 | # | 4 | # License GPL v2 |
5 | #--bind (two files) - profile.c - Note: The test is not implemented here, need to be root to test it | ||
6 | #--blacklist - profile.c | ||
7 | #--cgroup - cgroup.c | ||
8 | #--chroot - main.c | ||
9 | #--netfilter - netfilter.c | ||
10 | #--output - output.c | ||
11 | #--private - fs_home.c | ||
12 | #--privte-bin (list) - fs_bin.c | ||
13 | #--private-home (list) - fs_home.c | ||
14 | #--private-etc (list) - fs_etc.c | ||
15 | #--profile - main.c | ||
16 | #--read_only - profile.c | ||
17 | #--shell - main.c | ||
18 | #--tmpfs - profile.c | ||
19 | #--white-list | ||
20 | |||
21 | 5 | ||
22 | set timeout 10 | 6 | set timeout 10 |
23 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -201,7 +185,5 @@ expect { | |||
201 | } | 185 | } |
202 | after 100 | 186 | after 100 |
203 | 187 | ||
204 | |||
205 | |||
206 | puts "\nall done\n" | 188 | puts "\nall done\n" |
207 | 189 | ||
diff --git a/test/kmsg.exp b/test/fs/kmsg.exp index 096bdb708..abc711aee 100755 --- a/test/kmsg.exp +++ b/test/fs/kmsg.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -16,14 +19,14 @@ expect { | |||
16 | timeout {puts "TESTING ERROR 2\n";exit} | 19 | timeout {puts "TESTING ERROR 2\n";exit} |
17 | "Permission denied" | 20 | "Permission denied" |
18 | } | 21 | } |
19 | sleep 1 | 22 | after 100 |
20 | 23 | ||
21 | send -- "cat /proc/kmsg\r" | 24 | send -- "cat /proc/kmsg\r" |
22 | expect { | 25 | expect { |
23 | timeout {puts "TESTING ERROR 3\n";exit} | 26 | timeout {puts "TESTING ERROR 3\n";exit} |
24 | "Permission denied" | 27 | "Permission denied" |
25 | } | 28 | } |
26 | sleep 1 | 29 | after 100 |
27 | 30 | ||
28 | puts "\nall done\n" | 31 | puts "\nall done\n" |
29 | 32 | ||
diff --git a/test/option_bind_user.exp b/test/fs/option_bind_user.exp index 9d2d17d7f..9d2d17d7f 100755 --- a/test/option_bind_user.exp +++ b/test/fs/option_bind_user.exp | |||
diff --git a/test/option_blacklist.exp b/test/fs/option_blacklist.exp index b80d0cc60..38fd19237 100755 --- a/test/option_blacklist.exp +++ b/test/fs/option_blacklist.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -11,23 +14,23 @@ expect { | |||
11 | } | 14 | } |
12 | sleep 1 | 15 | sleep 1 |
13 | 16 | ||
14 | send -- "ls -l /var;pwd\r" | 17 | send -- "ls -l /var;echo done\r" |
15 | expect { | 18 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Permission denied" | 20 | "Permission denied" |
18 | } | 21 | } |
19 | expect { | 22 | expect { |
20 | timeout {puts "TESTING ERROR 2\n";exit} | 23 | timeout {puts "TESTING ERROR 2\n";exit} |
21 | "home" | 24 | "done" |
22 | } | 25 | } |
23 | send -- "cd /var;pwd\r" | 26 | send -- "cd /var;echo done\r" |
24 | expect { | 27 | expect { |
25 | timeout {puts "TESTING ERROR 3\n";exit} | 28 | timeout {puts "TESTING ERROR 3\n";exit} |
26 | "Permission denied" | 29 | "Permission denied" |
27 | } | 30 | } |
28 | expect { | 31 | expect { |
29 | timeout {puts "TESTING ERROR 4\n";exit} | 32 | timeout {puts "TESTING ERROR 4\n";exit} |
30 | "home" | 33 | "done" |
31 | } | 34 | } |
32 | sleep 1 | 35 | sleep 1 |
33 | 36 | ||
diff --git a/test/option_blacklist_file.exp b/test/fs/option_blacklist_file.exp index ecdfe3b82..846735d9e 100755 --- a/test/option_blacklist_file.exp +++ b/test/fs/option_blacklist_file.exp | |||
@@ -11,14 +11,14 @@ expect { | |||
11 | } | 11 | } |
12 | sleep 1 | 12 | sleep 1 |
13 | 13 | ||
14 | send -- "cat /etc/passwd;pwd\r" | 14 | send -- "cat /etc/passwd;echo done\r" |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Permission denied" | 17 | "Permission denied" |
18 | } | 18 | } |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 2\n";exit} | 20 | timeout {puts "TESTING ERROR 2\n";exit} |
21 | "home" | 21 | "done" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/private-bin.exp b/test/fs/private-bin.exp index a82d2b213..c19702e77 100755 --- a/test/private-bin.exp +++ b/test/fs/private-bin.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -63,9 +66,6 @@ expect { | |||
63 | } | 66 | } |
64 | send -- "exit\r" | 67 | send -- "exit\r" |
65 | 68 | ||
66 | |||
67 | |||
68 | |||
69 | sleep 1 | 69 | sleep 1 |
70 | puts "\nall done\n" | 70 | puts "\nall done\n" |
71 | 71 | ||
diff --git a/test/private-bin.profile b/test/fs/private-bin.profile index 24cf5929a..24cf5929a 100644 --- a/test/private-bin.profile +++ b/test/fs/private-bin.profile | |||
diff --git a/test/private-etc.exp b/test/fs/private-etc.exp index db1d1df3a..e5a006585 100755 --- a/test/private-etc.exp +++ b/test/fs/private-etc.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
diff --git a/test/private-whitelist.exp b/test/fs/private-whitelist.exp index 7379241ef..a3d60369a 100755 --- a/test/private-whitelist.exp +++ b/test/fs/private-whitelist.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
diff --git a/test/private.exp b/test/fs/private.exp index 80a921529..01f04d3cb 100755 --- a/test/private.exp +++ b/test/fs/private.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 10 | 6 | set timeout 10 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -23,35 +26,35 @@ sleep 1 | |||
23 | 26 | ||
24 | send -- "firejail --private --noprofile\r" | 27 | send -- "firejail --private --noprofile\r" |
25 | expect { | 28 | expect { |
26 | timeout {puts "TESTING ERROR 0\n";exit} | 29 | timeout {puts "TESTING ERROR 1\n";exit} |
27 | "Child process initialized" | 30 | "Child process initialized" |
28 | } | 31 | } |
29 | 32 | ||
30 | sleep 1 | 33 | sleep 1 |
31 | send -- "ls -al; pwd\r" | 34 | send -- "cd ~; ls -al; echo done\r" |
32 | expect { | 35 | expect { |
33 | timeout {puts "TESTING ERROR 0.1\n";exit} | 36 | timeout {puts "TESTING ERROR 2\n";exit} |
34 | ".bashrc" | 37 | ".bashrc" |
35 | } | 38 | } |
36 | expect { | 39 | expect { |
37 | timeout {puts "TESTING ERROR 0.2\n";exit} | 40 | timeout {puts "TESTING ERROR 3\n";exit} |
38 | [lindex $argv 0] | 41 | [lindex $argv 0] |
39 | } | 42 | } |
40 | send -- "ls -al; pwd\r" | 43 | send -- "ls -al; echo done\r" |
41 | expect { | 44 | expect { |
42 | timeout { | 45 | timeout { |
43 | # OpenSUSE doesn't use .Xauthority from user home directory | 46 | # OpenSUSE doesn't use .Xauthority from user done directory |
44 | send -- "env | grep XAUTHORITY\r" | 47 | send -- "env | grep XAUTHORITY\r" |
45 | 48 | ||
46 | expect { | 49 | expect { |
47 | timeout {puts "TESTING ERROR 0.3\n";exit} | 50 | timeout {puts "TESTING ERROR 4\n";exit} |
48 | "/run/lightdm/netblue/xauthority" | 51 | "/run/lightdm/netblue/xauthority" |
49 | } | 52 | } |
50 | } | 53 | } |
51 | ".Xauthority" | 54 | ".Xauthority" |
52 | } | 55 | } |
53 | expect { | 56 | expect { |
54 | timeout {puts "TESTING ERROR 0.4\n";exit} | 57 | timeout {puts "TESTING ERROR 5\n";exit} |
55 | [lindex $argv 0] | 58 | [lindex $argv 0] |
56 | } | 59 | } |
57 | 60 | ||
@@ -59,38 +62,38 @@ expect { | |||
59 | # testing private only | 62 | # testing private only |
60 | send -- "bash\r" | 63 | send -- "bash\r" |
61 | sleep 1 | 64 | sleep 1 |
62 | # owner /home/netblue | 65 | # owner /done/netblue |
63 | send -- "ls -l /home;pwd\r" | 66 | send -- "ls -l /done;echo done\r" |
64 | expect { | 67 | expect { |
65 | timeout {puts "TESTING ERROR 1\n";exit} | 68 | timeout {puts "TESTING ERROR 6\n";exit} |
66 | [lindex $argv 0] | 69 | [lindex $argv 0] |
67 | } | 70 | } |
68 | expect { | 71 | expect { |
69 | timeout {puts "TESTING ERROR 1.1\n";exit} | 72 | timeout {puts "TESTING ERROR 7\n";exit} |
70 | [lindex $argv 0] | 73 | [lindex $argv 0] |
71 | } | 74 | } |
72 | expect { | 75 | expect { |
73 | timeout {puts "TESTING ERROR 1.2\n";exit} | 76 | timeout {puts "TESTING ERROR 8\n";exit} |
74 | [lindex $argv 0] | 77 | [lindex $argv 0] |
75 | } | 78 | } |
76 | expect { | 79 | expect { |
77 | timeout {puts "TESTING ERROR 1.3\n";exit} | 80 | timeout {puts "TESTING ERROR 9\n";exit} |
78 | "home" | 81 | "done" |
79 | } | 82 | } |
80 | sleep 1 | 83 | sleep 1 |
81 | 84 | ||
82 | # owner /tmp | 85 | # owner /tmp |
83 | send -- "stat -c %U%a /tmp;pwd\r" | 86 | send -- "stat -c %U%a /tmp;echo done\r" |
84 | expect { | 87 | expect { |
85 | timeout {puts "TESTING ERROR 2\n";exit} | 88 | timeout {puts "TESTING ERROR 10\n";exit} |
86 | "root777" {puts "version 1\n";} | 89 | "root777" {puts "version 1\n";} |
87 | "root1777" {puts "version 2\n";} | 90 | "root1777" {puts "version 2\n";} |
88 | "nobody777" {puts "version 3\n";} | 91 | "nobody777" {puts "version 3\n";} |
89 | "nobody1777" {puts "version 4\n";} | 92 | "nobody1777" {puts "version 4\n";} |
90 | } | 93 | } |
91 | expect { | 94 | expect { |
92 | timeout {puts "TESTING ERROR 2.1\n";exit} | 95 | timeout {puts "TESTING ERROR 11\n";exit} |
93 | "home" | 96 | "done" |
94 | } | 97 | } |
95 | sleep 1 | 98 | sleep 1 |
96 | 99 | ||
diff --git a/test/whitelist-empty.exp b/test/fs/whitelist-empty.exp index 226b019db..f44d4fb58 100755 --- a/test/whitelist-empty.exp +++ b/test/fs/whitelist-empty.exp | |||
@@ -1,4 +1,7 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 30 | 6 | set timeout 30 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
diff --git a/test/pid.exp b/test/pid.exp deleted file mode 100755 index cdeb9d5fb..000000000 --- a/test/pid.exp +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | # test processes | ||
15 | send -- "bash\r" | ||
16 | sleep 1 | ||
17 | send -- "ps aux; pwd\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "/bin/bash" | ||
21 | } | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 2\n";exit} | ||
24 | "bash" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 3\n";exit} | ||
28 | "ps aux" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 4\n";exit} | ||
32 | "home" | ||
33 | } | ||
34 | sleep 1 | ||
35 | |||
36 | |||
37 | send -- "ps aux |wc -l; pwd\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 5\n";exit} | ||
40 | "6" {puts "normal system\n"} | ||
41 | "5" {puts "grsecurity\n"} | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 6\n";exit} | ||
45 | "home" | ||
46 | } | ||
47 | sleep 1 | ||
48 | |||
49 | puts "\nall done\n" | ||
diff --git a/test/quiet.exp b/test/quiet.exp deleted file mode 100755 index fa46aebf2..000000000 --- a/test/quiet.exp +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 4 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check ip address | ||
8 | send -- "firejail --net=br0 --quiet\r" | ||
9 | expect { | ||
10 | "Child process initialized" {puts "TESTING ERROR 1\n";exit} | ||
11 | "Interface" {puts "TESTING ERROR 1\n";exit} | ||
12 | } | ||
13 | sleep 1 | ||
14 | send -- "\r" | ||
15 | |||
16 | puts "\nall done\n" | ||
17 | |||
diff --git a/test/test-nonet.sh b/test/test-nonet.sh deleted file mode 100755 index 3df8b2d4e..000000000 --- a/test/test-nonet.sh +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | echo "TESTING: version" | ||
4 | ./option_version.exp | ||
5 | |||
6 | echo "TESTING: help" | ||
7 | ./option_help.exp | ||
8 | |||
9 | echo "TESTING: man" | ||
10 | ./option_man.exp | ||
11 | |||
12 | echo "TESTING: list" | ||
13 | ./option_list.exp | ||
14 | |||
15 | echo "TESTING: PID" | ||
16 | ./pid.exp | ||
17 | |||
18 | echo "TESTING: profile no permissions" | ||
19 | ./profile_noperm.exp | ||
20 | |||
21 | echo "TESTING: profile syntax" | ||
22 | ./profile_syntax.exp | ||
23 | |||
24 | echo "TESTING: profile read-only" | ||
25 | ./profile_readonly.exp | ||
26 | |||
27 | echo "TESTING: profile tmpfs" | ||
28 | ./profile_tmpfs.exp | ||
29 | |||
30 | echo "TESTING: private" | ||
31 | ./private.exp `whoami` | ||
32 | |||
33 | echo "TESTING: read/write /var/tmp" | ||
34 | ./fs_var_tmp.exp | ||
35 | |||
36 | echo "TESTING: read/write /var/run" | ||
37 | ./fs_var_run.exp | ||
38 | |||
39 | echo "TESTING: read/write /var/lock" | ||
40 | ./fs_var_lock.exp | ||
41 | |||
42 | echo "TESTING: read/write /dev/shm" | ||
43 | ./fs_dev_shm.exp | ||
44 | |||
diff --git a/test/test.sh b/test/test.sh index 78a6adc43..c4f0afd94 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -7,38 +7,9 @@ | |||
7 | 7 | ||
8 | ./fscheck.sh | 8 | ./fscheck.sh |
9 | 9 | ||
10 | |||
11 | echo "TESTING: protocol.print (protocol-print.exp)" | ||
12 | ./protocol-print.exp | ||
13 | |||
14 | echo "TESTING: sound (sound.exp)" | ||
15 | ./sound.exp | ||
16 | |||
17 | echo "TESTING: nice (nice.exp)" | ||
18 | ./nice.exp | ||
19 | |||
20 | echo "TESTING: tty (tty.exp)" | 10 | echo "TESTING: tty (tty.exp)" |
21 | ./tty.exp | 11 | ./tty.exp |
22 | 12 | ||
23 | echo "TESTING: protocol (protocol.exp)" | ||
24 | ./protocol.exp | ||
25 | |||
26 | echo "TESTING: invalid filename (invalid_filename.exp)" | ||
27 | ./invalid_filename.exp | ||
28 | |||
29 | echo "TESTING: whitelist empty (whitelist-empty.exp)" | ||
30 | ./whitelist-empty.exp | ||
31 | |||
32 | echo "TESTING: private-etc (private-etc.exp)" | ||
33 | ./private-etc.exp | ||
34 | |||
35 | echo "TESTING: private-bin (private-bin.exp)" | ||
36 | ./private-bin.exp | ||
37 | |||
38 | echo "TESTING: private whitelist (private-whitelist.exp)" | ||
39 | echo "TESTING: failing on OpenSUSE" | ||
40 | ./private-whitelist.exp | ||
41 | |||
42 | sleep 1 | 13 | sleep 1 |
43 | rm -fr dir\ with\ space | 14 | rm -fr dir\ with\ space |
44 | mkdir dir\ with\ space | 15 | mkdir dir\ with\ space |
@@ -56,14 +27,6 @@ rm -fr auto2 | |||
56 | rm -fr auto3 | 27 | rm -fr auto3 |
57 | rm -fr auto4 | 28 | rm -fr auto4 |
58 | 29 | ||
59 | if [ -f /proc/self/uid_map ]; | ||
60 | then | ||
61 | echo "TESTING: noroot (noroot.exp)" | ||
62 | ./noroot.exp | ||
63 | else | ||
64 | echo "TESTING: user namespaces not available" | ||
65 | fi | ||
66 | |||
67 | echo "TESTING: doubledash" | 30 | echo "TESTING: doubledash" |
68 | mkdir -- -testdir | 31 | mkdir -- -testdir |
69 | touch -- -testdir/ttt | 32 | touch -- -testdir/ttt |
@@ -71,38 +34,12 @@ cp -- /bin/bash -testdir/. | |||
71 | ./doubledash.exp | 34 | ./doubledash.exp |
72 | rm -fr -- -testdir | 35 | rm -fr -- -testdir |
73 | 36 | ||
74 | echo "TESTING: trace1 (option-trace.exp)" | ||
75 | ./option-trace.exp | ||
76 | |||
77 | echo "TESTING: trace2 (trace.exp)" | ||
78 | rm -f index.html* | ||
79 | ./trace.exp | ||
80 | rm -f index.html* | ||
81 | |||
82 | echo "TESTING: extract command (extract_command.exp)" | 37 | echo "TESTING: extract command (extract_command.exp)" |
83 | ./extract_command.exp | 38 | ./extract_command.exp |
84 | 39 | ||
85 | echo "TESTING: kmsg access (kmsg.exp)" | ||
86 | ./kmsg.exp | ||
87 | |||
88 | echo "TESTING: chroot overlay (option_chroot_overlay.exp)" | 40 | echo "TESTING: chroot overlay (option_chroot_overlay.exp)" |
89 | ./option_chroot_overlay.exp | 41 | ./option_chroot_overlay.exp |
90 | 42 | ||
91 | echo "TESTING: blacklist directory (option_blacklist.exp)" | ||
92 | ./option_blacklist.exp | ||
93 | |||
94 | echo "TESTING: blacklist file (opiton_blacklist_file.exp)" | ||
95 | ./option_blacklist_file.exp | ||
96 | |||
97 | echo "TESTING: bind as user (option_bind_user.exp)" | ||
98 | ./option_bind_user.exp | ||
99 | |||
100 | if [ -d /home/bingo ]; | ||
101 | then | ||
102 | echo "TESTING: home sanitize (opiton_version.exp)" | ||
103 | ./option_version.exp | ||
104 | fi | ||
105 | |||
106 | echo "TESTING: chroot as user (fs_chroot.exp)" | 43 | echo "TESTING: chroot as user (fs_chroot.exp)" |
107 | ./fs_chroot.exp | 44 | ./fs_chroot.exp |
108 | 45 | ||
@@ -116,15 +53,9 @@ sleep 5 | |||
116 | rm -f tmpreadonly | 53 | rm -f tmpreadonly |
117 | 54 | ||
118 | 55 | ||
119 | echo "TESTING: PID (pid.exp)" | ||
120 | ./pid.exp | ||
121 | |||
122 | echo "TESTING: output (output.exp)" | 56 | echo "TESTING: output (output.exp)" |
123 | ./output.exp | 57 | ./output.exp |
124 | 58 | ||
125 | echo "TESTING: private (private.exp)" | ||
126 | ./private.exp `whoami` | ||
127 | |||
128 | echo "TESTING: private directory (private_dir.exp)" | 59 | echo "TESTING: private directory (private_dir.exp)" |
129 | rm -fr dirprivate | 60 | rm -fr dirprivate |
130 | mkdir dirprivate | 61 | mkdir dirprivate |
@@ -140,52 +71,9 @@ rm -fr dirprivate | |||
140 | echo "TESTING: overlayfs (fs_overlay.exp)" | 71 | echo "TESTING: overlayfs (fs_overlay.exp)" |
141 | ./fs_overlay.exp | 72 | ./fs_overlay.exp |
142 | 73 | ||
143 | echo "TESTING: seccomp debug (seccomp-debug.exp)" | ||
144 | ./seccomp-debug.exp | ||
145 | |||
146 | echo "TESTING: seccomp errno (seccomp-errno.exp)" | ||
147 | ./seccomp-errno.exp | ||
148 | |||
149 | echo "TESTING: seccomp su (seccomp-su.exp)" | ||
150 | ./seccomp-su.exp | ||
151 | |||
152 | echo "TESTING: seccomp ptrace (seccomp-ptrace.exp)" | ||
153 | ./seccomp-ptrace.exp | ||
154 | |||
155 | echo "TESTING: seccomp chmod - seccomp lists (seccomp-chmod.exp)" | ||
156 | ./seccomp-chmod.exp | ||
157 | |||
158 | echo "TESTING: seccomp chmod profile - seccomp lists (seccomp-chmod-profile.exp)" | ||
159 | ./seccomp-chmod-profile.exp | ||
160 | |||
161 | echo "TESTING: seccomp empty (seccomp-empty.exp)" | ||
162 | ./seccomp-empty.exp | ||
163 | |||
164 | echo "TESTING: seccomp bad empty (seccomp-bad-empty.exp)" | ||
165 | ./seccomp-bad-empty.exp | ||
166 | |||
167 | echo "TESTING: seccomp dual filter (seccomp-dualfilter.exp)" | ||
168 | ./seccomp-dualfilter.exp | ||
169 | |||
170 | echo "TESTING: read/write /var/tmp (fs_var_tmp.exp)" | ||
171 | ./fs_var_tmp.exp | ||
172 | |||
173 | echo "TESTING: read/write /var/lock (fs_var_lock.exp)" | ||
174 | ./fs_var_lock.exp | ||
175 | |||
176 | echo "TESTING: read/write /dev/shm (fs_dev_shm.exp)" | ||
177 | ./fs_dev_shm.exp | ||
178 | |||
179 | echo "TESTING: quiet (quiet.exp)" | ||
180 | ./quiet.exp | ||
181 | |||
182 | |||
183 | echo "TESTING: login SSH (login_ssh.exp)" | 74 | echo "TESTING: login SSH (login_ssh.exp)" |
184 | ./login_ssh.exp | 75 | ./login_ssh.exp |
185 | 76 | ||
186 | echo "TESTING: ARP (net_arp.exp)" | ||
187 | ./net_arp.exp | ||
188 | |||
189 | echo "TESTING: DNS (dns.exp)" | 77 | echo "TESTING: DNS (dns.exp)" |
190 | ./dns.exp | 78 | ./dns.exp |
191 | 79 | ||