summaryrefslogtreecommitdiffstats
path: root/test/environment
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-28 15:22:09 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-28 15:22:09 -0400
commitc4f10394ab24327b1f303cba493723def9ab99ba (patch)
tree48955affcb0827807cfdacaf496d9cabb82ab93b /test/environment
parentremoved cd home from /test/environment/* files (diff)
downloadfirejail-c4f10394ab24327b1f303cba493723def9ab99ba.tar.gz
firejail-c4f10394ab24327b1f303cba493723def9ab99ba.tar.zst
firejail-c4f10394ab24327b1f303cba493723def9ab99ba.zip
fixed make test-envirnment for running under /tmp
Diffstat (limited to 'test/environment')
-rwxr-xr-xtest/environment/csh.exp14
-rwxr-xr-xtest/environment/rlimit-profile.exp8
-rwxr-xr-xtest/environment/zsh.exp14
3 files changed, 8 insertions, 28 deletions
diff --git a/test/environment/csh.exp b/test/environment/csh.exp
index 6511214c0..2f1ae17b9 100755
--- a/test/environment/csh.exp
+++ b/test/environment/csh.exp
@@ -4,7 +4,6 @@
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7#cd /home
8spawn $env(SHELL) 7spawn $env(SHELL)
9match_max 100000 8match_max 100000
10 9
@@ -15,16 +14,13 @@ expect {
15} 14}
16sleep 1 15sleep 1
17 16
18send -- "ls -al;pwd\r" 17send -- "find /home\r"
19expect { 18expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
21 ".cshrc" 20 ".cshrc"
22} 21}
23expect { 22
24 timeout {puts "TESTING ERROR 1.1\n";exit} 23send -- "env | grep SHELL\r"
25 "home"
26}
27send -- "env | grep SHELL;pwd\r"
28expect { 24expect {
29 timeout {puts "TESTING ERROR 2\n";exit} 25 timeout {puts "TESTING ERROR 2\n";exit}
30 "SHELL" 26 "SHELL"
@@ -33,10 +29,6 @@ expect {
33 timeout {puts "TESTING ERROR 2.1\n";exit} 29 timeout {puts "TESTING ERROR 2.1\n";exit}
34 "/bin/csh" 30 "/bin/csh"
35} 31}
36expect {
37 timeout {puts "TESTING ERROR 2.2\n";exit}
38 "home"
39}
40send -- "exit\r" 32send -- "exit\r"
41sleep 1 33sleep 1
42 34
diff --git a/test/environment/rlimit-profile.exp b/test/environment/rlimit-profile.exp
index 8ed97e760..7ee828bf2 100755
--- a/test/environment/rlimit-profile.exp
+++ b/test/environment/rlimit-profile.exp
@@ -12,7 +12,7 @@ expect {
12} 12}
13sleep 1 13sleep 1
14 14
15send -- "cat /proc/self/limits; pwd\r" 15send -- "cat /proc/self/limits\r"
16expect { 16expect {
17 timeout {puts "TESTING ERROR 1.1\n";exit} 17 timeout {puts "TESTING ERROR 1.1\n";exit}
18 "Max file size 1024 1024" 18 "Max file size 1024 1024"
@@ -29,9 +29,5 @@ expect {
29 timeout {puts "TESTING ERROR 1.4\n";exit} 29 timeout {puts "TESTING ERROR 1.4\n";exit}
30 "Max pending signals 200 200" 30 "Max pending signals 200 200"
31} 31}
32expect {
33 timeout {puts "TESTING ERROR 1.5\n";exit}
34 "home"
35}
36sleep 1 32sleep 1
37puts "\n" 33puts "\nall done\n"
diff --git a/test/environment/zsh.exp b/test/environment/zsh.exp
index e625c4793..7ab7faa76 100755
--- a/test/environment/zsh.exp
+++ b/test/environment/zsh.exp
@@ -4,7 +4,6 @@
4# License GPL v2 4# License GPL v2
5 5
6set timeout 10 6set timeout 10
7#cd /home
8spawn $env(SHELL) 7spawn $env(SHELL)
9match_max 100000 8match_max 100000
10 9
@@ -15,15 +14,12 @@ expect {
15} 14}
16sleep 1 15sleep 1
17 16
18send -- "ls -al;pwd\r" 17send -- "find /home\r"
19expect { 18expect {
20 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}
21 ".zshrc" 20 ".zshrc"
22} 21}
23expect { 22
24 timeout {puts "TESTING ERROR 1.1\n";exit}
25 "home"
26}
27send -- "env | grep SHELL;pwd\r" 23send -- "env | grep SHELL;pwd\r"
28expect { 24expect {
29 timeout {puts "TESTING ERROR 2\n";exit} 25 timeout {puts "TESTING ERROR 2\n";exit}
@@ -33,12 +29,8 @@ expect {
33 timeout {puts "TESTING ERROR 2.1\n";exit} 29 timeout {puts "TESTING ERROR 2.1\n";exit}
34 "/usr/bin/zsh" 30 "/usr/bin/zsh"
35} 31}
36expect {
37 timeout {puts "TESTING ERROR 2.2\n";exit}
38 "home"
39}
40send -- "exit\r" 32send -- "exit\r"
41sleep 1 33sleep 1
42 34
43puts "\n" 35puts "\nall done\n"
44 36