diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-28 15:22:09 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-28 15:22:09 -0400 |
commit | c4f10394ab24327b1f303cba493723def9ab99ba (patch) | |
tree | 48955affcb0827807cfdacaf496d9cabb82ab93b | |
parent | removed cd home from /test/environment/* files (diff) | |
download | firejail-c4f10394ab24327b1f303cba493723def9ab99ba.tar.gz firejail-c4f10394ab24327b1f303cba493723def9ab99ba.tar.zst firejail-c4f10394ab24327b1f303cba493723def9ab99ba.zip |
fixed make test-envirnment for running under /tmp
-rwxr-xr-x | test/environment/csh.exp | 14 | ||||
-rwxr-xr-x | test/environment/rlimit-profile.exp | 8 | ||||
-rwxr-xr-x | test/environment/zsh.exp | 14 | ||||
-rwxr-xr-x | test/profiles/profile_syntax.exp | 16 |
4 files changed, 10 insertions, 42 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 | ||
6 | set timeout 10 | 6 | set timeout 10 |
7 | #cd /home | ||
8 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
9 | match_max 100000 | 8 | match_max 100000 |
10 | 9 | ||
@@ -15,16 +14,13 @@ expect { | |||
15 | } | 14 | } |
16 | sleep 1 | 15 | sleep 1 |
17 | 16 | ||
18 | send -- "ls -al;pwd\r" | 17 | send -- "find /home\r" |
19 | expect { | 18 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | ".cshrc" | 20 | ".cshrc" |
22 | } | 21 | } |
23 | expect { | 22 | |
24 | timeout {puts "TESTING ERROR 1.1\n";exit} | 23 | send -- "env | grep SHELL\r" |
25 | "home" | ||
26 | } | ||
27 | send -- "env | grep SHELL;pwd\r" | ||
28 | expect { | 24 | expect { |
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 | } |
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
38 | "home" | ||
39 | } | ||
40 | send -- "exit\r" | 32 | send -- "exit\r" |
41 | sleep 1 | 33 | sleep 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 | } |
13 | sleep 1 | 13 | sleep 1 |
14 | 14 | ||
15 | send -- "cat /proc/self/limits; pwd\r" | 15 | send -- "cat /proc/self/limits\r" |
16 | expect { | 16 | expect { |
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 | } |
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 1.5\n";exit} | ||
34 | "home" | ||
35 | } | ||
36 | sleep 1 | 32 | sleep 1 |
37 | puts "\n" | 33 | puts "\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 | ||
6 | set timeout 10 | 6 | set timeout 10 |
7 | #cd /home | ||
8 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
9 | match_max 100000 | 8 | match_max 100000 |
10 | 9 | ||
@@ -15,15 +14,12 @@ expect { | |||
15 | } | 14 | } |
16 | sleep 1 | 15 | sleep 1 |
17 | 16 | ||
18 | send -- "ls -al;pwd\r" | 17 | send -- "find /home\r" |
19 | expect { | 18 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | ".zshrc" | 20 | ".zshrc" |
22 | } | 21 | } |
23 | expect { | 22 | |
24 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
25 | "home" | ||
26 | } | ||
27 | send -- "env | grep SHELL;pwd\r" | 23 | send -- "env | grep SHELL;pwd\r" |
28 | expect { | 24 | expect { |
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 | } |
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 2.2\n";exit} | ||
38 | "home" | ||
39 | } | ||
40 | send -- "exit\r" | 32 | send -- "exit\r" |
41 | sleep 1 | 33 | sleep 1 |
42 | 34 | ||
43 | puts "\n" | 35 | puts "\nall done\n" |
44 | 36 | ||
diff --git a/test/profiles/profile_syntax.exp b/test/profiles/profile_syntax.exp index ecad1043b..2b1ec7797 100755 --- a/test/profiles/profile_syntax.exp +++ b/test/profiles/profile_syntax.exp | |||
@@ -34,32 +34,20 @@ expect { | |||
34 | timeout {puts "TESTING ERROR 4\n";exit} | 34 | timeout {puts "TESTING ERROR 4\n";exit} |
35 | "Permission denied" | 35 | "Permission denied" |
36 | } | 36 | } |
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 5\n";exit} | ||
39 | "home" | ||
40 | } | ||
41 | 37 | ||
42 | sleep 1 | 38 | sleep 1 |
43 | send -- "mount;pwd\r" | 39 | send -- "mount\r" |
44 | expect { | 40 | expect { |
45 | timeout {puts "TESTING ERROR 6\n";exit} | 41 | timeout {puts "TESTING ERROR 6\n";exit} |
46 | "Permission denied" | 42 | "Permission denied" |
47 | } | 43 | } |
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 7\n";exit} | ||
50 | "home" | ||
51 | } | ||
52 | 44 | ||
53 | sleep 1 | 45 | sleep 1 |
54 | send -- "umount;pwd\r" | 46 | send -- "umount\r" |
55 | expect { | 47 | expect { |
56 | timeout {puts "TESTING ERROR 8\n";exit} | 48 | timeout {puts "TESTING ERROR 8\n";exit} |
57 | "Permission denied" | 49 | "Permission denied" |
58 | } | 50 | } |
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 9\n";exit} | ||
61 | "home" | ||
62 | } | ||
63 | send -- "exit\r" | 51 | send -- "exit\r" |
64 | 52 | ||
65 | sleep 1 | 53 | sleep 1 |