aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-04-20 09:28:42 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-04-20 09:28:42 -0400
commit3fe1b06a36cefc497e957b603d1a5231ba7fbc02 (patch)
tree7fcb14ff2fc3752ea1438177a6324134e5823caf /test/environment
parentmkuid: fall back to default values if no UID_MIN / GID_MIN found (diff)
downloadfirejail-3fe1b06a36cefc497e957b603d1a5231ba7fbc02.tar.gz
firejail-3fe1b06a36cefc497e957b603d1a5231ba7fbc02.tar.zst
firejail-3fe1b06a36cefc497e957b603d1a5231ba7fbc02.zip
cleanup
Diffstat (limited to 'test/environment')
-rwxr-xr-xtest/environment/csh.exp34
-rwxr-xr-xtest/environment/zsh.exp30
2 files changed, 14 insertions, 50 deletions
diff --git a/test/environment/csh.exp b/test/environment/csh.exp
index 10a278ebc..7b5ab9b33 100755
--- a/test/environment/csh.exp
+++ b/test/environment/csh.exp
@@ -1,49 +1,31 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2018 Firejail Authors
4# License GPL v2
5 2
6set timeout 10 3set timeout 10
4cd /home
7spawn $env(SHELL) 5spawn $env(SHELL)
8match_max 100000 6match_max 100000
9 7
10send -- "firejail --private --tracelog --csh\r" 8send -- "firejail --private --shell=/bin/csh\r"
11expect { 9expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 11 "Child process initialized"
14} 12}
15sleep 1 13sleep 1
16 14
17send -- "find ~\r" 15send -- "env | grep SHELL;pwd\r"
18expect { 16expect {
19 timeout {puts "TESTING ERROR 1\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
20 ".cshrc" 18 "SHELL"
21}
22
23send -- "env | grep SHELL\r"
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "SHELL"
27} 19}
28expect { 20expect {
29 timeout {puts "TESTING ERROR 2.1\n";exit} 21 timeout {puts "TESTING ERROR 2\n";exit}
30 "/bin/csh" 22 "/bin/csh"
31} 23}
32send -- "exit\r"
33sleep 1
34
35send -- "firejail --shell=none --csh\r"
36expect { 24expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 25 timeout {puts "TESTING ERROR 3\n";exit}
38 "shell=none was already specified" 26 "home"
39}
40after 100
41
42send -- "firejail --csh --shell=none\r"
43expect {
44 timeout {puts "TESTING ERROR 4\n";exit}
45 "a shell was already specified"
46} 27}
28send -- "exit\r"
47after 100 29after 100
48 30
49puts "\n" 31puts "\nall done\n"
diff --git a/test/environment/zsh.exp b/test/environment/zsh.exp
index e7f610e98..a1b94a326 100755
--- a/test/environment/zsh.exp
+++ b/test/environment/zsh.exp
@@ -1,49 +1,31 @@
1#!/usr/bin/expect -f 1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2018 Firejail Authors
4# License GPL v2
5 2
6set timeout 10 3set timeout 10
4cd /home
7spawn $env(SHELL) 5spawn $env(SHELL)
8match_max 100000 6match_max 100000
9 7
10send -- "firejail --private --tracelog --zsh\r" 8send -- "firejail --private --shell=/bin/zsh\r"
11expect { 9expect {
12 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized" 11 "Child process initialized"
14} 12}
15sleep 1 13sleep 1
16 14
17send -- "find ~\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 ".zshrc"
21}
22
23send -- "env | grep SHELL;pwd\r" 15send -- "env | grep SHELL;pwd\r"
24expect { 16expect {
25 timeout {puts "TESTING ERROR 2\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
26 "SHELL" 18 "SHELL"
27} 19}
28expect { 20expect {
29 timeout {puts "TESTING ERROR 2.1\n";exit} 21 timeout {puts "TESTING ERROR 2\n";exit}
30 "/bin/zsh" 22 "/bin/zsh"
31} 23}
32send -- "exit\r"
33sleep 1
34
35send -- "firejail --shell=none --zsh\r"
36expect { 24expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 25 timeout {puts "TESTING ERROR 3\n";exit}
38 "shell=none was already specified" 26 "home"
39}
40after 100
41
42send -- "firejail --zsh --shell=none\r"
43expect {
44 timeout {puts "TESTING ERROR 4\n";exit}
45 "a shell was already specified"
46} 27}
28send -- "exit\r"
47after 100 29after 100
48 30
49puts "\nall done\n" 31puts "\nall done\n"