aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2022-06-19 20:03:14 -0400
committerLibravatar netblue30 <netblue30@protonmail.com>2022-06-19 20:03:14 -0400
commitbb14c205b562f6162aadff969540a956aacc0bd1 (patch)
treeed50420fce3c562382b9a1d190031ca64c2de631 /test
parentMerge pull request #5209 from rusty-snake/shell-none-default (diff)
downloadfirejail-bb14c205b562f6162aadff969540a956aacc0bd1.tar.gz
firejail-bb14c205b562f6162aadff969540a956aacc0bd1.tar.zst
firejail-bb14c205b562f6162aadff969540a956aacc0bd1.zip
shell none set as default (6)
Diffstat (limited to 'test')
-rwxr-xr-xtest/environment/csh.exp34
-rwxr-xr-xtest/environment/dash.exp44
-rwxr-xr-xtest/environment/environment.sh27
-rwxr-xr-xtest/environment/zsh.exp34
-rwxr-xr-xtest/utils/join.exp8
5 files changed, 0 insertions, 147 deletions
diff --git a/test/environment/csh.exp b/test/environment/csh.exp
deleted file mode 100755
index 31bfbfa40..000000000
--- a/test/environment/csh.exp
+++ /dev/null
@@ -1,34 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --private --shell=/bin/csh\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16sleep 1
17
18send -- "env | grep SHELL;pwd\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "SHELL"
22}
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 "/bin/csh"
26}
27expect {
28 timeout {puts "TESTING ERROR 3\n";exit}
29 "home"
30}
31send -- "exit\r"
32after 100
33
34puts "\nall done\n"
diff --git a/test/environment/dash.exp b/test/environment/dash.exp
deleted file mode 100755
index 4dd5cac9f..000000000
--- a/test/environment/dash.exp
+++ /dev/null
@@ -1,44 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --private --tracelog --shell=/bin/dash\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16sleep 1
17
18#send -- "ls -al;pwd\r"
19#expect {
20# timeout {puts "TESTING ERROR 1\n";exit}
21# ".zshrc"
22#}
23#expect {
24# timeout {puts "TESTING ERROR 1.1\n";exit}
25# "home"
26#}
27
28send -- "env | grep SHELL;pwd\r"
29expect {
30 timeout {puts "TESTING ERROR 2\n";exit}
31 "SHELL"
32}
33expect {
34 timeout {puts "TESTING ERROR 2.1\n";exit}
35 "/bin/dash"
36}
37expect {
38 timeout {puts "TESTING ERROR 2.2\n";exit}
39 "home"
40}
41send -- "exit\r"
42after 100
43
44puts "\n"
diff --git a/test/environment/environment.sh b/test/environment/environment.sh
index 9e58fdf95..da9c170b9 100755
--- a/test/environment/environment.sh
+++ b/test/environment/environment.sh
@@ -36,33 +36,6 @@ echo "TESTING: extract command (extract_command.exp)"
36echo "TESTING: environment variables (test/environment/env.exp)" 36echo "TESTING: environment variables (test/environment/env.exp)"
37./env.exp 37./env.exp
38 38
39which dash 2>/dev/null
40if [ "$?" -eq 0 ];
41then
42 echo "TESTING: dash (test/environment/dash.exp)"
43 ./dash.exp
44else
45 echo "TESTING SKIP: dash not found"
46fi
47
48which csh 2>/dev/null
49if [ "$?" -eq 0 ];
50then
51 echo "TESTING: csh (test/environment/csh.exp)"
52 ./csh.exp
53else
54 echo "TESTING SKIP: csh not found"
55fi
56
57which zsh 2>/dev/null
58if [ "$?" -eq 0 ];
59then
60 echo "TESTING: zsh (test/environment/zsh.exp)"
61 ./zsh.exp
62else
63 echo "TESTING SKIP: zsh not found"
64fi
65
66echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)" 39echo "TESTING: firejail in firejail - single sandbox (test/environment/firejail-in-firejail.exp)"
67./firejail-in-firejail.exp 40./firejail-in-firejail.exp
68 41
diff --git a/test/environment/zsh.exp b/test/environment/zsh.exp
deleted file mode 100755
index 9f871ea54..000000000
--- a/test/environment/zsh.exp
+++ /dev/null
@@ -1,34 +0,0 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7cd /home
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --private --shell=/bin/zsh\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16sleep 1
17
18send -- "env | grep SHELL;pwd\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "SHELL"
22}
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 "/bin/zsh"
26}
27expect {
28 timeout {puts "TESTING ERROR 3\n";exit}
29 "home"
30}
31send -- "exit\r"
32after 100
33
34puts "\nall done\n"
diff --git a/test/utils/join.exp b/test/utils/join.exp
index 82decce51..d7dc0a1f9 100755
--- a/test/utils/join.exp
+++ b/test/utils/join.exp
@@ -16,14 +16,6 @@ expect {
16sleep 2 16sleep 2
17 17
18spawn $env(SHELL) 18spawn $env(SHELL)
19send -- "firejail --shell=none --join=jointesting\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "shell=none set, but no command specified"
23}
24after 100
25
26
27send -- "firejail --join=jointesting\r" 19send -- "firejail --join=jointesting\r"
28expect { 20expect {
29 timeout {puts "TESTING ERROR 2\n";exit} 21 timeout {puts "TESTING ERROR 2\n";exit}