aboutsummaryrefslogtreecommitdiffstats
path: root/test/apps/thunderbird.exp
diff options
context:
space:
mode:
authorLibravatar Reiner Herrmann <reiner@reiner-h.de>2017-03-25 12:44:45 +0100
committerLibravatar Reiner Herrmann <reiner@reiner-h.de>2017-03-25 12:44:45 +0100
commit118afb4479662881160b96b0cdfa2f07825ae910 (patch)
tree785d9e7b845df26e80f07b3e13efb274360df88e /test/apps/thunderbird.exp
parenttesting (diff)
downloadfirejail-118afb4479662881160b96b0cdfa2f07825ae910.tar.gz
firejail-118afb4479662881160b96b0cdfa2f07825ae910.tar.zst
firejail-118afb4479662881160b96b0cdfa2f07825ae910.zip
Use thunderbird instead of icedove for testing
Thunderbird is back in Debian, and Icedove is gone. Tests will then also run in more distributions.
Diffstat (limited to 'test/apps/thunderbird.exp')
-rwxr-xr-xtest/apps/thunderbird.exp84
1 files changed, 84 insertions, 0 deletions
diff --git a/test/apps/thunderbird.exp b/test/apps/thunderbird.exp
new file mode 100755
index 000000000..16b0dc60e
--- /dev/null
+++ b/test/apps/thunderbird.exp
@@ -0,0 +1,84 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2017 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail thunderbird\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Reading profile /etc/firejail/thunderbird.profile"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized"
18}
19sleep 5
20
21spawn $env(SHELL)
22send -- "firejail --list\r"
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 ":firejail"
26}
27expect {
28 timeout {puts "TESTING ERROR 3.1\n";exit}
29 "thunderbird"
30}
31after 100
32
33# grsecurity exit
34send -- "file /proc/sys/kernel/grsecurity\r"
35expect {
36 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
37 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
38 "cannot open" {puts "grsecurity not present\n"}
39}
40
41send -- "firejail --name=blablabla\r"
42expect {
43 timeout {puts "TESTING ERROR 4\n";exit}
44 "Child process initialized"
45}
46sleep 2
47
48spawn $env(SHELL)
49send -- "firemon --seccomp\r"
50expect {
51 timeout {puts "TESTING ERROR 5\n";exit}
52 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
53 ":firejail thunderbird"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
57 "Seccomp: 2"
58}
59expect {
60 timeout {puts "TESTING ERROR 5.1\n";exit}
61 "name=blablabla"
62}
63after 100
64send -- "firemon --caps\r"
65expect {
66 timeout {puts "TESTING ERROR 6\n";exit}
67 ":firejail thunderbird"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.1\n";exit}
71 "CapBnd:"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.2\n";exit}
75 "0000000000000000"
76}
77expect {
78 timeout {puts "TESTING ERROR 6.3\n";exit}
79 "name=blablabla"
80}
81after 100
82
83puts "\nall done\n"
84