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-args.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-args.exp')
-rwxr-xr-x | test/appimage/appimage-args.exp | 90 |
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) | |||
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | set appimage_id $spawn_id | 10 | set appimage_id $spawn_id |
11 | send -- "firejail --name=test --debug --appimage Leafpad-0.8.17-x86_64.AppImage testfile\r" | 11 | send -- "firejail --name=test --appimage hello-x86_64.AppImage testfile\r" |
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "execvp argument 2" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "AppRun" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3\n";exit} | ||
22 | "testfile" | ||
23 | } | ||
24 | expect { | 12 | expect { |
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 | } |
28 | sleep 2 | ||
29 | |||
30 | spawn $env(SHELL) | ||
31 | send -- "firejail --list\r" | ||
32 | expect { | 16 | expect { |
33 | timeout {puts "TESTING ERROR 5\n";exit} | 17 | timeout {puts "TESTING ERROR 4\n";exit} |
34 | ":firejail" | 18 | "1 - testfile" |
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 6\n";exit} | ||
38 | "appimage Leafpad" | ||
39 | } | ||
40 | after 100 | ||
41 | |||
42 | # grsecurity exit | ||
43 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
44 | expect { | ||
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 | |||
51 | send -- "firejail --name=blablabla\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 7\n";exit} | ||
54 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
55 | } | ||
56 | sleep 2 | ||
57 | |||
58 | spawn $env(SHELL) | ||
59 | send -- "firemon --seccomp --wrap\r" | ||
60 | expect { | ||
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 | } | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 9 (seccomp)\n";exit} | ||
67 | "Seccomp: 2" | ||
68 | } | ||
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 10\n";exit} | ||
71 | "name=blablabla" | ||
72 | } | ||
73 | after 100 | ||
74 | send -- "firemon --caps --wrap\r" | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 11\n";exit} | ||
77 | "appimage Leafpad" | ||
78 | } | ||
79 | expect { | ||
80 | timeout {puts "TESTING ERROR 12\n";exit} | ||
81 | "CapBnd:" | ||
82 | } | ||
83 | expect { | ||
84 | timeout {puts "TESTING ERROR 13\n";exit} | ||
85 | "0000000000000000" | ||
86 | } | ||
87 | expect { | ||
88 | timeout {puts "TESTING ERROR 14\n";exit} | ||
89 | "name=blablabla" | ||
90 | } | ||
91 | after 100 | ||
92 | |||
93 | spawn $env(SHELL) | ||
94 | send -- "firejail --shutdown=test\r" | ||
95 | |||
96 | set spawn_id $appimage_id | ||
97 | expect { | ||
98 | timeout {puts "shutdown\n";exit} | ||
99 | "AppImage detached" | ||
100 | } | 19 | } |
101 | 20 | ||
102 | after 100 | 21 | after 500 |
103 | |||
104 | puts "\nall done\n" | 22 | puts "\nall done\n" |