aboutsummaryrefslogtreecommitdiffstats
path: root/test/apps
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-06-10 10:41:57 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-06-10 10:41:57 -0400
commite3abab47dcda4dba4a1412261e35cb1608ffd900 (patch)
treec1b75716185ea40aa77ff947991c868f7d5d8628 /test/apps
parentprivate-bin conversion (diff)
downloadfirejail-e3abab47dcda4dba4a1412261e35cb1608ffd900.tar.gz
firejail-e3abab47dcda4dba4a1412261e35cb1608ffd900.tar.zst
firejail-e3abab47dcda4dba4a1412261e35cb1608ffd900.zip
private-bin conversion
Diffstat (limited to 'test/apps')
-rwxr-xr-xtest/apps/apps.sh10
-rwxr-xr-xtest/apps/gthumb.exp83
2 files changed, 93 insertions, 0 deletions
diff --git a/test/apps/apps.sh b/test/apps/apps.sh
index fa56ce370..bbfe2a606 100755
--- a/test/apps/apps.sh
+++ b/test/apps/apps.sh
@@ -87,6 +87,16 @@ else
87 echo "TESTING SKIP: evince not found" 87 echo "TESTING SKIP: evince not found"
88fi 88fi
89 89
90
91which gthumb
92if [ "$?" -eq 0 ];
93then
94 echo "TESTING: gthumb"
95 ./gthumb.exp
96else
97 echo "TESTING SKIP: gthumb not found"
98fi
99
90which icedove 100which icedove
91if [ "$?" -eq 0 ]; 101if [ "$?" -eq 0 ];
92then 102then
diff --git a/test/apps/gthumb.exp b/test/apps/gthumb.exp
new file mode 100755
index 000000000..86bb975ba
--- /dev/null
+++ b/test/apps/gthumb.exp
@@ -0,0 +1,83 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail gthumb\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Reading profile /etc/firejail/gthumb.profile"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "Child process initialized"
18}
19sleep 3
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 "gthumb"
30}
31sleep 1
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 ":firejail gthumb"
53}
54expect {
55 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
56 "Seccomp: 2"
57}
58expect {
59 timeout {puts "TESTING ERROR 5.1\n";exit}
60 "name=blablabla"
61}
62sleep 1
63send -- "firemon --caps\r"
64expect {
65 timeout {puts "TESTING ERROR 6\n";exit}
66 ":firejail gthumb"
67}
68expect {
69 timeout {puts "TESTING ERROR 6.1\n";exit}
70 "CapBnd:"
71}
72expect {
73 timeout {puts "TESTING ERROR 6.2\n";exit}
74 "0000000000000000"
75}
76expect {
77 timeout {puts "TESTING ERROR 6.3\n";exit}
78 "name=blablabla"
79}
80sleep 1
81
82puts "\nall done\n"
83