diff options
author | 2017-03-03 12:29:47 -0500 | |
---|---|---|
committer | 2017-03-03 12:29:47 -0500 | |
commit | 97853040fb6af73c2f73a98d7e93dae0e20bfc57 (patch) | |
tree | 3872b29771e9689a76752c4640e31334a3eafa85 | |
parent | xvfb X11 server support (--x11=xvfb) (diff) | |
download | firejail-97853040fb6af73c2f73a98d7e93dae0e20bfc57.tar.gz firejail-97853040fb6af73c2f73a98d7e93dae0e20bfc57.tar.zst firejail-97853040fb6af73c2f73a98d7e93dae0e20bfc57.zip |
testing
-rwxr-xr-x | test/environment/output.exp | 22 | ||||
-rwxr-xr-x | test/root/git.exp | 51 | ||||
-rwxr-xr-x | test/root/root.sh | 3 |
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 | } |
62 | after 100 | 62 | after 100 |
63 | send -- "rm -f logfile*\r" | 63 | send -- "rm -f logfile*\r" |
64 | |||
65 | |||
66 | send -- "firejail --output=../logfile -- ./output.sh\r" | ||
67 | expect { | ||
68 | timeout {puts "TESTING ERROR 8\n";exit} | ||
69 | "invalid output file" | ||
70 | } | ||
71 | after 100 | ||
72 | |||
73 | send -- "firejail --output=/etc -- ./output.sh\r" | ||
74 | expect { | ||
75 | timeout {puts "TESTING ERROR 9\n";exit} | ||
76 | "invalid output file" | ||
77 | } | ||
78 | after 100 | ||
79 | |||
80 | send -- "firejail --output=/etc/firejail/zoom.profile -- ./output.sh\r" | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 10\n";exit} | ||
83 | "the output file needs to be owned by the current user" | ||
84 | } | ||
85 | |||
64 | after 100 | 86 | after 100 |
65 | puts "\nall done\n" | 87 | puts "\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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | |||
8 | |||
9 | send -- "firejail --version\r" | ||
10 | expect { | ||
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 | |||
16 | set timeout 120 | ||
17 | send -- "firejail --git-install\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "Cloning into" | ||
21 | } | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 3\n";exit} | ||
24 | "Configuration options" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 4\n";exit} | ||
28 | "src/fseccomp/fseccomp default seccomp" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 5\n";exit} | ||
32 | "Mainline git Firejail version was installed in" | ||
33 | } | ||
34 | after 100 | ||
35 | |||
36 | send -- "firejail --git-uninstall\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 6\n";exit} | ||
39 | "Cloning into" | ||
40 | } | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 7\n";exit} | ||
43 | "Configuration options" | ||
44 | } | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 8\n";exit} | ||
47 | "Firejail mainline git version uninstalled from" | ||
48 | } | ||
49 | after 100 | ||
50 | |||
51 | puts "\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)" | |||
62 | echo "TESTING: join (test/root/join.exp)" | 62 | echo "TESTING: join (test/root/join.exp)" |
63 | ./join.exp | 63 | ./join.exp |
64 | 64 | ||
65 | echo "TESTING: git-install (test/root/git.exp)" | ||
66 | ./git.exp | ||
67 | |||
65 | #******************************** | 68 | #******************************** |
66 | # seccomp | 69 | # seccomp |
67 | #******************************** | 70 | #******************************** |