aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/environment/output.exp22
-rwxr-xr-xtest/root/git.exp51
-rwxr-xr-xtest/root/root.sh3
3 files changed, 76 insertions, 0 deletions
diff --git a/test/environment/output.exp b/test/environment/output.exp
index 10c325832..d175ddae2 100755
--- a/test/environment/output.exp
+++ b/test/environment/output.exp
@@ -61,5 +61,27 @@ expect {
61} 61}
62after 100 62after 100
63send -- "rm -f logfile*\r" 63send -- "rm -f logfile*\r"
64
65
66send -- "firejail --output=../logfile -- ./output.sh\r"
67expect {
68 timeout {puts "TESTING ERROR 8\n";exit}
69 "invalid output file"
70}
71after 100
72
73send -- "firejail --output=/etc -- ./output.sh\r"
74expect {
75 timeout {puts "TESTING ERROR 9\n";exit}
76 "invalid output file"
77}
78after 100
79
80send -- "firejail --output=/etc/firejail/zoom.profile -- ./output.sh\r"
81expect {
82 timeout {puts "TESTING ERROR 10\n";exit}
83 "the output file needs to be owned by the current user"
84}
85
64after 100 86after 100
65puts "\nall done\n" 87puts "\nall done\n"
diff --git a/test/root/git.exp b/test/root/git.exp
new file mode 100755
index 000000000..c5ddeee89
--- /dev/null
+++ b/test/root/git.exp
@@ -0,0 +1,51 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7
8
9send -- "firejail --version\r"
10expect {
11 timeout {puts "TESTING ERROR 1\n";exit}
12 "git install support is disabled" { puts "TESTING: git support not available in current build\n"; exit}
13 "git install support is enabled" { puts "git support available\n"}
14}
15
16set timeout 120
17send -- "firejail --git-install\r"
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 "Cloning into"
21}
22expect {
23 timeout {puts "TESTING ERROR 3\n";exit}
24 "Configuration options"
25}
26expect {
27 timeout {puts "TESTING ERROR 4\n";exit}
28 "src/fseccomp/fseccomp default seccomp"
29}
30expect {
31 timeout {puts "TESTING ERROR 5\n";exit}
32 "Mainline git Firejail version was installed in"
33}
34after 100
35
36send -- "firejail --git-uninstall\r"
37expect {
38 timeout {puts "TESTING ERROR 6\n";exit}
39 "Cloning into"
40}
41expect {
42 timeout {puts "TESTING ERROR 7\n";exit}
43 "Configuration options"
44}
45expect {
46 timeout {puts "TESTING ERROR 8\n";exit}
47 "Firejail mainline git version uninstalled from"
48}
49after 100
50
51puts "\nall done\n"
diff --git a/test/root/root.sh b/test/root/root.sh
index 9764b3804..29c618772 100755
--- a/test/root/root.sh
+++ b/test/root/root.sh
@@ -62,6 +62,9 @@ echo "TESTING: fs whitelist mnt, opt, media (test/root/whitelist-mnt.exp)"
62echo "TESTING: join (test/root/join.exp)" 62echo "TESTING: join (test/root/join.exp)"
63./join.exp 63./join.exp
64 64
65echo "TESTING: git-install (test/root/git.exp)"
66./git.exp
67
65#******************************** 68#********************************
66# seccomp 69# seccomp
67#******************************** 70#********************************