diff options
author | netblue30 <netblue30@yahoo.com> | 2016-11-11 13:14:13 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-11-11 13:14:13 -0500 |
commit | c40736899fc621946246297e5b1a3964f6172fdb (patch) | |
tree | 5ab5e0bfeb48b1573aaaa451b1acd542377791d3 | |
parent | hidepid part 5 (diff) | |
download | firejail-c40736899fc621946246297e5b1a3964f6172fdb.tar.gz firejail-c40736899fc621946246297e5b1a3964f6172fdb.tar.zst firejail-c40736899fc621946246297e5b1a3964f6172fdb.zip |
appimage testing
-rw-r--r-- | Makefile.in | 7 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | test/appimage/Leafpad-0.8.17-x86_64.AppImage | bin | 0 -> 786432 bytes | |||
-rw-r--r-- | test/appimage/Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage | bin | 0 -> 231417 bytes | |||
-rwxr-xr-x | test/appimage/appimage-v1.exp | 81 | ||||
-rwxr-xr-x | test/appimage/appimage-v2.exp | 81 | ||||
-rwxr-xr-x | test/appimage/appimage.sh | 14 |
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 | ||
148 | DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES" | 148 | DISTFILES = "src etc platform configure configure.ac Makefile.in install.sh mkman.sh mketc.sh mkdeb.sh mkuid.sh COPYING README RELNOTES" |
149 | DISTFILES_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" | 149 | DISTFILES_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 | ||
151 | dist: | 151 | dist: |
152 | mv config.status config.status.old | 152 | mv config.status config.status.old |
@@ -232,7 +232,10 @@ test-arguments: | |||
232 | test-fs: | 232 | test-fs: |
233 | cd test/fs; ./fs.sh | grep TESTING | 233 | cd test/fs; ./fs.sh | grep TESTING |
234 | 234 | ||
235 | test: test-profiles test-fs test-utils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-arguments | 235 | test-appimage: |
236 | cd test/appimage; ./appimage.sh | grep TESTING | ||
237 | |||
238 | test: 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 | # |
@@ -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 |
83 | Simon 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 | ||
83 | BogDan Vatra (https://github.com/bog-dan-ro) | 87 | BogDan Vatra (https://github.com/bog-dan-ro) |
84 | - zoom profile | 88 | - zoom profile |
85 | Impyy (https://github.com/Impyy) | 89 | Impyy (https://github.com/Impyy) |
@@ -158,8 +162,6 @@ Rahul Golam (https://github.com/technoLord) | |||
158 | - strings profile | 162 | - strings profile |
159 | geg2048 (https://github.com/geg2048) | 163 | geg2048 (https://github.com/geg2048) |
160 | - kwallet profile fixes | 164 | - kwallet profile fixes |
161 | Simon Peter (https://github.com/probonopd) | ||
162 | - set $APPIMAGE and $APPDIR environment variables | ||
163 | maces (https://github.com/maces) | 165 | maces (https://github.com/maces) |
164 | - Franz messenger profile | 166 | - Franz messenger profile |
165 | KellerFuchs (https://github.com/KellerFuchs) | 167 | KellerFuchs (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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --appimage Leafpad-0.8.17-x86_64.AppImage\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 2 | ||
16 | |||
17 | spawn $env(SHELL) | ||
18 | send -- "firejail --list\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | ":firejail" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
25 | "appimage Leafpad" | ||
26 | } | ||
27 | after 100 | ||
28 | |||
29 | # grsecurity exit | ||
30 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
31 | expect { | ||
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 | |||
38 | send -- "firejail --name=blablabla\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 4\n";exit} | ||
41 | "Child process initialized" | ||
42 | } | ||
43 | sleep 2 | ||
44 | |||
45 | spawn $env(SHELL) | ||
46 | send -- "firemon --seccomp\r" | ||
47 | expect { | ||
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 | } | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
54 | "Seccomp: 2" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
58 | "name=blablabla" | ||
59 | } | ||
60 | after 100 | ||
61 | send -- "firemon --caps\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 6\n";exit} | ||
64 | "appimage Leafpad" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
68 | "CapBnd:" | ||
69 | } | ||
70 | expect { | ||
71 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
72 | "0000000000000000" | ||
73 | } | ||
74 | expect { | ||
75 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
76 | "name=blablabla" | ||
77 | } | ||
78 | after 100 | ||
79 | |||
80 | puts "\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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --appimage Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 2 | ||
16 | |||
17 | spawn $env(SHELL) | ||
18 | send -- "firejail --list\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | ":firejail" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
25 | "appimage Leafpad" | ||
26 | } | ||
27 | after 100 | ||
28 | |||
29 | # grsecurity exit | ||
30 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
31 | expect { | ||
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 | |||
38 | send -- "firejail --name=blablabla\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 4\n";exit} | ||
41 | "Child process initialized" | ||
42 | } | ||
43 | sleep 2 | ||
44 | |||
45 | spawn $env(SHELL) | ||
46 | send -- "firemon --seccomp\r" | ||
47 | expect { | ||
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 | } | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
54 | "Seccomp: 2" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
58 | "name=blablabla" | ||
59 | } | ||
60 | after 100 | ||
61 | send -- "firemon --caps\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 6\n";exit} | ||
64 | "appimage Leafpad" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
68 | "CapBnd:" | ||
69 | } | ||
70 | expect { | ||
71 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
72 | "0000000000000000" | ||
73 | } | ||
74 | expect { | ||
75 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
76 | "name=blablabla" | ||
77 | } | ||
78 | after 100 | ||
79 | |||
80 | puts "\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 | |||
6 | export MALLOC_CHECK_=3 | ||
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | ||
8 | |||
9 | echo "TESTING: AppImage v1 (test/appimage/appimage-v1.exp)" | ||
10 | ./appimage-v1.exp | ||
11 | |||
12 | echo "TESTING: AppImage v2 (test/appimage/appimage-v2.exp)" | ||
13 | ./appimage-v1.exp | ||
14 | |||