diff options
Diffstat (limited to 'test/firefox-x11.exp')
-rwxr-xr-x | test/firefox-x11.exp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/test/firefox-x11.exp b/test/firefox-x11.exp new file mode 100755 index 000000000..c82408896 --- /dev/null +++ b/test/firefox-x11.exp | |||
@@ -0,0 +1,68 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=test --x11 --net=br0 firefox www.gentoo.org\r" | ||
8 | sleep 10 | ||
9 | |||
10 | spawn $env(SHELL) | ||
11 | send -- "firejail --list\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 3\n";exit} | ||
14 | ":firejail" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
18 | "firefox" {puts "firefox detected\n";} | ||
19 | "iceweasel" {puts "iceweasel detected\n";} | ||
20 | } | ||
21 | sleep 1 | ||
22 | send -- "firejail --name=blablabla\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "Child process initialized" | ||
26 | } | ||
27 | sleep 2 | ||
28 | |||
29 | spawn $env(SHELL) | ||
30 | send -- "firemon --seccomp\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 5\n";exit} | ||
33 | " firefox" {puts "firefox detected\n";} | ||
34 | " iceweasel" {puts "iceweasel detected\n";} | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | ||
38 | "Seccomp: 2" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
42 | "name=blablabla" | ||
43 | } | ||
44 | sleep 1 | ||
45 | send -- "firemon --caps\r" | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 6\n";exit} | ||
48 | " firefox" {puts "firefox detected\n";} | ||
49 | " iceweasel" {puts "iceweasel detected\n";} | ||
50 | } | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 6.1\n";exit} | ||
53 | "CapBnd:" | ||
54 | } | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 6.2\n";exit} | ||
57 | "0000000000000000" | ||
58 | } | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 6.3\n";exit} | ||
61 | "name=blablabla" | ||
62 | } | ||
63 | sleep 1 | ||
64 | send -- "firejail --shutdown=test\r" | ||
65 | sleep 3 | ||
66 | |||
67 | puts "\nall done\n" | ||
68 | |||