aboutsummaryrefslogtreecommitdiffstats
path: root/test/apps/firefox.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-22 09:46:07 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-22 09:46:07 -0400
commit47be57441f2f49baddebaca884fc65199b234714 (patch)
tree67d975d9a2a58b1c9790caeafde9924dd20fb0e5 /test/apps/firefox.exp
parentcherrytree profile fixes (diff)
downloadfirejail-47be57441f2f49baddebaca884fc65199b234714.tar.gz
firejail-47be57441f2f49baddebaca884fc65199b234714.tar.zst
firejail-47be57441f2f49baddebaca884fc65199b234714.zip
make test-apps
Diffstat (limited to 'test/apps/firefox.exp')
-rwxr-xr-xtest/apps/firefox.exp96
1 files changed, 96 insertions, 0 deletions
diff --git a/test/apps/firefox.exp b/test/apps/firefox.exp
new file mode 100755
index 000000000..2585e4b5c
--- /dev/null
+++ b/test/apps/firefox.exp
@@ -0,0 +1,96 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail firefox -no-remote www.gentoo.org\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/firefox.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 10
17
18spawn $env(SHELL)
19send -- "firejail --list\r"
20expect {
21 timeout {puts "TESTING ERROR 3\n";exit}
22 ":firejail"
23}
24expect {
25 timeout {puts "TESTING ERROR 3.1\n";exit}
26 "firefox" {puts "firefox detected\n";}
27 "iceweasel" {puts "iceweasel detected\n";}
28}
29expect {
30 timeout {puts "TESTING ERROR 3.2\n";exit}
31 "no-remote"
32}
33sleep 1
34
35# grsecurity exit
36send -- "file /proc/sys/kernel/grsecurity\r"
37expect {
38 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
39 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
40 "cannot open" {puts "grsecurity not present\n"}
41}
42
43
44send -- "firejail --name=blablabla\r"
45expect {
46 timeout {puts "TESTING ERROR 4\n";exit}
47 "Child process initialized"
48}
49sleep 2
50
51spawn $env(SHELL)
52send -- "firemon --seccomp\r"
53expect {
54 timeout {puts "TESTING ERROR 5\n";exit}
55 " firefox" {puts "firefox detected\n";}
56 " iceweasel" {puts "iceweasel detected\n";}
57}
58expect {
59 timeout {puts "TESTING ERROR 5.0\n";exit}
60 "no-remote"
61}
62expect {
63 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
64 "Seccomp: 2"
65}
66expect {
67 timeout {puts "TESTING ERROR 5.1\n";exit}
68 "name=blablabla"
69}
70sleep 1
71send -- "firemon --caps\r"
72expect {
73 timeout {puts "TESTING ERROR 6\n";exit}
74 " firefox" {puts "firefox detected\n";}
75 " iceweasel" {puts "iceweasel detected\n";}
76}
77expect {
78 timeout {puts "TESTING ERROR 6.0\n";exit}
79 "no-remote"
80}
81expect {
82 timeout {puts "TESTING ERROR 6.1\n";exit}
83 "CapBnd:"
84}
85expect {
86 timeout {puts "TESTING ERROR 6.2\n";exit}
87 "0000000000000000"
88}
89expect {
90 timeout {puts "TESTING ERROR 6.3\n";exit}
91 "name=blablabla"
92}
93sleep 1
94
95puts "\n"
96