aboutsummaryrefslogtreecommitdiffstats
path: root/test/appimage
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-11 13:14:13 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-11 13:14:13 -0500
commitc40736899fc621946246297e5b1a3964f6172fdb (patch)
tree5ab5e0bfeb48b1573aaaa451b1acd542377791d3 /test/appimage
parenthidepid part 5 (diff)
downloadfirejail-c40736899fc621946246297e5b1a3964f6172fdb.tar.gz
firejail-c40736899fc621946246297e5b1a3964f6172fdb.tar.zst
firejail-c40736899fc621946246297e5b1a3964f6172fdb.zip
appimage testing
Diffstat (limited to 'test/appimage')
-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
5 files changed, 176 insertions, 0 deletions
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