aboutsummaryrefslogtreecommitdiffstats
path: root/test/apps
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
parentcherrytree profile fixes (diff)
downloadfirejail-47be57441f2f49baddebaca884fc65199b234714.tar.gz
firejail-47be57441f2f49baddebaca884fc65199b234714.tar.zst
firejail-47be57441f2f49baddebaca884fc65199b234714.zip
make test-apps
Diffstat (limited to 'test/apps')
-rwxr-xr-xtest/apps/apps.sh149
-rwxr-xr-xtest/apps/chromium.exp80
-rwxr-xr-xtest/apps/deluge.exp80
-rwxr-xr-xtest/apps/evince.exp80
-rwxr-xr-xtest/apps/fbreader.exp80
-rwxr-xr-xtest/apps/firefox.exp96
-rwxr-xr-xtest/apps/gnome-mplayer.exp80
-rwxr-xr-xtest/apps/hexchat.exp80
-rwxr-xr-xtest/apps/icedove.exp80
-rwxr-xr-xtest/apps/midori.exp81
-rwxr-xr-xtest/apps/opera.exp80
-rwxr-xr-xtest/apps/transmission-gtk.exp75
-rwxr-xr-xtest/apps/transmission-qt.exp80
-rwxr-xr-xtest/apps/vlc.exp80
-rwxr-xr-xtest/apps/weechat.exp80
-rwxr-xr-xtest/apps/wine.exp30
-rwxr-xr-xtest/apps/xchat.exp80
17 files changed, 1391 insertions, 0 deletions
diff --git a/test/apps/apps.sh b/test/apps/apps.sh
new file mode 100755
index 000000000..ff561ef31
--- /dev/null
+++ b/test/apps/apps.sh
@@ -0,0 +1,149 @@
1#!/bin/bash
2
3export MALLOC_CHECK_=3
4export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
5
6which firefox
7if [ "$?" -eq 0 ];
8then
9 echo "TESTING: firefox"
10 ./firefox.exp
11else
12 echo "TESTING: firefox not found"
13fi
14
15which midori
16if [ "$?" -eq 0 ];
17then
18 echo "TESTING: midori"
19 ./midori.exp
20else
21 echo "TESTING: midori not found"
22fi
23
24which chromium
25if [ "$?" -eq 0 ];
26then
27 echo "TESTING: chromium"
28 ./chromium.exp
29else
30 echo "TESTING: chromium not found"
31fi
32
33which opera
34if [ "$?" -eq 0 ];
35then
36 echo "TESTING: opera"
37 ./opera.exp
38else
39 echo "TESTING: opera not found"
40fi
41
42which transmission-gtk
43if [ "$?" -eq 0 ];
44then
45 echo "TESTING: transmission-gtk"
46 ./transmission-gtk.exp
47else
48 echo "TESTING: transmission-gtk not found"
49fi
50
51which transmission-qt
52if [ "$?" -eq 0 ];
53then
54 echo "TESTING: transmission-qt"
55 ./transmission-qt.exp
56else
57 echo "TESTING: transmission-qt not found"
58fi
59
60which evince
61if [ "$?" -eq 0 ];
62then
63 echo "TESTING: evince"
64 ./evince.exp
65else
66 echo "TESTING: evince not found"
67fi
68
69which icedove
70if [ "$?" -eq 0 ];
71then
72 echo "TESTING: icedove"
73 ./icedove.exp
74else
75 echo "TESTING: icedove not found"
76fi
77
78which vlc
79if [ "$?" -eq 0 ];
80then
81 echo "TESTING: vlc"
82 ./vlc.exp
83else
84 echo "TESTING: vlc not found"
85fi
86
87which fbreader
88if [ "$?" -eq 0 ];
89then
90 echo "TESTING: fbreader"
91 ./fbreader.exp
92else
93 echo "TESTING: fbreader not found"
94fi
95
96which deluge
97if [ "$?" -eq 0 ];
98then
99 echo "TESTING: deluge"
100 ./deluge.exp
101else
102 echo "TESTING: deluge not found"
103fi
104
105which gnome-mplayer
106if [ "$?" -eq 0 ];
107then
108 echo "TESTING: gnome-mplayer"
109 ./gnome-mplayer.exp
110else
111 echo "TESTING: gnome-mplayer not found"
112fi
113
114which xchat
115if [ "$?" -eq 0 ];
116then
117 echo "TESTING: xchat"
118 ./xchat.exp
119else
120 echo "TESTING: xchat not found"
121fi
122
123which hexchat
124if [ "$?" -eq 0 ];
125then
126 echo "TESTING: hexchat"
127 ./hexchat.exp
128else
129 echo "TESTING: hexchat not found"
130fi
131
132which weechat-curses
133if [ "$?" -eq 0 ];
134then
135 echo "TESTING: weechat"
136 ./weechat.exp
137else
138 echo "TESTING: weechat not found"
139fi
140
141which wine
142if [ "$?" -eq 0 ];
143then
144 echo "TESTING: wine"
145 ./wine.exp
146else
147 echo "TESTING: wine not found"
148fi
149
diff --git a/test/apps/chromium.exp b/test/apps/chromium.exp
new file mode 100755
index 000000000..676f7e314
--- /dev/null
+++ b/test/apps/chromium.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail chromium www.gentoo.org\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/chromium.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 "chromium"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail chromium"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1\n";exit}
53 "Seccomp: 0"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail chromium"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "fffffffff"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\n"
80
diff --git a/test/apps/deluge.exp b/test/apps/deluge.exp
new file mode 100755
index 000000000..9f5063495
--- /dev/null
+++ b/test/apps/deluge.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail deluge\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/deluge.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 "deluge"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail deluge"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail deluge"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\n"
80
diff --git a/test/apps/evince.exp b/test/apps/evince.exp
new file mode 100755
index 000000000..3c3ad4bdd
--- /dev/null
+++ b/test/apps/evince.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail evince\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/evince.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 3
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 "evince"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail evince"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail evince"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\nall done\n"
80
diff --git a/test/apps/fbreader.exp b/test/apps/fbreader.exp
new file mode 100755
index 000000000..d2bee880e
--- /dev/null
+++ b/test/apps/fbreader.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail fbreader\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/fbreader.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 3
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 "fbreader"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail fbreader"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail fbreader"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\nall done\n"
80
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
diff --git a/test/apps/gnome-mplayer.exp b/test/apps/gnome-mplayer.exp
new file mode 100755
index 000000000..6965322fc
--- /dev/null
+++ b/test/apps/gnome-mplayer.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail gnome-mplayer\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/gnome-mplayer.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 "gnome-mplayer"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail gnome-mplayer"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail gnome-mplayer"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\nall done\n"
80
diff --git a/test/apps/hexchat.exp b/test/apps/hexchat.exp
new file mode 100755
index 000000000..7e99c8cdf
--- /dev/null
+++ b/test/apps/hexchat.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail hexchat\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/hexchat.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 3
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 "hexchat"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 "hexchat"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 "hexchat"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\n"
80
diff --git a/test/apps/icedove.exp b/test/apps/icedove.exp
new file mode 100755
index 000000000..344febb93
--- /dev/null
+++ b/test/apps/icedove.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail icedove\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/icedove.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 5
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 "icedove"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail icedove"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail icedove"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\nall done\n"
80
diff --git a/test/apps/midori.exp b/test/apps/midori.exp
new file mode 100755
index 000000000..470f5de77
--- /dev/null
+++ b/test/apps/midori.exp
@@ -0,0 +1,81 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail midori www.gentoo.org\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/midori.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 "midori"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail midori"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail midori"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79
80puts "\n"
81
diff --git a/test/apps/opera.exp b/test/apps/opera.exp
new file mode 100755
index 000000000..23eed5504
--- /dev/null
+++ b/test/apps/opera.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail opera www.gentoo.org\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/opera.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 "opera"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail opera"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1\n";exit}
53 "Seccomp: 0"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail opera"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "fffffffff"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\n"
80
diff --git a/test/apps/transmission-gtk.exp b/test/apps/transmission-gtk.exp
new file mode 100755
index 000000000..1acfc6f94
--- /dev/null
+++ b/test/apps/transmission-gtk.exp
@@ -0,0 +1,75 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail transmission-gtk\r"
8expect {
9 timeout {puts "TESTING ERROR 1\n";exit}
10 "Child process initialized"
11}
12sleep 10
13
14spawn $env(SHELL)
15send -- "firejail --list\r"
16expect {
17 timeout {puts "TESTING ERROR 3\n";exit}
18 ":firejail"
19}
20expect {
21 timeout {puts "TESTING ERROR 3.1\n";exit}
22 "transmission-gtk"
23}
24sleep 1
25
26# grsecurity exit
27send -- "file /proc/sys/kernel/grsecurity\r"
28expect {
29 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
30 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
31 "cannot open" {puts "grsecurity not present\n"}
32}
33send -- "firejail --name=blablabla\r"
34expect {
35 timeout {puts "TESTING ERROR 4\n";exit}
36 "Child process initialized"
37}
38sleep 2
39
40spawn $env(SHELL)
41send -- "firemon --seccomp\r"
42expect {
43 timeout {puts "TESTING ERROR 5\n";exit}
44 ":firejail transmission-gtk"
45}
46expect {
47 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
48 "Seccomp: 2"
49}
50expect {
51 timeout {puts "TESTING ERROR 5.1\n";exit}
52 "name=blablabla"
53}
54sleep 1
55send -- "firemon --caps\r"
56expect {
57 timeout {puts "TESTING ERROR 6\n";exit}
58 ":firejail transmission-gtk"
59}
60expect {
61 timeout {puts "TESTING ERROR 6.1\n";exit}
62 "CapBnd"
63}
64expect {
65 timeout {puts "TESTING ERROR 6.2\n";exit}
66 "0000000000000000"
67}
68expect {
69 timeout {puts "TESTING ERROR 6.3\n";exit}
70 "name=blablabla"
71}
72sleep 1
73
74puts "\nall done\n"
75
diff --git a/test/apps/transmission-qt.exp b/test/apps/transmission-qt.exp
new file mode 100755
index 000000000..944fd28a2
--- /dev/null
+++ b/test/apps/transmission-qt.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail transmission-qt\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/transmission-qt.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 "transmission-qt"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail transmission-qt"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail transmission-qt"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\nall done\n"
80
diff --git a/test/apps/vlc.exp b/test/apps/vlc.exp
new file mode 100755
index 000000000..290c0fc2f
--- /dev/null
+++ b/test/apps/vlc.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail vlc\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/vlc.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 3
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 "vlc"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 ":firejail vlc"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 ":firejail vlc"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\nall done\n"
80
diff --git a/test/apps/weechat.exp b/test/apps/weechat.exp
new file mode 100755
index 000000000..630af55ee
--- /dev/null
+++ b/test/apps/weechat.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail weechat-curses\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/weechat.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 3
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 "weechat-curses"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 "weechat-curses"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 "weechat-curses"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\n"
80
diff --git a/test/apps/wine.exp b/test/apps/wine.exp
new file mode 100755
index 000000000..f5b7d12b4
--- /dev/null
+++ b/test/apps/wine.exp
@@ -0,0 +1,30 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail wine --help\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/wine.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "Usage: wine PROGRAM"
19}
20expect {
21 timeout {puts "TESTING ERROR 3\n";exit}
22 "wine --version"
23}
24expect {
25 timeout {puts "TESTING ERROR 4\n";exit}
26 "Parent is shutting down, bye..."
27}
28
29puts "\nall done\n"
30
diff --git a/test/apps/xchat.exp b/test/apps/xchat.exp
new file mode 100755
index 000000000..cde89d754
--- /dev/null
+++ b/test/apps/xchat.exp
@@ -0,0 +1,80 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail xchat\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Reading profile /etc/firejail/xchat.profile"
11}
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Child process initialized"
15}
16sleep 3
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 "xchat"
27}
28sleep 1
29
30# grsecurity exit
31send -- "file /proc/sys/kernel/grsecurity\r"
32expect {
33 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
34 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
35 "cannot open" {puts "grsecurity not present\n"}
36}
37
38send -- "firejail --name=blablabla\r"
39expect {
40 timeout {puts "TESTING ERROR 4\n";exit}
41 "Child process initialized"
42}
43sleep 2
44
45spawn $env(SHELL)
46send -- "firemon --seccomp\r"
47expect {
48 timeout {puts "TESTING ERROR 5\n";exit}
49 " xchat"
50}
51expect {
52 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
53 "Seccomp: 2"
54}
55expect {
56 timeout {puts "TESTING ERROR 5.1\n";exit}
57 "name=blablabla"
58}
59sleep 1
60send -- "firemon --caps\r"
61expect {
62 timeout {puts "TESTING ERROR 6\n";exit}
63 " xchat"
64}
65expect {
66 timeout {puts "TESTING ERROR 6.1\n";exit}
67 "CapBnd:"
68}
69expect {
70 timeout {puts "TESTING ERROR 6.2\n";exit}
71 "0000000000000000"
72}
73expect {
74 timeout {puts "TESTING ERROR 6.3\n";exit}
75 "name=blablabla"
76}
77sleep 1
78
79puts "\n"
80