summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in7
-rw-r--r--README6
-rw-r--r--test/appimage/Leafpad-0.8.17-x86_64.AppImagebin0 -> 786432 bytes
-rw-r--r--test/appimage/Leafpad-0.8.18.1.glibc2.4-x86_64.AppImagebin0 -> 231417 bytes
-rwxr-xr-xtest/appimage/appimage-v1.exp81
-rwxr-xr-xtest/appimage/appimage-v2.exp81
-rwxr-xr-xtest/appimage/appimage.sh14
7 files changed, 185 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 6ea9e897f..83d44fb1c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -146,7 +146,7 @@ uninstall:
146 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg 146 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg
147 147
148DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES" 148DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES"
149DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/root test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils" 149DISTFILES_TEST = "test/apps test/apps-x11 test/apps-x11-xorg test/appimage test/root test/environment test/profiles test/utils test/compile test/filters test/network test/arguments test/fs test/sysutils"
150 150
151dist: 151dist:
152 mv config.status config.status.old 152 mv config.status config.status.old
@@ -232,7 +232,10 @@ test-arguments:
232test-fs: 232test-fs:
233 cd test/fs; ./fs.sh | grep TESTING 233 cd test/fs; ./fs.sh | grep TESTING
234 234
235test: test-profiles test-fs test-utils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments 235test-appimage:
236 cd test/appimage; ./appimage.sh | grep TESTING
237
238test: test-profiles test-fs test-utils test-environment test-appimage test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments
236 echo "TEST COMPLETE" 239 echo "TEST COMPLETE"
237 240
238# 241#
diff --git a/README b/README
index 2051f2901..69e5e6337 100644
--- a/README
+++ b/README
@@ -80,6 +80,10 @@ Fred-Barclay (https://github.com/Fred-Barclay)
80 - evince profile enhancement 80 - evince profile enhancement
81 - tightened Spotify profile 81 - tightened Spotify profile
82 - added xiphos and Tor Browser Bundle profiles 82 - added xiphos and Tor Browser Bundle profiles
83Simon Peter (https://github.com/probonopd)
84 - set $APPIMAGE and $APPDIR environment variables
85 - AppImage version detection
86 - Leafppad type v1 and v2 appimage packages in test/appimage
83BogDan Vatra (https://github.com/bog-dan-ro) 87BogDan Vatra (https://github.com/bog-dan-ro)
84 - zoom profile 88 - zoom profile
85Impyy (https://github.com/Impyy) 89Impyy (https://github.com/Impyy)
@@ -158,8 +162,6 @@ Rahul Golam (https://github.com/technoLord)
158 - strings profile 162 - strings profile
159geg2048 (https://github.com/geg2048) 163geg2048 (https://github.com/geg2048)
160 - kwallet profile fixes 164 - kwallet profile fixes
161Simon Peter (https://github.com/probonopd)
162 - set $APPIMAGE and $APPDIR environment variables
163maces (https://github.com/maces) 165maces (https://github.com/maces)
164 - Franz messenger profile 166 - Franz messenger profile
165KellerFuchs (https://github.com/KellerFuchs) 167KellerFuchs (https://github.com/KellerFuchs)
diff --git a/test/appimage/Leafpad-0.8.17-x86_64.AppImage b/test/appimage/Leafpad-0.8.17-x86_64.AppImage
new file mode 100644
index 000000000..865f6b44c
--- /dev/null
+++ b/test/appimage/Leafpad-0.8.17-x86_64.AppImage
Binary files differ
diff --git a/test/appimage/Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage b/test/appimage/Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
new file mode 100644
index 000000000..d167431f3
--- /dev/null
+++ b/test/appimage/Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
Binary files differ
diff --git a/test/appimage/appimage-v1.exp b/test/appimage/appimage-v1.exp
new file mode 100755
index 000000000..88687ae2a
--- /dev/null
+++ b/test/appimage/appimage-v1.exp
@@ -0,0 +1,81 @@
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 --appimage Leafpad-0.8.17-x86_64.AppImage\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15sleep 2
16
17spawn $env(SHELL)
18send -- "firejail --list\r"
19expect {
20 timeout {puts "TESTING ERROR 3\n";exit}
21 ":firejail"
22}
23expect {
24 timeout {puts "TESTING ERROR 3.1\n";exit}
25 "appimage Leafpad"
26}
27after 100
28
29# grsecurity exit
30send -- "file /proc/sys/kernel/grsecurity\r"
31expect {
32 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
33 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
34 "cannot open" {puts "grsecurity not present\n"}
35}
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 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
50 "appimage Leafpad"
51}
52expect {
53 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
54 "Seccomp: 2"
55}
56expect {
57 timeout {puts "TESTING ERROR 5.1\n";exit}
58 "name=blablabla"
59}
60after 100
61send -- "firemon --caps\r"
62expect {
63 timeout {puts "TESTING ERROR 6\n";exit}
64 "appimage Leafpad"
65}
66expect {
67 timeout {puts "TESTING ERROR 6.1\n";exit}
68 "CapBnd:"
69}
70expect {
71 timeout {puts "TESTING ERROR 6.2\n";exit}
72 "0000000000000000"
73}
74expect {
75 timeout {puts "TESTING ERROR 6.3\n";exit}
76 "name=blablabla"
77}
78after 100
79
80puts "\nall done\n"
81
diff --git a/test/appimage/appimage-v2.exp b/test/appimage/appimage-v2.exp
new file mode 100755
index 000000000..7b3bf4cbd
--- /dev/null
+++ b/test/appimage/appimage-v2.exp
@@ -0,0 +1,81 @@
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 --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15sleep 2
16
17spawn $env(SHELL)
18send -- "firejail --list\r"
19expect {
20 timeout {puts "TESTING ERROR 3\n";exit}
21 ":firejail"
22}
23expect {
24 timeout {puts "TESTING ERROR 3.1\n";exit}
25 "appimage Leafpad"
26}
27after 100
28
29# grsecurity exit
30send -- "file /proc/sys/kernel/grsecurity\r"
31expect {
32 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
33 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
34 "cannot open" {puts "grsecurity not present\n"}
35}
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 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
50 "appimage Leafpad"
51}
52expect {
53 timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit}
54 "Seccomp: 2"
55}
56expect {
57 timeout {puts "TESTING ERROR 5.1\n";exit}
58 "name=blablabla"
59}
60after 100
61send -- "firemon --caps\r"
62expect {
63 timeout {puts "TESTING ERROR 6\n";exit}
64 "appimage Leafpad"
65}
66expect {
67 timeout {puts "TESTING ERROR 6.1\n";exit}
68 "CapBnd:"
69}
70expect {
71 timeout {puts "TESTING ERROR 6.2\n";exit}
72 "0000000000000000"
73}
74expect {
75 timeout {puts "TESTING ERROR 6.3\n";exit}
76 "name=blablabla"
77}
78after 100
79
80puts "\nall done\n"
81
diff --git a/test/appimage/appimage.sh b/test/appimage/appimage.sh
new file mode 100755
index 000000000..6a73d0a7e
--- /dev/null
+++ b/test/appimage/appimage.sh
@@ -0,0 +1,14 @@
1#!/bin/bash
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8
9echo "TESTING: AppImage v1 (test/appimage/appimage-v1.exp)"
10./appimage-v1.exp
11
12echo "TESTING: AppImage v2 (test/appimage/appimage-v2.exp)"
13./appimage-v1.exp
14