aboutsummaryrefslogtreecommitdiffstats
path: root/test/appimage/appimage-args.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-03-01 08:52:53 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-03-01 08:52:53 -0500
commitb50812ff5ef5009b7c6babb19fd9caa315f31515 (patch)
tree0535438678837dffb9ba5ba988efa482d53c1fc3 /test/appimage/appimage-args.exp
parentchroot testing (diff)
downloadfirejail-b50812ff5ef5009b7c6babb19fd9caa315f31515.tar.gz
firejail-b50812ff5ef5009b7c6babb19fd9caa315f31515.tar.zst
firejail-b50812ff5ef5009b7c6babb19fd9caa315f31515.zip
appimage testing
Diffstat (limited to 'test/appimage/appimage-args.exp')
-rwxr-xr-xtest/appimage/appimage-args.exp90
1 files changed, 4 insertions, 86 deletions
diff --git a/test/appimage/appimage-args.exp b/test/appimage/appimage-args.exp
index e85e8a46a..ef64e862f 100755
--- a/test/appimage/appimage-args.exp
+++ b/test/appimage/appimage-args.exp
@@ -8,97 +8,15 @@ spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10set appimage_id $spawn_id 10set appimage_id $spawn_id
11send -- "firejail --name=test --debug --appimage Leafpad-0.8.17-x86_64.AppImage testfile\r" 11send -- "firejail --name=test --appimage hello-x86_64.AppImage testfile\r"
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "execvp argument 2"
15}
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "AppRun"
19}
20expect {
21 timeout {puts "TESTING ERROR 3\n";exit}
22 "testfile"
23}
24expect { 12expect {
25 timeout {puts "TESTING ERROR 4\n";exit} 13 timeout {puts "TESTING ERROR 4\n";exit}
26 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
27} 15}
28sleep 2
29
30spawn $env(SHELL)
31send -- "firejail --list\r"
32expect { 16expect {
33 timeout {puts "TESTING ERROR 5\n";exit} 17 timeout {puts "TESTING ERROR 4\n";exit}
34 ":firejail" 18 "1 - testfile"
35}
36expect {
37 timeout {puts "TESTING ERROR 6\n";exit}
38 "appimage Leafpad"
39}
40after 100
41
42# grsecurity exit
43send -- "file /proc/sys/kernel/grsecurity\r"
44expect {
45 timeout {puts "TESTING ERROR - grsecurity detection\n";exit}
46 "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit}
47 "cannot open" {puts "grsecurity not present\n"}
48}
49
50
51send -- "firejail --name=blablabla\r"
52expect {
53 timeout {puts "TESTING ERROR 7\n";exit}
54 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
55}
56sleep 2
57
58spawn $env(SHELL)
59send -- "firemon --seccomp --wrap\r"
60expect {
61 timeout {puts "TESTING ERROR 8\n";exit}
62 "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit}
63 "appimage Leafpad"
64}
65expect {
66 timeout {puts "TESTING ERROR 9 (seccomp)\n";exit}
67 "Seccomp: 2"
68}
69expect {
70 timeout {puts "TESTING ERROR 10\n";exit}
71 "name=blablabla"
72}
73after 100
74send -- "firemon --caps --wrap\r"
75expect {
76 timeout {puts "TESTING ERROR 11\n";exit}
77 "appimage Leafpad"
78}
79expect {
80 timeout {puts "TESTING ERROR 12\n";exit}
81 "CapBnd:"
82}
83expect {
84 timeout {puts "TESTING ERROR 13\n";exit}
85 "0000000000000000"
86}
87expect {
88 timeout {puts "TESTING ERROR 14\n";exit}
89 "name=blablabla"
90}
91after 100
92
93spawn $env(SHELL)
94send -- "firejail --shutdown=test\r"
95
96set spawn_id $appimage_id
97expect {
98 timeout {puts "shutdown\n";exit}
99 "AppImage detached"
100} 19}
101 20
102after 100 21after 500
103
104puts "\nall done\n" 22puts "\nall done\n"