diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-23 16:16:51 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-23 16:16:51 -0400 |
commit | 7e1c057aeda3b598838cb66b9e827fc087f70c54 (patch) | |
tree | 6d13b82ed69f1d3a5b5973072e2b5cc3ea3eca16 /test/apps-x11/chromium.exp | |
parent | hexchat profile (diff) | |
download | firejail-7e1c057aeda3b598838cb66b9e827fc087f70c54.tar.gz firejail-7e1c057aeda3b598838cb66b9e827fc087f70c54.tar.zst firejail-7e1c057aeda3b598838cb66b9e827fc087f70c54.zip |
make testing
Diffstat (limited to 'test/apps-x11/chromium.exp')
-rwxr-xr-x | test/apps-x11/chromium.exp | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/test/apps-x11/chromium.exp b/test/apps-x11/chromium.exp new file mode 100755 index 000000000..11677a28f --- /dev/null +++ b/test/apps-x11/chromium.exp | |||
@@ -0,0 +1,85 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --name=test --x11 --net=br0 chromium www.gentoo.org\r" | ||
11 | sleep 10 | ||
12 | |||
13 | spawn $env(SHELL) | ||
14 | send -- "firejail --list\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 3\n";exit} | ||
17 | ":firejail" | ||
18 | } | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
21 | "chromium" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | # grsecurity exit | ||
26 | send -- "file /proc/sys/kernel/grsecurity\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR - grsecurity detection\n";exit} | ||
29 | "grsecurity: directory" {puts "grsecurity present, exiting...\n";exit} | ||
30 | "cannot open" {puts "grsecurity not present\n"} | ||
31 | } | ||
32 | send -- "firejail --name=blablabla\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 4\n";exit} | ||
35 | "Child process initialized" | ||
36 | } | ||
37 | sleep 2 | ||
38 | |||
39 | spawn $env(SHELL) | ||
40 | send -- "firemon --seccomp\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 5\n";exit} | ||
43 | ":firejail" | ||
44 | } | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 5.0\n";exit} | ||
47 | "chromium" | ||
48 | } | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
51 | "Seccomp: 0" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
55 | "name=blablabla" | ||
56 | } | ||
57 | sleep 1 | ||
58 | send -- "firemon --caps\r" | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 6\n";exit} | ||
61 | ":firejail" | ||
62 | } | ||
63 | expect { | ||
64 | timeout {puts "TESTING ERROR 6.0\n";exit} | ||
65 | "chromium" | ||
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 | "fffffffff" | ||
74 | } | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
77 | "name=blablabla" | ||
78 | } | ||
79 | sleep 1 | ||
80 | send -- "firejail --shutdown=test\r" | ||
81 | sleep 3 | ||
82 | |||
83 | |||
84 | puts "\nall done\n" | ||
85 | |||