aboutsummaryrefslogtreecommitdiffstats
path: root/test/appimage/appimage-v1.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/appimage/appimage-v1.exp')
-rwxr-xr-xtest/appimage/appimage-v1.exp81
1 files changed, 81 insertions, 0 deletions
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