diff options
author | 2023-03-01 08:52:53 -0500 | |
---|---|---|
committer | 2023-03-01 08:52:53 -0500 | |
commit | b50812ff5ef5009b7c6babb19fd9caa315f31515 (patch) | |
tree | 0535438678837dffb9ba5ba988efa482d53c1fc3 /test/appimage/appimage-v1.exp | |
parent | chroot testing (diff) | |
download | firejail-b50812ff5ef5009b7c6babb19fd9caa315f31515.tar.gz firejail-b50812ff5ef5009b7c6babb19fd9caa315f31515.tar.zst firejail-b50812ff5ef5009b7c6babb19fd9caa315f31515.zip |
appimage testing
Diffstat (limited to 'test/appimage/appimage-v1.exp')
-rwxr-xr-x | test/appimage/appimage-v1.exp | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/test/appimage/appimage-v1.exp b/test/appimage/appimage-v1.exp deleted file mode 100755 index bb360cd18..000000000 --- a/test/appimage/appimage-v1.exp +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | set appimage_id $spawn_id | ||
10 | |||
11 | send -- "firejail --name=test --debug --appimage Leafpad-0.8.17-x86_64.AppImage\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
15 | } | ||
16 | sleep 2 | ||
17 | |||
18 | spawn $env(SHELL) | ||
19 | send -- "firejail --list\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3\n";exit} | ||
22 | ":firejail" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
26 | "appimage Leafpad" | ||
27 | } | ||
28 | after 100 | ||
29 | |||
30 | # grsecurity exit | ||
31 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR - grsecurity detection\n";exit} | ||
34 | "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} | ||
35 | "cannot open" {puts "grsecurity not present\n"} | ||
36 | } | ||
37 | |||
38 | |||
39 | send -- "firejail --name=blablabla\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 4\n";exit} | ||
42 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
43 | } | ||
44 | sleep 2 | ||
45 | |||
46 | spawn $env(SHELL) | ||
47 | send -- "firemon --seccomp --wrap\r" | ||
48 | expect { | ||
49 | timeout {puts "TESTING ERROR 5\n";exit} | ||
50 | "need to be root" {puts "/proc mounted as hidepid, exiting...\n"; exit} | ||
51 | "appimage Leafpad" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
55 | "Seccomp: 2" | ||
56 | } | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
59 | "name=blablabla" | ||
60 | } | ||
61 | after 100 | ||
62 | send -- "firemon --caps --wrap\r" | ||
63 | expect { | ||
64 | timeout {puts "TESTING ERROR 6\n";exit} | ||
65 | "appimage Leafpad" | ||
66 | } | ||
67 | expect { | ||
68 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
69 | "CapBnd:" | ||
70 | } | ||
71 | expect { | ||
72 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
73 | "0000000000000000" | ||
74 | } | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
77 | "name=blablabla" | ||
78 | } | ||
79 | after 100 | ||
80 | |||
81 | spawn $env(SHELL) | ||
82 | send -- "firejail --shutdown=test\r" | ||
83 | |||
84 | set spawn_id $appimage_id | ||
85 | expect { | ||
86 | timeout {puts "shutdown\n"} | ||
87 | "AppImage detached" | ||
88 | } | ||
89 | |||
90 | after 100 | ||
91 | |||
92 | puts "\nall done\n" | ||