diff options
Diffstat (limited to 'test/features')
-rwxr-xr-x | test/features/1.1.exp | 31 | ||||
-rwxr-xr-x | test/features/1.10.exp | 38 | ||||
-rwxr-xr-x | test/features/1.2.exp | 79 | ||||
-rwxr-xr-x | test/features/1.4.exp | 55 | ||||
-rwxr-xr-x | test/features/1.5.exp | 31 | ||||
-rwxr-xr-x | test/features/1.6.exp | 31 | ||||
-rwxr-xr-x | test/features/1.7.exp | 31 | ||||
-rwxr-xr-x | test/features/1.8.exp | 43 | ||||
-rwxr-xr-x | test/features/2.1.exp | 63 | ||||
-rwxr-xr-x | test/features/2.2.exp | 47 | ||||
-rwxr-xr-x | test/features/2.3.exp | 183 | ||||
-rwxr-xr-x | test/features/2.4.exp | 148 | ||||
-rwxr-xr-x | test/features/2.5.exp | 55 | ||||
-rwxr-xr-x | test/features/2.6.exp | 31 | ||||
-rwxr-xr-x | test/features/3.1.exp | 31 | ||||
-rwxr-xr-x | test/features/3.2.exp | 31 | ||||
-rwxr-xr-x | test/features/3.3.exp | 31 | ||||
-rwxr-xr-x | test/features/3.4.exp | 31 | ||||
-rwxr-xr-x | test/features/test.sh | 53 |
19 files changed, 558 insertions, 485 deletions
diff --git a/test/features/1.1.exp b/test/features/1.1.exp index 06c42c815..dafa4630e 100755 --- a/test/features/1.1.exp +++ b/test/features/1.1.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -30,21 +31,23 @@ sleep 1 | |||
30 | # | 31 | # |
31 | # O | 32 | # O |
32 | # | 33 | # |
33 | send -- "firejail --noprofile --overlay\r" | 34 | if { $overlay == "overlay" } { |
34 | expect { | 35 | send -- "firejail --noprofile --overlay\r" |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 36 | expect { |
36 | "Child process initialized" | 37 | timeout {puts "TESTING ERROR 2\n";exit} |
38 | "Child process initialized" | ||
39 | } | ||
40 | sleep 1 | ||
41 | |||
42 | send -- "ls -l /boot\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "Permission denied" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
37 | } | 50 | } |
38 | sleep 1 | ||
39 | |||
40 | send -- "ls -l /boot\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 3\n";exit} | ||
43 | "Permission denied" | ||
44 | } | ||
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | 51 | ||
49 | # | 52 | # |
50 | # C | 53 | # C |
diff --git a/test/features/1.10.exp b/test/features/1.10.exp index a6e0f9281..96e3c38d1 100755 --- a/test/features/1.10.exp +++ b/test/features/1.10.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -20,7 +21,8 @@ sleep 1 | |||
20 | send -- "ls -l /selinux\r" | 21 | send -- "ls -l /selinux\r" |
21 | expect { | 22 | expect { |
22 | timeout {puts "TESTING ERROR 1\n";exit} | 23 | timeout {puts "TESTING ERROR 1\n";exit} |
23 | "Permission denied" | 24 | "Permission denied" {puts "denied\n"} |
25 | "No such file or directory" {puts "no file\n"} | ||
24 | } | 26 | } |
25 | after 100 | 27 | after 100 |
26 | send -- "exit\r" | 28 | send -- "exit\r" |
@@ -30,21 +32,24 @@ sleep 1 | |||
30 | # | 32 | # |
31 | # O | 33 | # O |
32 | # | 34 | # |
33 | send -- "firejail --noprofile --overlay\r" | 35 | if { $overlay == "overlay" } { |
34 | expect { | 36 | send -- "firejail --noprofile --overlay\r" |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 37 | expect { |
36 | "Child process initialized" | 38 | timeout {puts "TESTING ERROR 2\n";exit} |
37 | } | 39 | "Child process initialized" |
38 | sleep 1 | 40 | } |
39 | 41 | sleep 1 | |
40 | send -- "ls -l /selinux\r" | 42 | |
41 | expect { | 43 | send -- "ls -l /selinux\r" |
42 | timeout {puts "TESTING ERROR 3\n";exit} | 44 | expect { |
43 | "Permission denied" | 45 | timeout {puts "TESTING ERROR 3\n";exit} |
46 | "Permission denied" {puts "denied\n"} | ||
47 | "No such file or directory" {puts "no file\n"} | ||
48 | } | ||
49 | after 100 | ||
50 | send -- "exit\r" | ||
51 | sleep 1 | ||
44 | } | 52 | } |
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | 53 | ||
49 | # | 54 | # |
50 | # C | 55 | # C |
@@ -59,7 +64,8 @@ sleep 1 | |||
59 | send -- "ls -l /selinux\r" | 64 | send -- "ls -l /selinux\r" |
60 | expect { | 65 | expect { |
61 | timeout {puts "TESTING ERROR 5\n";exit} | 66 | timeout {puts "TESTING ERROR 5\n";exit} |
62 | "Permission denied" | 67 | "Permission denied" {puts "denied\n"} |
68 | "No such file or directory" {puts "no file\n"} | ||
63 | } | 69 | } |
64 | after 100 | 70 | after 100 |
65 | send -- "exit\r" | 71 | send -- "exit\r" |
diff --git a/test/features/1.2.exp b/test/features/1.2.exp index 399e9948b..d487537e4 100755 --- a/test/features/1.2.exp +++ b/test/features/1.2.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -54,45 +55,47 @@ sleep 1 | |||
54 | # | 55 | # |
55 | # O | 56 | # O |
56 | # | 57 | # |
57 | send -- "firejail --noprofile --overlay\r" | 58 | if { $overlay == "overlay" } { |
58 | expect { | 59 | send -- "firejail --noprofile --overlay\r" |
59 | timeout {puts "TESTING ERROR 2\n";exit} | 60 | expect { |
60 | "Child process initialized" | 61 | timeout {puts "TESTING ERROR 2\n";exit} |
61 | } | 62 | "Child process initialized" |
62 | sleep 1 | 63 | } |
63 | 64 | sleep 1 | |
64 | send -- "cat /proc/mounts | grep proc\r" | 65 | |
65 | expect { | 66 | send -- "cat /proc/mounts | grep proc\r" |
66 | timeout {puts "TESTING ERROR 3.1\n";exit} | 67 | expect { |
67 | "proc /proc proc" | 68 | timeout {puts "TESTING ERROR 3.1\n";exit} |
69 | "proc /proc proc" | ||
70 | } | ||
71 | expect { | ||
72 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
73 | "proc /proc proc" | ||
74 | } | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
77 | "proc /proc/sys proc" | ||
78 | } | ||
79 | expect { | ||
80 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
81 | "proc /proc/sysrq-trigger proc" | ||
82 | } | ||
83 | expect { | ||
84 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
85 | "proc /proc/sys/kernel/hotplug" | ||
86 | } | ||
87 | expect { | ||
88 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
89 | "proc /proc/irq proc" | ||
90 | } | ||
91 | expect { | ||
92 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
93 | "proc /proc/bus proc" | ||
94 | } | ||
95 | after 100 | ||
96 | send -- "exit\r" | ||
97 | sleep 1 | ||
68 | } | 98 | } |
69 | expect { | ||
70 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
71 | "proc /proc proc" | ||
72 | } | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
75 | "proc /proc/sys proc" | ||
76 | } | ||
77 | expect { | ||
78 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
79 | "proc /proc/sysrq-trigger proc" | ||
80 | } | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
83 | "proc /proc/sys/kernel/hotplug" | ||
84 | } | ||
85 | expect { | ||
86 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
87 | "proc /proc/irq proc" | ||
88 | } | ||
89 | expect { | ||
90 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
91 | "proc /proc/bus proc" | ||
92 | } | ||
93 | after 100 | ||
94 | send -- "exit\r" | ||
95 | sleep 1 | ||
96 | 99 | ||
97 | # | 100 | # |
98 | # C | 101 | # C |
diff --git a/test/features/1.4.exp b/test/features/1.4.exp index 82d683175..113a328c9 100755 --- a/test/features/1.4.exp +++ b/test/features/1.4.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -43,33 +44,35 @@ sleep 1 | |||
43 | # | 44 | # |
44 | # O | 45 | # O |
45 | # | 46 | # |
46 | send -- "firejail --noprofile --overlay\r" | 47 | if { $overlay == "overlay" } { |
47 | expect { | 48 | send -- "firejail --noprofile --overlay\r" |
48 | timeout {puts "TESTING ERROR 2\n";exit} | 49 | expect { |
49 | "Child process initialized" | 50 | timeout {puts "TESTING ERROR 2\n";exit} |
51 | "Child process initialized" | ||
52 | } | ||
53 | sleep 1 | ||
54 | |||
55 | send -- "ls -l /home | wc -l\r" | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 3\n";exit} | ||
58 | "2" | ||
59 | } | ||
60 | after 100 | ||
61 | send -- "cat /etc/passwd | grep 1001 | wc -l\r" | ||
62 | expect { | ||
63 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
64 | "0" | ||
65 | } | ||
66 | after 100 | ||
67 | send -- "cat /etc/group | grep 1001 | wc -l\r" | ||
68 | expect { | ||
69 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
70 | "0" | ||
71 | } | ||
72 | after 100 | ||
73 | send -- "exit\r" | ||
74 | sleep 1 | ||
50 | } | 75 | } |
51 | sleep 1 | ||
52 | |||
53 | send -- "ls -l /home | wc -l\r" | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 3\n";exit} | ||
56 | "2" | ||
57 | } | ||
58 | after 100 | ||
59 | send -- "cat /etc/passwd | grep 1001 | wc -l\r" | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
62 | "0" | ||
63 | } | ||
64 | after 100 | ||
65 | send -- "cat /etc/group | grep 1001 | wc -l\r" | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
68 | "0" | ||
69 | } | ||
70 | after 100 | ||
71 | send -- "exit\r" | ||
72 | sleep 1 | ||
73 | 76 | ||
74 | # | 77 | # |
75 | # C | 78 | # C |
diff --git a/test/features/1.5.exp b/test/features/1.5.exp index 84c00937f..5a2643ede 100755 --- a/test/features/1.5.exp +++ b/test/features/1.5.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -30,21 +31,23 @@ sleep 1 | |||
30 | # | 31 | # |
31 | # O | 32 | # O |
32 | # | 33 | # |
33 | send -- "firejail --noprofile --overlay\r" | 34 | if { $overlay == "overlay" } { |
34 | expect { | 35 | send -- "firejail --noprofile --overlay\r" |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 36 | expect { |
36 | "Child process initialized" | 37 | timeout {puts "TESTING ERROR 2\n";exit} |
38 | "Child process initialized" | ||
39 | } | ||
40 | sleep 1 | ||
41 | |||
42 | send -- "ps aux | wc -l \r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "5" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
37 | } | 50 | } |
38 | sleep 1 | ||
39 | |||
40 | send -- "ps aux | wc -l \r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 3\n";exit} | ||
43 | "5" | ||
44 | } | ||
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | 51 | ||
49 | # | 52 | # |
50 | # C | 53 | # C |
diff --git a/test/features/1.6.exp b/test/features/1.6.exp index 0a4b788b8..8ed20fa46 100755 --- a/test/features/1.6.exp +++ b/test/features/1.6.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -30,21 +31,23 @@ sleep 1 | |||
30 | # | 31 | # |
31 | # O | 32 | # O |
32 | # | 33 | # |
33 | send -- "firejail --noprofile --overlay\r" | 34 | if { $overlay == "overlay" } { |
34 | expect { | 35 | send -- "firejail --noprofile --overlay\r" |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 36 | expect { |
36 | "Child process initialized" | 37 | timeout {puts "TESTING ERROR 2\n";exit} |
38 | "Child process initialized" | ||
39 | } | ||
40 | sleep 1 | ||
41 | |||
42 | send -- "ls -l /var/log/syslog | wc -l\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "0" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
37 | } | 50 | } |
38 | sleep 1 | ||
39 | |||
40 | send -- "ls -l /var/log/syslog | wc -l\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 3\n";exit} | ||
43 | "0" | ||
44 | } | ||
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | 51 | ||
49 | # | 52 | # |
50 | # C | 53 | # C |
diff --git a/test/features/1.7.exp b/test/features/1.7.exp index c95184fd1..35351b7d9 100755 --- a/test/features/1.7.exp +++ b/test/features/1.7.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -32,21 +33,23 @@ sleep 1 | |||
32 | # | 33 | # |
33 | # O | 34 | # O |
34 | # | 35 | # |
35 | send -- "firejail --noprofile --overlay\r" | 36 | if { $overlay == "overlay" } { |
36 | expect { | 37 | send -- "firejail --noprofile --overlay\r" |
37 | timeout {puts "TESTING ERROR 2\n";exit} | 38 | expect { |
38 | "Child process initialized" | 39 | timeout {puts "TESTING ERROR 2\n";exit} |
40 | "Child process initialized" | ||
41 | } | ||
42 | sleep 1 | ||
43 | |||
44 | send -- "ls -l /var/tmp/somefile | wc -l\r" | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 3\n";exit} | ||
47 | "0" | ||
48 | } | ||
49 | after 100 | ||
50 | send -- "exit\r" | ||
51 | sleep 1 | ||
39 | } | 52 | } |
40 | sleep 1 | ||
41 | |||
42 | send -- "ls -l /var/tmp/somefile | wc -l\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "0" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
50 | 53 | ||
51 | # | 54 | # |
52 | # C | 55 | # C |
diff --git a/test/features/1.8.exp b/test/features/1.8.exp index aefe9d8c5..293864671 100755 --- a/test/features/1.8.exp +++ b/test/features/1.8.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -37,27 +38,29 @@ sleep 1 | |||
37 | # | 38 | # |
38 | # O | 39 | # O |
39 | # | 40 | # |
40 | send -- "firejail --noprofile --overlay\r" | 41 | if { $overlay == "overlay" } { |
41 | expect { | 42 | send -- "firejail --noprofile --overlay\r" |
42 | timeout {puts "TESTING ERROR 2\n";exit} | 43 | expect { |
43 | "Child process initialized" | 44 | timeout {puts "TESTING ERROR 2\n";exit} |
44 | } | 45 | "Child process initialized" |
45 | sleep 1 | 46 | } |
46 | send -- "ls /etc/firejail\r" | 47 | sleep 1 |
47 | expect { | 48 | send -- "ls /etc/firejail\r" |
48 | timeout {puts "TESTING ERROR 3\n";exit} | 49 | expect { |
49 | "Permission denied" | 50 | timeout {puts "TESTING ERROR 3\n";exit} |
50 | } | 51 | "Permission denied" |
51 | after 100 | 52 | } |
52 | send -- "ls ~/.config/firejail\r" | 53 | after 100 |
53 | expect { | 54 | send -- "ls ~/.config/firejail\r" |
54 | timeout {puts "TESTING ERROR 3.1\n";exit} | 55 | expect { |
55 | "Permission denied" | 56 | timeout {puts "TESTING ERROR 3.1\n";exit} |
57 | "Permission denied" | ||
58 | } | ||
59 | after 100 | ||
60 | |||
61 | send -- "exit\r" | ||
62 | sleep 1 | ||
56 | } | 63 | } |
57 | after 100 | ||
58 | |||
59 | send -- "exit\r" | ||
60 | sleep 1 | ||
61 | 64 | ||
62 | # | 65 | # |
63 | # C | 66 | # C |
diff --git a/test/features/2.1.exp b/test/features/2.1.exp index a2ae321ce..5f188988b 100755 --- a/test/features/2.1.exp +++ b/test/features/2.1.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -46,37 +47,39 @@ sleep 1 | |||
46 | # | 47 | # |
47 | # O | 48 | # O |
48 | # | 49 | # |
49 | send -- "firejail --noprofile --hostname=bingo --overlay\r" | 50 | if { $overlay == "overlay" } { |
50 | expect { | 51 | send -- "firejail --noprofile --hostname=bingo --overlay\r" |
51 | timeout {puts "TESTING ERROR 2\n";exit} | 52 | expect { |
52 | "Child process initialized" | 53 | timeout {puts "TESTING ERROR 2\n";exit} |
53 | } | 54 | "Child process initialized" |
54 | sleep 1 | 55 | } |
55 | 56 | sleep 1 | |
56 | send -- "hostname\r" | 57 | |
57 | expect { | 58 | send -- "hostname\r" |
58 | timeout {puts "TESTING ERROR 3\n";exit} | 59 | expect { |
59 | "bingo" | 60 | timeout {puts "TESTING ERROR 3\n";exit} |
60 | } | 61 | "bingo" |
61 | after 100 | 62 | } |
62 | send -- "cat /etc/hostname\r" | 63 | after 100 |
63 | expect { | 64 | send -- "cat /etc/hostname\r" |
64 | timeout {puts "TESTING ERROR 3.0\n";exit} | 65 | expect { |
65 | "bingo" | 66 | timeout {puts "TESTING ERROR 3.0\n";exit} |
66 | } | 67 | "bingo" |
67 | after 100 | 68 | } |
68 | send -- "getent hosts bingo\r" | 69 | after 100 |
69 | expect { | 70 | send -- "getent hosts bingo\r" |
70 | timeout {puts "TESTING ERROR 3.1\n";exit} | 71 | expect { |
71 | "127.0.0.1" | 72 | timeout {puts "TESTING ERROR 3.1\n";exit} |
73 | "127.0.0.1" | ||
74 | } | ||
75 | expect { | ||
76 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
77 | "bingo" | ||
78 | } | ||
79 | after 100 | ||
80 | send -- "exit\r" | ||
81 | sleep 1 | ||
72 | } | 82 | } |
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
75 | "bingo" | ||
76 | } | ||
77 | after 100 | ||
78 | send -- "exit\r" | ||
79 | sleep 1 | ||
80 | 83 | ||
81 | # | 84 | # |
82 | # C | 85 | # C |
diff --git a/test/features/2.2.exp b/test/features/2.2.exp index c562328fd..186da98fb 100755 --- a/test/features/2.2.exp +++ b/test/features/2.2.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -38,29 +39,31 @@ sleep 1 | |||
38 | # | 39 | # |
39 | # O | 40 | # O |
40 | # | 41 | # |
41 | send -- "firejail --noprofile --dns=4.2.2.1 --overlay\r" | 42 | if { $overlay == "overlay" } { |
42 | expect { | 43 | send -- "firejail --noprofile --dns=4.2.2.1 --overlay\r" |
43 | timeout {puts "TESTING ERROR 2\n";exit} | 44 | expect { |
44 | "Child process initialized" | 45 | timeout {puts "TESTING ERROR 2\n";exit} |
46 | "Child process initialized" | ||
47 | } | ||
48 | sleep 1 | ||
49 | |||
50 | send -- "dig google.com\r" | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 3\n";exit} | ||
53 | "ANSWER SECTION" | ||
54 | } | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
57 | "google.com" | ||
58 | } | ||
59 | expect { | ||
60 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
61 | "SERVER: 4.2.2.1" | ||
62 | } | ||
63 | after 100 | ||
64 | send -- "exit\r" | ||
65 | sleep 1 | ||
45 | } | 66 | } |
46 | sleep 1 | ||
47 | |||
48 | send -- "dig google.com\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 3\n";exit} | ||
51 | "ANSWER SECTION" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
55 | "google.com" | ||
56 | } | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
59 | "SERVER: 4.2.2.1" | ||
60 | } | ||
61 | after 100 | ||
62 | send -- "exit\r" | ||
63 | sleep 1 | ||
64 | 67 | ||
65 | # | 68 | # |
66 | # C | 69 | # C |
diff --git a/test/features/2.3.exp b/test/features/2.3.exp index dd4bdace7..9201696c2 100755 --- a/test/features/2.3.exp +++ b/test/features/2.3.exp | |||
@@ -6,11 +6,12 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
12 | # | 13 | # |
13 | send -- "firejail --noprofile --net=eth0\r" | 14 | send -- "firejail --noprofile --net=eth0 --dns=8.8.8.8 --dns=8.8.4.4\r" |
14 | expect { | 15 | expect { |
15 | timeout {puts "TESTING ERROR 0\n";exit} | 16 | timeout {puts "TESTING ERROR 0\n";exit} |
16 | "Child process initialized" | 17 | "Child process initialized" |
@@ -54,7 +55,7 @@ after 100 | |||
54 | send -- "exit\r" | 55 | send -- "exit\r" |
55 | sleep 3 | 56 | sleep 3 |
56 | 57 | ||
57 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244\r" | 58 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --dns=8.8.8.8 --dns=8.8.4.4\r" |
58 | expect { | 59 | expect { |
59 | timeout {puts "TESTING ERROR 0\n";exit} | 60 | timeout {puts "TESTING ERROR 0\n";exit} |
60 | "Child process initialized" | 61 | "Child process initialized" |
@@ -101,99 +102,101 @@ sleep 3 | |||
101 | # | 102 | # |
102 | # O | 103 | # O |
103 | # | 104 | # |
104 | send -- "firejail --noprofile --net=eth0 --overlay\r" | 105 | if { $overlay == "overlay" } { |
105 | expect { | 106 | send -- "firejail --noprofile --net=eth0 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" |
106 | timeout {puts "TESTING ERROR 2\n";exit} | 107 | expect { |
107 | "Child process initialized" | 108 | timeout {puts "TESTING ERROR 2\n";exit} |
108 | } | 109 | "Child process initialized" |
109 | sleep 1 | 110 | } |
110 | 111 | sleep 1 | |
111 | send -- "dig google.com\r" | 112 | |
112 | expect { | 113 | send -- "dig google.com\r" |
113 | timeout {puts "TESTING ERROR 3\n";exit} | 114 | expect { |
114 | "ANSWER SECTION" | 115 | timeout {puts "TESTING ERROR 3\n";exit} |
115 | } | 116 | "ANSWER SECTION" |
116 | expect { | 117 | } |
117 | timeout {puts "TESTING ERROR 3.1\n";exit} | 118 | expect { |
118 | "google.com" | 119 | timeout {puts "TESTING ERROR 3.1\n";exit} |
119 | } | 120 | "google.com" |
120 | expect { | 121 | } |
121 | timeout {puts "TESTING ERROR 3.3\n";exit} | 122 | expect { |
122 | "SERVER" | 123 | timeout {puts "TESTING ERROR 3.3\n";exit} |
123 | } | 124 | "SERVER" |
124 | after 100 | 125 | } |
125 | 126 | after 100 | |
126 | send -- "/sbin/ifconfig\r" | 127 | |
127 | expect { | 128 | send -- "/sbin/ifconfig\r" |
128 | timeout {puts "TESTING ERROR 3.4\n";exit} | 129 | expect { |
129 | "eth0" | 130 | timeout {puts "TESTING ERROR 3.4\n";exit} |
130 | } | 131 | "eth0" |
131 | expect { | 132 | } |
132 | timeout {puts "TESTING ERROR 3.5\n";exit} | 133 | expect { |
133 | "Link" | 134 | timeout {puts "TESTING ERROR 3.5\n";exit} |
134 | } | 135 | "Link" |
135 | expect { | 136 | } |
136 | timeout {puts "TESTING ERROR 3.6\n";exit} | 137 | expect { |
137 | "192.168.1" | 138 | timeout {puts "TESTING ERROR 3.6\n";exit} |
138 | } | 139 | "192.168.1" |
139 | expect { | 140 | } |
140 | timeout {puts "TESTING ERROR 3.7\n";exit} | 141 | expect { |
141 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | 142 | timeout {puts "TESTING ERROR 3.7\n";exit} |
142 | } | 143 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" |
143 | after 100 | 144 | } |
144 | 145 | after 100 | |
145 | send -- "exit\r" | 146 | |
146 | sleep 3 | 147 | send -- "exit\r" |
147 | 148 | sleep 3 | |
148 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay\r" | 149 | |
149 | expect { | 150 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" |
150 | timeout {puts "TESTING ERROR 2\n";exit} | 151 | expect { |
151 | "Child process initialized" | 152 | timeout {puts "TESTING ERROR 2\n";exit} |
152 | } | 153 | "Child process initialized" |
153 | sleep 1 | 154 | } |
154 | 155 | sleep 1 | |
155 | send -- "dig google.com\r" | 156 | |
156 | expect { | 157 | send -- "dig google.com\r" |
157 | timeout {puts "TESTING ERROR 3\n";exit} | 158 | expect { |
158 | "ANSWER SECTION" | 159 | timeout {puts "TESTING ERROR 3\n";exit} |
160 | "ANSWER SECTION" | ||
161 | } | ||
162 | expect { | ||
163 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
164 | "google.com" | ||
165 | } | ||
166 | expect { | ||
167 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
168 | "SERVER" | ||
169 | } | ||
170 | after 100 | ||
171 | |||
172 | send -- "/sbin/ifconfig\r" | ||
173 | expect { | ||
174 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
175 | "eth0" | ||
176 | } | ||
177 | expect { | ||
178 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
179 | "Link" | ||
180 | } | ||
181 | expect { | ||
182 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
183 | "192.168.1.244" | ||
184 | } | ||
185 | expect { | ||
186 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
187 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
188 | } | ||
189 | after 100 | ||
190 | |||
191 | send -- "exit\r" | ||
192 | sleep 3 | ||
159 | } | 193 | } |
160 | expect { | ||
161 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
162 | "google.com" | ||
163 | } | ||
164 | expect { | ||
165 | timeout {puts "TESTING ERROR 3.3\n";exit} | ||
166 | "SERVER" | ||
167 | } | ||
168 | after 100 | ||
169 | |||
170 | send -- "/sbin/ifconfig\r" | ||
171 | expect { | ||
172 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
173 | "eth0" | ||
174 | } | ||
175 | expect { | ||
176 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
177 | "Link" | ||
178 | } | ||
179 | expect { | ||
180 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
181 | "192.168.1.244" | ||
182 | } | ||
183 | expect { | ||
184 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
185 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
186 | } | ||
187 | after 100 | ||
188 | |||
189 | send -- "exit\r" | ||
190 | sleep 3 | ||
191 | 194 | ||
192 | 195 | ||
193 | # | 196 | # |
194 | # C | 197 | # C |
195 | # | 198 | # |
196 | send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot\r" | 199 | send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" |
197 | expect { | 200 | expect { |
198 | timeout {puts "TESTING ERROR 4\n";exit} | 201 | timeout {puts "TESTING ERROR 4\n";exit} |
199 | "Child process initialized" | 202 | "Child process initialized" |
@@ -237,7 +240,7 @@ after 100 | |||
237 | send -- "exit\r" | 240 | send -- "exit\r" |
238 | sleep 3 | 241 | sleep 3 |
239 | 242 | ||
240 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot\r" | 243 | send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" |
241 | expect { | 244 | expect { |
242 | timeout {puts "TESTING ERROR 4\n";exit} | 245 | timeout {puts "TESTING ERROR 4\n";exit} |
243 | "Child process initialized" | 246 | "Child process initialized" |
diff --git a/test/features/2.4.exp b/test/features/2.4.exp index a995322b9..424d4fead 100755 --- a/test/features/2.4.exp +++ b/test/features/2.4.exp | |||
@@ -7,6 +7,7 @@ | |||
7 | set timeout 10 | 7 | set timeout 10 |
8 | spawn $env(SHELL) | 8 | spawn $env(SHELL) |
9 | match_max 100000 | 9 | match_max 100000 |
10 | set overlay [lindex $argv 0] | ||
10 | 11 | ||
11 | # | 12 | # |
12 | # N | 13 | # N |
@@ -89,80 +90,81 @@ sleep 1 | |||
89 | # | 90 | # |
90 | # O | 91 | # O |
91 | # | 92 | # |
92 | send -- "firejail --noprofile --net=br0 --overlay\r" | 93 | if { $overlay == "overlay" } { |
93 | expect { | 94 | send -- "firejail --noprofile --net=br0 --overlay\r" |
94 | timeout {puts "TESTING ERROR 2\n";exit} | 95 | expect { |
95 | "Child process initialized" | 96 | timeout {puts "TESTING ERROR 2\n";exit} |
96 | } | 97 | "Child process initialized" |
97 | sleep 1 | 98 | } |
98 | 99 | sleep 1 | |
99 | send -- "ping -c 3 10.10.20.1\r" | 100 | |
100 | expect { | 101 | send -- "ping -c 3 10.10.20.1\r" |
101 | timeout {puts "TESTING ERROR 3\n";exit} | 102 | expect { |
102 | " packets transmitted, 3 received, 0% packet loss" | 103 | timeout {puts "TESTING ERROR 3\n";exit} |
103 | } | 104 | " packets transmitted, 3 received, 0% packet loss" |
104 | sleep 1 | 105 | } |
105 | 106 | sleep 1 | |
106 | 107 | ||
107 | send -- "/sbin/ifconfig\r" | 108 | |
108 | expect { | 109 | send -- "/sbin/ifconfig\r" |
109 | timeout {puts "TESTING ERROR 3.4\n";exit} | 110 | expect { |
110 | "eth0" | 111 | timeout {puts "TESTING ERROR 3.4\n";exit} |
112 | "eth0" | ||
113 | } | ||
114 | expect { | ||
115 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
116 | "Link" | ||
117 | } | ||
118 | expect { | ||
119 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
120 | "10.10.20" | ||
121 | } | ||
122 | expect { | ||
123 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
124 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
125 | } | ||
126 | after 100 | ||
127 | |||
128 | send -- "exit\r" | ||
129 | sleep 1 | ||
130 | |||
131 | send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r" | ||
132 | expect { | ||
133 | timeout {puts "TESTING ERROR 2\n";exit} | ||
134 | "Child process initialized" | ||
135 | } | ||
136 | sleep 1 | ||
137 | |||
138 | send -- "ping -c 3 10.10.20.1\r" | ||
139 | expect { | ||
140 | timeout {puts "TESTING ERROR 3\n";exit} | ||
141 | " packets transmitted, 3 received, 0% packet loss" | ||
142 | } | ||
143 | sleep 1 | ||
144 | |||
145 | |||
146 | send -- "/sbin/ifconfig\r" | ||
147 | expect { | ||
148 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
149 | "eth0" | ||
150 | } | ||
151 | expect { | ||
152 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
153 | "Link" | ||
154 | } | ||
155 | expect { | ||
156 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
157 | "10.10.20.4" | ||
158 | } | ||
159 | expect { | ||
160 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
161 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
162 | } | ||
163 | after 100 | ||
164 | |||
165 | send -- "exit\r" | ||
166 | sleep 1 | ||
111 | } | 167 | } |
112 | expect { | ||
113 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
114 | "Link" | ||
115 | } | ||
116 | expect { | ||
117 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
118 | "10.10.20" | ||
119 | } | ||
120 | expect { | ||
121 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
122 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
123 | } | ||
124 | after 100 | ||
125 | |||
126 | send -- "exit\r" | ||
127 | sleep 1 | ||
128 | |||
129 | send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r" | ||
130 | expect { | ||
131 | timeout {puts "TESTING ERROR 2\n";exit} | ||
132 | "Child process initialized" | ||
133 | } | ||
134 | sleep 1 | ||
135 | |||
136 | send -- "ping -c 3 10.10.20.1\r" | ||
137 | expect { | ||
138 | timeout {puts "TESTING ERROR 3\n";exit} | ||
139 | " packets transmitted, 3 received, 0% packet loss" | ||
140 | } | ||
141 | sleep 1 | ||
142 | |||
143 | |||
144 | send -- "/sbin/ifconfig\r" | ||
145 | expect { | ||
146 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
147 | "eth0" | ||
148 | } | ||
149 | expect { | ||
150 | timeout {puts "TESTING ERROR 3.5\n";exit} | ||
151 | "Link" | ||
152 | } | ||
153 | expect { | ||
154 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
155 | "10.10.20.4" | ||
156 | } | ||
157 | expect { | ||
158 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
159 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
160 | } | ||
161 | after 100 | ||
162 | |||
163 | send -- "exit\r" | ||
164 | sleep 1 | ||
165 | |||
166 | 168 | ||
167 | 169 | ||
168 | # | 170 | # |
diff --git a/test/features/2.5.exp b/test/features/2.5.exp index 4ba1f5a28..e189f145b 100755 --- a/test/features/2.5.exp +++ b/test/features/2.5.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -41,33 +42,35 @@ sleep 1 | |||
41 | # | 42 | # |
42 | # O | 43 | # O |
43 | # | 44 | # |
44 | send -- "firejail --noprofile --overlay --interface=eth0.6\r" | 45 | if { $overlay == "overlay" } { |
45 | expect { | 46 | send -- "firejail --noprofile --overlay --interface=eth0.6\r" |
46 | timeout {puts "TESTING ERROR 2\n";exit} | 47 | expect { |
47 | "Child process initialized" | 48 | timeout {puts "TESTING ERROR 2\n";exit} |
48 | } | 49 | "Child process initialized" |
49 | sleep 1 | 50 | } |
50 | 51 | sleep 1 | |
51 | send -- "/sbin/ifconfig\r" | 52 | |
52 | expect { | 53 | send -- "/sbin/ifconfig\r" |
53 | timeout {puts "TESTING ERROR 3.4\n";exit} | 54 | expect { |
54 | "eth0.6" | 55 | timeout {puts "TESTING ERROR 3.4\n";exit} |
55 | } | 56 | "eth0.6" |
56 | expect { | 57 | } |
57 | timeout {puts "TESTING ERROR 3.5n";exit} | 58 | expect { |
58 | "Link" | 59 | timeout {puts "TESTING ERROR 3.5n";exit} |
59 | } | 60 | "Link" |
60 | expect { | 61 | } |
61 | timeout {puts "TESTING ERROR 3.6\n";exit} | 62 | expect { |
62 | "10.10.206.10" | 63 | timeout {puts "TESTING ERROR 3.6\n";exit} |
64 | "10.10.206.10" | ||
65 | } | ||
66 | expect { | ||
67 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
68 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
69 | } | ||
70 | after 100 | ||
71 | send -- "exit\r" | ||
72 | sleep 1 | ||
63 | } | 73 | } |
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
66 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
67 | } | ||
68 | after 100 | ||
69 | send -- "exit\r" | ||
70 | sleep 1 | ||
71 | 74 | ||
72 | # | 75 | # |
73 | # C | 76 | # C |
diff --git a/test/features/2.6.exp b/test/features/2.6.exp index dc2381393..77bd8cab0 100755 --- a/test/features/2.6.exp +++ b/test/features/2.6.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -29,21 +30,23 @@ sleep 1 | |||
29 | # | 30 | # |
30 | # O | 31 | # O |
31 | # | 32 | # |
32 | send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10\r" | 33 | if { $overlay == "overlay" } { |
33 | expect { | 34 | send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10\r" |
34 | timeout {puts "TESTING ERROR 2\n";exit} | 35 | expect { |
35 | "Child process initialized" | 36 | timeout {puts "TESTING ERROR 2\n";exit} |
37 | "Child process initialized" | ||
38 | } | ||
39 | sleep 1 | ||
40 | |||
41 | send -- "netstat -rn\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 3\n";exit} | ||
44 | "0.0.0.0 192.168.1.10" | ||
45 | } | ||
46 | after 100 | ||
47 | send -- "exit\r" | ||
48 | sleep 1 | ||
36 | } | 49 | } |
37 | sleep 1 | ||
38 | |||
39 | send -- "netstat -rn\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 3\n";exit} | ||
42 | "0.0.0.0 192.168.1.10" | ||
43 | } | ||
44 | after 100 | ||
45 | send -- "exit\r" | ||
46 | sleep 1 | ||
47 | 50 | ||
48 | # | 51 | # |
49 | # C | 52 | # C |
diff --git a/test/features/3.1.exp b/test/features/3.1.exp index 6abbf94a5..13ec1b6be 100755 --- a/test/features/3.1.exp +++ b/test/features/3.1.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -31,21 +32,23 @@ sleep 1 | |||
31 | # | 32 | # |
32 | # O | 33 | # O |
33 | # | 34 | # |
34 | send -- "firejail --noprofile --overlay --tmpfs=/home/netblue/.config\r" | 35 | if { $overlay == "overlay" } { |
35 | expect { | 36 | send -- "firejail --noprofile --overlay --tmpfs=/home/netblue/.config\r" |
36 | timeout {puts "TESTING ERROR 2\n";exit} | 37 | expect { |
37 | "Child process initialized" | 38 | timeout {puts "TESTING ERROR 2\n";exit} |
39 | "Child process initialized" | ||
40 | } | ||
41 | sleep 1 | ||
42 | |||
43 | send -- "ls ~/.config | wc -l\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 3\n";exit} | ||
46 | "0" | ||
47 | } | ||
48 | after 100 | ||
49 | send -- "exit\r" | ||
50 | sleep 1 | ||
38 | } | 51 | } |
39 | sleep 1 | ||
40 | |||
41 | send -- "ls ~/.config | wc -l\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 3\n";exit} | ||
44 | "0" | ||
45 | } | ||
46 | after 100 | ||
47 | send -- "exit\r" | ||
48 | sleep 1 | ||
49 | 52 | ||
50 | # | 53 | # |
51 | # C | 54 | # C |
diff --git a/test/features/3.2.exp b/test/features/3.2.exp index 44d9b73f3..49d8d27c1 100755 --- a/test/features/3.2.exp +++ b/test/features/3.2.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -31,21 +32,23 @@ sleep 1 | |||
31 | # | 32 | # |
32 | # O | 33 | # O |
33 | # | 34 | # |
34 | send -- "firejail --noprofile --overlay --read-only=/home/netblue/.config\r" | 35 | if { $overlay == "overlay" } { |
35 | expect { | 36 | send -- "firejail --noprofile --overlay --read-only=/home/netblue/.config\r" |
36 | timeout {puts "TESTING ERROR 2\n";exit} | 37 | expect { |
37 | "Child process initialized" | 38 | timeout {puts "TESTING ERROR 2\n";exit} |
39 | "Child process initialized" | ||
40 | } | ||
41 | sleep 1 | ||
42 | |||
43 | send -- "touch ~/.config/firejail-test-file\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 3\n";exit} | ||
46 | "Read-only file system" | ||
47 | } | ||
48 | after 100 | ||
49 | send -- "exit\r" | ||
50 | sleep 1 | ||
38 | } | 51 | } |
39 | sleep 1 | ||
40 | |||
41 | send -- "touch ~/.config/firejail-test-file\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 3\n";exit} | ||
44 | "Read-only file system" | ||
45 | } | ||
46 | after 100 | ||
47 | send -- "exit\r" | ||
48 | sleep 1 | ||
49 | 52 | ||
50 | # | 53 | # |
51 | # C | 54 | # C |
diff --git a/test/features/3.3.exp b/test/features/3.3.exp index 432a135d7..a53a4ade5 100755 --- a/test/features/3.3.exp +++ b/test/features/3.3.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -30,21 +31,23 @@ sleep 1 | |||
30 | # | 31 | # |
31 | # O | 32 | # O |
32 | # | 33 | # |
33 | send -- "firejail --noprofile --overlay --blacklist=/home/netblue/.config\r" | 34 | if { $overlay == "overlay" } { |
34 | expect { | 35 | send -- "firejail --noprofile --overlay --blacklist=/home/netblue/.config\r" |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 36 | expect { |
36 | "Child process initialized" | 37 | timeout {puts "TESTING ERROR 2\n";exit} |
38 | "Child process initialized" | ||
39 | } | ||
40 | sleep 1 | ||
41 | |||
42 | send -- "cd ~/.config\r" | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 3\n";exit} | ||
45 | "Permission denied" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
37 | } | 50 | } |
38 | sleep 1 | ||
39 | |||
40 | send -- "cd ~/.config\r" | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 3\n";exit} | ||
43 | "Permission denied" | ||
44 | } | ||
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | 51 | ||
49 | # | 52 | # |
50 | # C | 53 | # C |
diff --git a/test/features/3.4.exp b/test/features/3.4.exp index bc6e10733..da6dd3ff0 100755 --- a/test/features/3.4.exp +++ b/test/features/3.4.exp | |||
@@ -6,6 +6,7 @@ | |||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | set overlay [lindex $argv 0] | ||
9 | 10 | ||
10 | # | 11 | # |
11 | # N | 12 | # N |
@@ -30,21 +31,23 @@ sleep 1 | |||
30 | # | 31 | # |
31 | # O | 32 | # O |
32 | # | 33 | # |
33 | send -- "firejail --noprofile --overlay --whitelist=/home/netblue/.config\r" | 34 | if { $overlay == "overlay" } { |
34 | expect { | 35 | send -- "firejail --noprofile --overlay --whitelist=/home/netblue/.config\r" |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 36 | expect { |
36 | "Child process initialized" | 37 | timeout {puts "TESTING ERROR 2\n";exit} |
37 | } | 38 | "Child process initialized" |
38 | sleep 1 | 39 | } |
39 | 40 | sleep 1 | |
40 | send -- "ls -al ~/. | wc -l\r" | 41 | |
41 | expect { | 42 | send -- "ls -al ~/. | wc -l\r" |
42 | timeout {puts "TESTING ERROR 1\n";exit} | 43 | expect { |
43 | "6" | 44 | timeout {puts "TESTING ERROR 1\n";exit} |
45 | "6" | ||
46 | } | ||
47 | after 100 | ||
48 | send -- "exit\r" | ||
49 | sleep 1 | ||
44 | } | 50 | } |
45 | after 100 | ||
46 | send -- "exit\r" | ||
47 | sleep 1 | ||
48 | 51 | ||
49 | # | 52 | # |
50 | # C | 53 | # C |
diff --git a/test/features/test.sh b/test/features/test.sh index e49dfc3f0..b600cec31 100755 --- a/test/features/test.sh +++ b/test/features/test.sh | |||
@@ -1,4 +1,21 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | OVERLAY="overlay" | ||
3 | |||
4 | while [ $# -gt 0 ]; do # Until you run out of parameters . . . | ||
5 | case "$1" in | ||
6 | --nooverlay) | ||
7 | OVERLAY="" | ||
8 | ;; | ||
9 | --help) | ||
10 | echo "./test.sh [--nooverlay|--help] | grep TESTING" | ||
11 | exit | ||
12 | ;; | ||
13 | esac | ||
14 | shift # Check next set of parameters. | ||
15 | done | ||
16 | |||
17 | |||
18 | |||
2 | 19 | ||
3 | # | 20 | # |
4 | # Feature testing | 21 | # Feature testing |
@@ -6,57 +23,57 @@ | |||
6 | 23 | ||
7 | # Default features | 24 | # Default features |
8 | echo "TESTING: 1.1 disable /boot" | 25 | echo "TESTING: 1.1 disable /boot" |
9 | ./1.1.exp | 26 | ./1.1.exp $OVERLAY |
10 | 27 | ||
11 | echo "TESTING: 1.2 new /proc" | 28 | echo "TESTING: 1.2 new /proc" |
12 | ./1.2.exp | 29 | ./1.2.exp $OVERLAY |
13 | 30 | ||
14 | echo "TESTING: 1.4 mask other users" | 31 | echo "TESTING: 1.4 mask other users" |
15 | ./1.4.exp | 32 | ./1.4.exp $OVERLAY |
16 | 33 | ||
17 | echo "TESTING: 1.5 PID namespace" | 34 | echo "TESTING: 1.5 PID namespace" |
18 | ./1.5.exp | 35 | ./1.5.exp $OVERLAY |
19 | 36 | ||
20 | echo "TESTING: 1.6 new /var/log" | 37 | echo "TESTING: 1.6 new /var/log" |
21 | ./1.6.exp | 38 | ./1.6.exp $OVERLAY |
22 | 39 | ||
23 | echo "TESTING: 1.7 new /var/tmp" | 40 | echo "TESTING: 1.7 new /var/tmp" |
24 | ./1.7.exp | 41 | ./1.7.exp $OVERLAY |
25 | 42 | ||
26 | echo "TESTING: 1.8 disable /etc/firejail and ~/.config/firejail" | 43 | echo "TESTING: 1.8 disable /etc/firejail and ~/.config/firejail" |
27 | ./1.8.exp | 44 | ./1.8.exp $OVERLAY |
28 | 45 | ||
29 | echo "TESTING: 1.10 disable /selinux" | 46 | echo "TESTING: 1.10 disable /selinux" |
30 | ./1.10.exp | 47 | ./1.10.exp $OVERLAY |
31 | 48 | ||
32 | # networking features | 49 | # networking features |
33 | echo "TESTING: 2.1 hostname" | 50 | echo "TESTING: 2.1 hostname" |
34 | ./2.1.exp | 51 | ./2.1.exp $OVERLAY |
35 | 52 | ||
36 | echo "TESTING: 2.2 DNS" | 53 | echo "TESTING: 2.2 DNS" |
37 | ./2.2.exp | 54 | ./2.2.exp $OVERLAY |
38 | 55 | ||
39 | echo "TESTING: 2.3 mac-vlan" | 56 | echo "TESTING: 2.3 mac-vlan" |
40 | ./2.3.exp | 57 | ./2.3.exp $OVERLAY |
41 | 58 | ||
42 | echo "TESTING: 2.4 bridge" | 59 | echo "TESTING: 2.4 bridge" |
43 | ./2.4.exp | 60 | ./2.4.exp $OVERLAY |
44 | 61 | ||
45 | echo "TESTING: 2.5 interface" | 62 | echo "TESTING: 2.5 interface" |
46 | ./2.5.exp | 63 | ./2.5.exp $OVERLAY |
47 | 64 | ||
48 | echo "TESTING: 2.6 Default gateway" | 65 | echo "TESTING: 2.6 Default gateway" |
49 | ./2.6.exp | 66 | ./2.6.exp $OVERLAY |
50 | 67 | ||
51 | echo "TESTING: 3.1 tmpfs" | 68 | echo "TESTING: 3.1 tmpfs" |
52 | ./3.1.exp | 69 | ./3.1.exp $OVERLAY |
53 | 70 | ||
54 | echo "TESTING: 3.2 read-only" | 71 | echo "TESTING: 3.2 read-only" |
55 | ./3.2.exp | 72 | ./3.2.exp $OVERLAY |
56 | 73 | ||
57 | echo "TESTING: 3.3 blacklist" | 74 | echo "TESTING: 3.3 blacklist" |
58 | ./3.3.exp | 75 | ./3.3.exp $OVERLAY |
59 | 76 | ||
60 | echo "TESTING: 3.4 whitelist" | 77 | echo "TESTING: 3.4 whitelist" |
61 | ./3.4.exp | 78 | ./3.4.exp $OVERLAY |
62 | 79 | ||