aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2017-10-30 08:42:01 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2017-10-30 08:42:01 -0400
commitd0664e2db83ce2c4815dcdb6f84d957a9a880673 (patch)
tree0cddbbc4d5d29291efe090173e5a526f225d8e17 /test
parentMerge branch 'master' of http://github.com/netblue30/firejail (diff)
downloadfirejail-d0664e2db83ce2c4815dcdb6f84d957a9a880673.tar.gz
firejail-d0664e2db83ce2c4815dcdb6f84d957a9a880673.tar.zst
firejail-d0664e2db83ce2c4815dcdb6f84d957a9a880673.zip
testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/fs/fs_dev_shm.exp9
-rwxr-xr-xtest/fs/fs_var_lock.exp8
-rwxr-xr-xtest/fs/fs_var_tmp.exp8
-rwxr-xr-xtest/fs/option_blacklist.exp3
-rwxr-xr-xtest/fs/private-lib.exp11
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}
16sleep 1 16after 100
17send -- "stty -echo\r"
17 18
18send -- "echo mytest > /dev/shm/ttt;echo done\r" 19send -- "echo mytest > /dev/shm/ttt;echo done\r"
19expect { 20expect {
@@ -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 47after 100
47sleep 1
48send -- "exit\r" 48send -- "exit\r"
49sleep 1 49sleep 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}
57sleep 1 57after 100
58send -- "stty -echo\r"
58 59
59send -- "echo mytest > /dev/shm/ttt;echo done\r" 60send -- "echo mytest > /dev/shm/ttt;echo done\r"
60expect { 61expect {
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}
16sleep 1 16after 100
17send -- "stty -echo\r"
17 18
18send -- "echo mytest > /var/lock/ttt;echo done\r" 19send -- "echo mytest > /var/lock/ttt;echo done\r"
19expect { 20expect {
@@ -44,7 +45,7 @@ expect {
44 "done" 45 "done"
45} 46}
46 47
47sleep 1 48after 100
48send -- "exit\r" 49send -- "exit\r"
49sleep 1 50sleep 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}
57sleep 1 58after 100
59send -- "stty -echo\r"
58 60
59send -- "echo mytest > /var/lock/ttt;echo done\r" 61send -- "echo mytest > /var/lock/ttt;echo done\r"
60expect { 62expect {
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}
16sleep 1 16after 100
17send -- "stty -echo\r"
17 18
18send -- "echo mytest > /var/tmp/ttt;echo done\r" 19send -- "echo mytest > /var/tmp/ttt;echo done\r"
19expect { 20expect {
@@ -44,7 +45,7 @@ expect {
44 "done" 45 "done"
45} 46}
46 47
47sleep 1 48after 100
48send -- "exit\r" 49send -- "exit\r"
49sleep 1 50sleep 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}
57sleep 1 58after 100
59send -- "stty -echo\r"
58 60
59send -- "echo mytest > /var/tmp/ttt;echo done\r" 61send -- "echo mytest > /var/tmp/ttt;echo done\r"
60expect { 62expect {
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}
15sleep 1 15after 100
16send -- "stty -echo\r"
16 17
17send -- "ls -l /var;echo done\r" 18send -- "ls -l /var;echo done\r"
18expect { 19expect {
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
6set timeout 10 7set timeout 10
7spawn $env(SHELL) 8spawn $env(SHELL)
8match_max 100000 9match_max 100000
9 10
10send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo \r" 11send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r"
11expect { 12expect {
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}
15after 100 16after 100
17send -- "stty -echo\r"
16 18
17send -- "cd /bin; find .; echo done\r" 19send -- "cd /bin; find .\; echo done\r"
18expect { 20expect {
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}
24after 100 27after 100
25 28
26send -- "cd /lib; find .; echo done\r" 29send -- "cd /lib; find .\r"
27expect { 30expect {
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}
33after 100 36after 100
34 37
35send -- "cd /usr/lib; find .; echo done\r" 38send -- "cd /usr/lib; find .\r"
36expect { 39expect {
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}