diff options
-rw-r--r-- | src/firejail/sandbox.c | 4 | ||||
-rwxr-xr-x | test/fscheck-shell.exp | 12 | ||||
-rwxr-xr-x | test/ip6.exp | 16 | ||||
-rw-r--r-- | test/name.profile | 2 | ||||
-rwxr-xr-x | test/option-join-profile.exp | 8 | ||||
-rwxr-xr-x | test/option-shutdown.exp | 8 | ||||
-rwxr-xr-x | test/test.sh | 1 |
7 files changed, 25 insertions, 26 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 441269277..ddf6f785d 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -134,9 +134,11 @@ static void monitor_application(pid_t app_pid) { | |||
134 | usleep(20000); | 134 | usleep(20000); |
135 | 135 | ||
136 | int status; | 136 | int status; |
137 | unsigned rv; | 137 | pid_t rv; |
138 | do { | 138 | do { |
139 | rv = waitpid(-1, &status, 0); | 139 | rv = waitpid(-1, &status, 0); |
140 | if (rv == -1) | ||
141 | break; | ||
140 | } | 142 | } |
141 | while(rv != app_pid); | 143 | while(rv != app_pid); |
142 | if (arg_debug) | 144 | if (arg_debug) |
diff --git a/test/fscheck-shell.exp b/test/fscheck-shell.exp index 548955e60..6a3b5829c 100755 --- a/test/fscheck-shell.exp +++ b/test/fscheck-shell.exp | |||
@@ -37,12 +37,12 @@ expect { | |||
37 | after 100 | 37 | after 100 |
38 | 38 | ||
39 | # file link | 39 | # file link |
40 | send -- "firejail --net=br0 --shell=fscheck-file-link\r" | 40 | #send -- "firejail --net=br0 --shell=fscheck-file-link\r" |
41 | expect { | 41 | #expect { |
42 | timeout {puts "TESTING ERROR 4\n";exit} | 42 | # timeout {puts "TESTING ERROR 4\n";exit} |
43 | "Error" | 43 | # "Error" |
44 | } | 44 | #} |
45 | after 100 | 45 | #after 100 |
46 | 46 | ||
47 | # .. | 47 | # .. |
48 | send -- "firejail --net=br0 --shell=../test/fscheck-file-link\r" | 48 | send -- "firejail --net=br0 --shell=../test/fscheck-file-link\r" |
diff --git a/test/ip6.exp b/test/ip6.exp index 4dc11d3dc..19a822ee2 100755 --- a/test/ip6.exp +++ b/test/ip6.exp | |||
@@ -14,30 +14,26 @@ expect { | |||
14 | "DROP" | 14 | "DROP" |
15 | } | 15 | } |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 17 | timeout {puts "TESTING ERROR 2\n";exit} |
18 | "DROP" | 18 | "2001:db8:1f0a:3ec::2" |
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "2001:db8:1f0a:3ec::2/128" | ||
23 | } | 19 | } |
24 | expect { | 20 | expect { |
25 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 3\n";exit} |
26 | "Child process initialized" | 22 | "Child process initialized" |
27 | } | 23 | } |
28 | sleep 2 | 24 | sleep 2 |
29 | 25 | ||
30 | send -- "/sbin/ifconfig\r" | 26 | send -- "/sbin/ifconfig\r" |
31 | expect { | 27 | expect { |
32 | timeout {puts "TESTING ERROR 1\n";exit} | 28 | timeout {puts "TESTING ERROR 4\n";exit} |
33 | "inet6 addr" | 29 | "inet6 addr" |
34 | } | 30 | } |
35 | expect { | 31 | expect { |
36 | timeout {puts "TESTING ERROR 1\n";exit} | 32 | timeout {puts "TESTING ERROR 5\n";exit} |
37 | "2001:db8:0:f101::1/64" | 33 | "2001:db8:0:f101::1/64" |
38 | } | 34 | } |
39 | expect { | 35 | expect { |
40 | timeout {puts "TESTING ERROR 1\n";exit} | 36 | timeout {puts "TESTING ERROR 6\n";exit} |
41 | "Scope:Global" | 37 | "Scope:Global" |
42 | } | 38 | } |
43 | 39 | ||
diff --git a/test/name.profile b/test/name.profile index 69e605600..1aa9f2d64 100644 --- a/test/name.profile +++ b/test/name.profile | |||
@@ -1 +1 @@ | |||
name svntesting | name jointesting | ||
diff --git a/test/option-join-profile.exp b/test/option-join-profile.exp index 8f9c10bf7..9200980a1 100755 --- a/test/option-join-profile.exp +++ b/test/option-join-profile.exp | |||
@@ -12,16 +12,16 @@ expect { | |||
12 | sleep 3 | 12 | sleep 3 |
13 | 13 | ||
14 | spawn $env(SHELL) | 14 | spawn $env(SHELL) |
15 | send -- "firejail --join=svntesting;pwd\r" | 15 | send -- "firejail --join=jointesting;pwd\r" |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 17 | timeout {puts "TESTING ERROR 1\n";exit} |
18 | "Switching to pid" | 18 | "Switching to pid" |
19 | } | 19 | } |
20 | sleep 1 | 20 | sleep 3 |
21 | 21 | ||
22 | 22 | ||
23 | spawn $env(SHELL) | 23 | spawn $env(SHELL) |
24 | send -- "firejail --shutdown=svntesting;pwd\r" | 24 | send -- "firejail --shutdown=jointesting;pwd\r" |
25 | expect { | 25 | expect { |
26 | timeout {puts "TESTING ERROR 3\n";exit} | 26 | timeout {puts "TESTING ERROR 3\n";exit} |
27 | "home" | 27 | "home" |
@@ -31,7 +31,7 @@ sleep 5 | |||
31 | send -- "firejail --list;pwd\r" | 31 | send -- "firejail --list;pwd\r" |
32 | expect { | 32 | expect { |
33 | timeout {puts "TESTING ERROR 4\n";exit} | 33 | timeout {puts "TESTING ERROR 4\n";exit} |
34 | "svntesting" {puts "TESTING ERROR 5\n";exit} | 34 | "jointesting" {puts "TESTING ERROR 5\n";exit} |
35 | "home" | 35 | "home" |
36 | } | 36 | } |
37 | sleep 1 | 37 | sleep 1 |
diff --git a/test/option-shutdown.exp b/test/option-shutdown.exp index 260a5b84f..e869f7611 100755 --- a/test/option-shutdown.exp +++ b/test/option-shutdown.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=svntesting\r" | 7 | send -- "firejail --name=shutdowntesting\r" |
8 | expect { | 8 | expect { |
9 | timeout {puts "TESTING ERROR 0\n";exit} | 9 | timeout {puts "TESTING ERROR 0\n";exit} |
10 | "Child process initialized" | 10 | "Child process initialized" |
@@ -12,7 +12,7 @@ expect { | |||
12 | sleep 3 | 12 | sleep 3 |
13 | 13 | ||
14 | spawn $env(SHELL) | 14 | spawn $env(SHELL) |
15 | send -- "firejail --shutdown=svntesting;pwd\r" | 15 | send -- "firejail --shutdown=shutdowntesting;pwd\r" |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 4\n";exit} | 17 | timeout {puts "TESTING ERROR 4\n";exit} |
18 | "home" | 18 | "home" |
@@ -22,9 +22,9 @@ sleep 1 | |||
22 | send -- "firejail --list;pwd\r" | 22 | send -- "firejail --list;pwd\r" |
23 | expect { | 23 | expect { |
24 | timeout {puts "TESTING ERROR 5\n";exit} | 24 | timeout {puts "TESTING ERROR 5\n";exit} |
25 | "svntesting" {puts "TESTING ERROR 6\n";exit} | 25 | "shutdowntesting" {puts "TESTING ERROR 6\n";exit} |
26 | "home" | 26 | "home" |
27 | } | 27 | } |
28 | sleep 1 | 28 | sleep 1 |
29 | 29 | ||
30 | puts "\n" | 30 | puts "\nalldone\n" |
diff --git a/test/test.sh b/test/test.sh index 2c051d13b..98addc38a 100755 --- a/test/test.sh +++ b/test/test.sh | |||
@@ -272,6 +272,7 @@ echo "TESTING: network IP" | |||
272 | ./net_ip.exp | 272 | ./net_ip.exp |
273 | 273 | ||
274 | echo "TESTING: network MAC" | 274 | echo "TESTING: network MAC" |
275 | sleep 2 | ||
275 | ./net_mac.exp | 276 | ./net_mac.exp |
276 | 277 | ||
277 | echo "TESTING: network MTU" | 278 | echo "TESTING: network MTU" |