diff options
author | 2016-04-22 09:46:07 -0400 | |
---|---|---|
committer | 2016-04-22 09:46:07 -0400 | |
commit | 47be57441f2f49baddebaca884fc65199b234714 (patch) | |
tree | 67d975d9a2a58b1c9790caeafde9924dd20fb0e5 /test/apps/transmission-gtk.exp | |
parent | cherrytree profile fixes (diff) | |
download | firejail-47be57441f2f49baddebaca884fc65199b234714.tar.gz firejail-47be57441f2f49baddebaca884fc65199b234714.tar.zst firejail-47be57441f2f49baddebaca884fc65199b234714.zip |
make test-apps
Diffstat (limited to 'test/apps/transmission-gtk.exp')
-rwxr-xr-x | test/apps/transmission-gtk.exp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/test/apps/transmission-gtk.exp b/test/apps/transmission-gtk.exp new file mode 100755 index 000000000..1acfc6f94 --- /dev/null +++ b/test/apps/transmission-gtk.exp | |||
@@ -0,0 +1,75 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail transmission-gtk\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 10 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --list\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 3\n";exit} | ||
18 | ":firejail" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
22 | "transmission-gtk" | ||
23 | } | ||
24 | sleep 1 | ||
25 | |||
26 | # grsecurity exit | ||
27 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR - grsecurity detection\n";exit} | ||
30 | "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} | ||
31 | "cannot open" {puts "grsecurity not present\n"} | ||
32 | } | ||
33 | send -- "firejail --name=blablabla\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 4\n";exit} | ||
36 | "Child process initialized" | ||
37 | } | ||
38 | sleep 2 | ||
39 | |||
40 | spawn $env(SHELL) | ||
41 | send -- "firemon --seccomp\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 5\n";exit} | ||
44 | ":firejail transmission-gtk" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
48 | "Seccomp: 2" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
52 | "name=blablabla" | ||
53 | } | ||
54 | sleep 1 | ||
55 | send -- "firemon --caps\r" | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 6\n";exit} | ||
58 | ":firejail transmission-gtk" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
62 | "CapBnd" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
66 | "0000000000000000" | ||
67 | } | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
70 | "name=blablabla" | ||
71 | } | ||
72 | sleep 1 | ||
73 | |||
74 | puts "\nall done\n" | ||
75 | |||