diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-02 18:59:52 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-02 18:59:52 -0400 |
commit | c89bd3131770903c7121c271a7763b2ef1912272 (patch) | |
tree | b16afecd0a83554026d4a50355106fe12844b244 /test | |
parent | Merge pull request #406 from avoidr/cmus.profile (diff) | |
download | firejail-c89bd3131770903c7121c271a7763b2ef1912272.tar.gz firejail-c89bd3131770903c7121c271a7763b2ef1912272.tar.zst firejail-c89bd3131770903c7121c271a7763b2ef1912272.zip |
various fixes
Diffstat (limited to 'test')
-rwxr-xr-x | test/firefox-x11.exp | 14 | ||||
-rwxr-xr-x | test/firefox.exp | 14 | ||||
-rwxr-xr-x | test/test-profile.exp | 2 |
3 files changed, 27 insertions, 3 deletions
diff --git a/test/firefox-x11.exp b/test/firefox-x11.exp index c82408896..8bc7fbd25 100755 --- a/test/firefox-x11.exp +++ b/test/firefox-x11.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --name=test --x11 --net=br0 firefox www.gentoo.org\r" | 7 | send -- "firejail --name=test --x11 --net=br0 firefox -no-remote www.gentoo.org\r" |
8 | sleep 10 | 8 | sleep 10 |
9 | 9 | ||
10 | spawn $env(SHELL) | 10 | spawn $env(SHELL) |
@@ -18,6 +18,10 @@ expect { | |||
18 | "firefox" {puts "firefox detected\n";} | 18 | "firefox" {puts "firefox detected\n";} |
19 | "iceweasel" {puts "iceweasel detected\n";} | 19 | "iceweasel" {puts "iceweasel detected\n";} |
20 | } | 20 | } |
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
23 | "no-remote" | ||
24 | } | ||
21 | sleep 1 | 25 | sleep 1 |
22 | send -- "firejail --name=blablabla\r" | 26 | send -- "firejail --name=blablabla\r" |
23 | expect { | 27 | expect { |
@@ -34,6 +38,10 @@ expect { | |||
34 | " iceweasel" {puts "iceweasel detected\n";} | 38 | " iceweasel" {puts "iceweasel detected\n";} |
35 | } | 39 | } |
36 | expect { | 40 | expect { |
41 | timeout {puts "TESTING ERROR 5.0\n";exit} | ||
42 | "no-remote" | ||
43 | } | ||
44 | expect { | ||
37 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 45 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
38 | "Seccomp: 2" | 46 | "Seccomp: 2" |
39 | } | 47 | } |
@@ -49,6 +57,10 @@ expect { | |||
49 | " iceweasel" {puts "iceweasel detected\n";} | 57 | " iceweasel" {puts "iceweasel detected\n";} |
50 | } | 58 | } |
51 | expect { | 59 | expect { |
60 | timeout {puts "TESTING ERROR 6.0\n";exit} | ||
61 | "no-remote" | ||
62 | } | ||
63 | expect { | ||
52 | timeout {puts "TESTING ERROR 6.1\n";exit} | 64 | timeout {puts "TESTING ERROR 6.1\n";exit} |
53 | "CapBnd:" | 65 | "CapBnd:" |
54 | } | 66 | } |
diff --git a/test/firefox.exp b/test/firefox.exp index c2e64e04f..d531cf977 100755 --- a/test/firefox.exp +++ b/test/firefox.exp | |||
@@ -4,7 +4,7 @@ set timeout 10 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail firefox www.gentoo.org\r" | 7 | send -- "firejail firefox -no-remote www.gentoo.org\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Reading profile /etc/firejail/firefox.profile" | 10 | "Reading profile /etc/firejail/firefox.profile" |
@@ -26,6 +26,10 @@ expect { | |||
26 | "firefox" {puts "firefox detected\n";} | 26 | "firefox" {puts "firefox detected\n";} |
27 | "iceweasel" {puts "iceweasel detected\n";} | 27 | "iceweasel" {puts "iceweasel detected\n";} |
28 | } | 28 | } |
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
31 | "no-remote" | ||
32 | } | ||
29 | sleep 1 | 33 | sleep 1 |
30 | send -- "firejail --name=blablabla\r" | 34 | send -- "firejail --name=blablabla\r" |
31 | expect { | 35 | expect { |
@@ -42,6 +46,10 @@ expect { | |||
42 | " iceweasel" {puts "iceweasel detected\n";} | 46 | " iceweasel" {puts "iceweasel detected\n";} |
43 | } | 47 | } |
44 | expect { | 48 | expect { |
49 | timeout {puts "TESTING ERROR 5.0\n";exit} | ||
50 | "no-remote" | ||
51 | } | ||
52 | expect { | ||
45 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} | 53 | timeout {puts "TESTING ERROR 5.1 (seccomp)\n";exit} |
46 | "Seccomp: 2" | 54 | "Seccomp: 2" |
47 | } | 55 | } |
@@ -57,6 +65,10 @@ expect { | |||
57 | " iceweasel" {puts "iceweasel detected\n";} | 65 | " iceweasel" {puts "iceweasel detected\n";} |
58 | } | 66 | } |
59 | expect { | 67 | expect { |
68 | timeout {puts "TESTING ERROR 6.0\n";exit} | ||
69 | "no-remote" | ||
70 | } | ||
71 | expect { | ||
60 | timeout {puts "TESTING ERROR 6.1\n";exit} | 72 | timeout {puts "TESTING ERROR 6.1\n";exit} |
61 | "CapBnd:" | 73 | "CapBnd:" |
62 | } | 74 | } |
diff --git a/test/test-profile.exp b/test/test-profile.exp index 89fe9c10a..a03e8db31 100755 --- a/test/test-profile.exp +++ b/test/test-profile.exp | |||
@@ -10,7 +10,7 @@ if { $argc != 1 } { | |||
10 | exit | 10 | exit |
11 | } | 11 | } |
12 | 12 | ||
13 | send -- "firejail --profile=$argv\r" | 13 | send -- "firejail --profile=$argv /bin/bash\r" |
14 | expect { | 14 | expect { |
15 | timeout {puts "TESTING ERROR 0\n";exit} | 15 | timeout {puts "TESTING ERROR 0\n";exit} |
16 | "Child process initialized" | 16 | "Child process initialized" |