diff options
author | netblue30 <netblue30@yahoo.com> | 2017-10-30 08:42:01 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-10-30 08:42:01 -0400 |
commit | d0664e2db83ce2c4815dcdb6f84d957a9a880673 (patch) | |
tree | 0cddbbc4d5d29291efe090173e5a526f225d8e17 /test | |
parent | Merge branch 'master' of http://github.com/netblue30/firejail (diff) | |
download | firejail-d0664e2db83ce2c4815dcdb6f84d957a9a880673.tar.gz firejail-d0664e2db83ce2c4815dcdb6f84d957a9a880673.tar.zst firejail-d0664e2db83ce2c4815dcdb6f84d957a9a880673.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/fs/fs_dev_shm.exp | 9 | ||||
-rwxr-xr-x | test/fs/fs_var_lock.exp | 8 | ||||
-rwxr-xr-x | test/fs/fs_var_tmp.exp | 8 | ||||
-rwxr-xr-x | test/fs/option_blacklist.exp | 3 | ||||
-rwxr-xr-x | test/fs/private-lib.exp | 11 |
5 files changed, 24 insertions, 15 deletions
diff --git a/test/fs/fs_dev_shm.exp b/test/fs/fs_dev_shm.exp index 1d810084c..405d32396 100755 --- a/test/fs/fs_dev_shm.exp +++ b/test/fs/fs_dev_shm.exp | |||
@@ -13,7 +13,8 @@ expect { | |||
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | "Child process initialized" |
15 | } | 15 | } |
16 | sleep 1 | 16 | after 100 |
17 | send -- "stty -echo\r" | ||
17 | 18 | ||
18 | send -- "echo mytest > /dev/shm/ttt;echo done\r" | 19 | send -- "echo mytest > /dev/shm/ttt;echo done\r" |
19 | expect { | 20 | expect { |
@@ -43,8 +44,7 @@ expect { | |||
43 | "mytest" {puts "TESTING ERROR 6\n";exit} | 44 | "mytest" {puts "TESTING ERROR 6\n";exit} |
44 | "done" | 45 | "done" |
45 | } | 46 | } |
46 | 47 | after 100 | |
47 | sleep 1 | ||
48 | send -- "exit\r" | 48 | send -- "exit\r" |
49 | sleep 1 | 49 | sleep 1 |
50 | 50 | ||
@@ -54,7 +54,8 @@ expect { | |||
54 | timeout {puts "TESTING ERROR 7\n";exit} | 54 | timeout {puts "TESTING ERROR 7\n";exit} |
55 | "Child process initialized" | 55 | "Child process initialized" |
56 | } | 56 | } |
57 | sleep 1 | 57 | after 100 |
58 | send -- "stty -echo\r" | ||
58 | 59 | ||
59 | send -- "echo mytest > /dev/shm/ttt;echo done\r" | 60 | send -- "echo mytest > /dev/shm/ttt;echo done\r" |
60 | expect { | 61 | expect { |
diff --git a/test/fs/fs_var_lock.exp b/test/fs/fs_var_lock.exp index 919b75f34..63893b855 100755 --- a/test/fs/fs_var_lock.exp +++ b/test/fs/fs_var_lock.exp | |||
@@ -13,7 +13,8 @@ expect { | |||
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | "Child process initialized" |
15 | } | 15 | } |
16 | sleep 1 | 16 | after 100 |
17 | send -- "stty -echo\r" | ||
17 | 18 | ||
18 | send -- "echo mytest > /var/lock/ttt;echo done\r" | 19 | send -- "echo mytest > /var/lock/ttt;echo done\r" |
19 | expect { | 20 | expect { |
@@ -44,7 +45,7 @@ expect { | |||
44 | "done" | 45 | "done" |
45 | } | 46 | } |
46 | 47 | ||
47 | sleep 1 | 48 | after 100 |
48 | send -- "exit\r" | 49 | send -- "exit\r" |
49 | sleep 1 | 50 | sleep 1 |
50 | 51 | ||
@@ -54,7 +55,8 @@ expect { | |||
54 | timeout {puts "TESTING ERROR 7\n";exit} | 55 | timeout {puts "TESTING ERROR 7\n";exit} |
55 | "Child process initialized" | 56 | "Child process initialized" |
56 | } | 57 | } |
57 | sleep 1 | 58 | after 100 |
59 | send -- "stty -echo\r" | ||
58 | 60 | ||
59 | send -- "echo mytest > /var/lock/ttt;echo done\r" | 61 | send -- "echo mytest > /var/lock/ttt;echo done\r" |
60 | expect { | 62 | expect { |
diff --git a/test/fs/fs_var_tmp.exp b/test/fs/fs_var_tmp.exp index 50679db6d..d95bf3337 100755 --- a/test/fs/fs_var_tmp.exp +++ b/test/fs/fs_var_tmp.exp | |||
@@ -13,7 +13,8 @@ expect { | |||
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | "Child process initialized" |
15 | } | 15 | } |
16 | sleep 1 | 16 | after 100 |
17 | send -- "stty -echo\r" | ||
17 | 18 | ||
18 | send -- "echo mytest > /var/tmp/ttt;echo done\r" | 19 | send -- "echo mytest > /var/tmp/ttt;echo done\r" |
19 | expect { | 20 | expect { |
@@ -44,7 +45,7 @@ expect { | |||
44 | "done" | 45 | "done" |
45 | } | 46 | } |
46 | 47 | ||
47 | sleep 1 | 48 | after 100 |
48 | send -- "exit\r" | 49 | send -- "exit\r" |
49 | sleep 1 | 50 | sleep 1 |
50 | 51 | ||
@@ -54,7 +55,8 @@ expect { | |||
54 | timeout {puts "TESTING ERROR 7\n";exit} | 55 | timeout {puts "TESTING ERROR 7\n";exit} |
55 | "Child process initialized" | 56 | "Child process initialized" |
56 | } | 57 | } |
57 | sleep 1 | 58 | after 100 |
59 | send -- "stty -echo\r" | ||
58 | 60 | ||
59 | send -- "echo mytest > /var/tmp/ttt;echo done\r" | 61 | send -- "echo mytest > /var/tmp/ttt;echo done\r" |
60 | expect { | 62 | expect { |
diff --git a/test/fs/option_blacklist.exp b/test/fs/option_blacklist.exp index bf2a57999..317651566 100755 --- a/test/fs/option_blacklist.exp +++ b/test/fs/option_blacklist.exp | |||
@@ -12,7 +12,8 @@ expect { | |||
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | "Child process initialized" |
14 | } | 14 | } |
15 | sleep 1 | 15 | after 100 |
16 | send -- "stty -echo\r" | ||
16 | 17 | ||
17 | send -- "ls -l /var;echo done\r" | 18 | send -- "ls -l /var;echo done\r" |
18 | expect { | 19 | expect { |
diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index fd127bdb3..20d480062 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp | |||
@@ -3,27 +3,30 @@ | |||
3 | # Copyright (C) 2014-2017 Firejail Authors | 3 | # Copyright (C) 2014-2017 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | |||
6 | set timeout 10 | 7 | set timeout 10 |
7 | spawn $env(SHELL) | 8 | spawn $env(SHELL) |
8 | match_max 100000 | 9 | match_max 100000 |
9 | 10 | ||
10 | send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo \r" | 11 | send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r" |
11 | expect { | 12 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 14 | "Child process initialized" |
14 | } | 15 | } |
15 | after 100 | 16 | after 100 |
17 | send -- "stty -echo\r" | ||
16 | 18 | ||
17 | send -- "cd /bin; find .; echo done\r" | 19 | send -- "cd /bin; find .\; echo done\r" |
18 | expect { | 20 | expect { |
19 | timeout {puts "TESTING ERROR 2\n";exit} | 21 | timeout {puts "TESTING ERROR 2\n";exit} |
22 | # "grep" {puts "TESTING ERROR 3\n";exit} | ||
20 | "rm" {puts "TESTING ERROR 3\n";exit} | 23 | "rm" {puts "TESTING ERROR 3\n";exit} |
21 | "cp" {puts "TESTING ERROR 4\n";exit} | 24 | "cp" {puts "TESTING ERROR 4\n";exit} |
22 | "done" | 25 | "done" |
23 | } | 26 | } |
24 | after 100 | 27 | after 100 |
25 | 28 | ||
26 | send -- "cd /lib; find .; echo done\r" | 29 | send -- "cd /lib; find .\r" |
27 | expect { | 30 | expect { |
28 | timeout {puts "TESTING ERROR 5\n";exit} | 31 | timeout {puts "TESTING ERROR 5\n";exit} |
29 | "modules" {puts "TESTING ERROR 6\n";exit} | 32 | "modules" {puts "TESTING ERROR 6\n";exit} |
@@ -32,7 +35,7 @@ expect { | |||
32 | } | 35 | } |
33 | after 100 | 36 | after 100 |
34 | 37 | ||
35 | send -- "cd /usr/lib; find .; echo done\r" | 38 | send -- "cd /usr/lib; find .\r" |
36 | expect { | 39 | expect { |
37 | timeout {puts "TESTING ERROR 8\n";exit} | 40 | timeout {puts "TESTING ERROR 8\n";exit} |
38 | "grub" {puts "TESTING ERROR 9\n";exit} | 41 | "grub" {puts "TESTING ERROR 9\n";exit} |