diff options
author | smitsohu <smitsohu@gmail.com> | 2022-02-09 18:04:36 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2022-02-09 18:30:45 +0100 |
commit | 7578e86ef8ddb78da44d426b94def77366627e0e (patch) | |
tree | e752d23f1b61a50fb7b7372d6799fe9ef4d111e4 /test/network | |
parent | Merge pull request #4915 from kmk3/keepassx-restore-nou2f (diff) | |
download | firejail-7578e86ef8ddb78da44d426b94def77366627e0e.tar.gz firejail-7578e86ef8ddb78da44d426b94def77366627e0e.tar.zst firejail-7578e86ef8ddb78da44d426b94def77366627e0e.zip |
testing: fix expect matching of numbers
The sandbox timestamp should not be available for matching
when output is already expected from the next command
(this is only a problem if numeric output if expected from the
first command in the sandbox).
A possible alternative would be to flush the expect output buffer
with 'expect "*"' after the sandbox is up.
Diffstat (limited to 'test/network')
31 files changed, 64 insertions, 64 deletions
diff --git a/test/network/4bridges_arp.exp b/test/network/4bridges_arp.exp index ccf6050fc..b7138851a 100755 --- a/test/network/4bridges_arp.exp +++ b/test/network/4bridges_arp.exp | |||
@@ -27,7 +27,7 @@ expect { | |||
27 | } | 27 | } |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 0.4\n";exit} | 29 | timeout {puts "TESTING ERROR 0.4\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | sleep 1 | 32 | sleep 1 |
33 | send -- "exit\r" | 33 | send -- "exit\r" |
@@ -53,7 +53,7 @@ expect { | |||
53 | } | 53 | } |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 1.4\n";exit} | 55 | timeout {puts "TESTING ERROR 1.4\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | sleep 1 | 58 | sleep 1 |
59 | send -- "exit\r" | 59 | send -- "exit\r" |
@@ -80,7 +80,7 @@ expect { | |||
80 | } | 80 | } |
81 | expect { | 81 | expect { |
82 | timeout {puts "TESTING ERROR 2.4\n";exit} | 82 | timeout {puts "TESTING ERROR 2.4\n";exit} |
83 | "Child process initialized" | 83 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
84 | } | 84 | } |
85 | sleep 1 | 85 | sleep 1 |
86 | send -- "exit\r" | 86 | send -- "exit\r" |
@@ -108,7 +108,7 @@ expect { | |||
108 | } | 108 | } |
109 | expect { | 109 | expect { |
110 | timeout {puts "TESTING ERROR 4\n";exit} | 110 | timeout {puts "TESTING ERROR 4\n";exit} |
111 | "Child process initialized" | 111 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
112 | } | 112 | } |
113 | sleep 1 | 113 | sleep 1 |
114 | send -- "exit\r" | 114 | send -- "exit\r" |
@@ -137,7 +137,7 @@ expect { | |||
137 | } | 137 | } |
138 | expect { | 138 | expect { |
139 | timeout {puts "TESTING ERROR 9\n";exit} | 139 | timeout {puts "TESTING ERROR 9\n";exit} |
140 | "Child process initialized" | 140 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
141 | } | 141 | } |
142 | sleep 1 | 142 | sleep 1 |
143 | 143 | ||
diff --git a/test/network/4bridges_ip.exp b/test/network/4bridges_ip.exp index af47391ef..60e9d3bab 100755 --- a/test/network/4bridges_ip.exp +++ b/test/network/4bridges_ip.exp | |||
@@ -27,7 +27,7 @@ expect { | |||
27 | } | 27 | } |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 0.4\n";exit} | 29 | timeout {puts "TESTING ERROR 0.4\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | sleep 1 | 32 | sleep 1 |
33 | send -- "exit\r" | 33 | send -- "exit\r" |
@@ -53,7 +53,7 @@ expect { | |||
53 | } | 53 | } |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 1.4\n";exit} | 55 | timeout {puts "TESTING ERROR 1.4\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | sleep 1 | 58 | sleep 1 |
59 | send -- "exit\r" | 59 | send -- "exit\r" |
@@ -80,7 +80,7 @@ expect { | |||
80 | } | 80 | } |
81 | expect { | 81 | expect { |
82 | timeout {puts "TESTING ERROR 2.4\n";exit} | 82 | timeout {puts "TESTING ERROR 2.4\n";exit} |
83 | "Child process initialized" | 83 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
84 | } | 84 | } |
85 | sleep 1 | 85 | sleep 1 |
86 | send -- "exit\r" | 86 | send -- "exit\r" |
@@ -108,7 +108,7 @@ expect { | |||
108 | } | 108 | } |
109 | expect { | 109 | expect { |
110 | timeout {puts "TESTING ERROR 4\n";exit} | 110 | timeout {puts "TESTING ERROR 4\n";exit} |
111 | "Child process initialized" | 111 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
112 | } | 112 | } |
113 | sleep 1 | 113 | sleep 1 |
114 | send -- "exit\r" | 114 | send -- "exit\r" |
@@ -137,7 +137,7 @@ expect { | |||
137 | } | 137 | } |
138 | expect { | 138 | expect { |
139 | timeout {puts "TESTING ERROR 9\n";exit} | 139 | timeout {puts "TESTING ERROR 9\n";exit} |
140 | "Child process initialized" | 140 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
141 | } | 141 | } |
142 | 142 | ||
143 | # check default gateway | 143 | # check default gateway |
diff --git a/test/network/bandwidth.exp b/test/network/bandwidth.exp index 6b85aa07f..1a27bc0bf 100755 --- a/test/network/bandwidth.exp +++ b/test/network/bandwidth.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test --net=br0\r" | 10 | send -- "firejail --name=test --net=br0\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
diff --git a/test/network/dns-print.exp b/test/network/dns-print.exp index 760e9c252..fd19b79ed 100755 --- a/test/network/dns-print.exp +++ b/test/network/dns-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test-dns --net=eth0 --dns=1.2.3.4 --dns=2.3.4.5 --dns=3.4.5.6\r" | 10 | send -- "firejail --name=test-dns --net=eth0 --dns=1.2.3.4 --dns=2.3.4.5 --dns=3.4.5.6\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
diff --git a/test/network/firemon-arp.exp b/test/network/firemon-arp.exp index 5caa4e8bd..0e98b9f36 100755 --- a/test/network/firemon-arp.exp +++ b/test/network/firemon-arp.exp | |||
@@ -17,7 +17,7 @@ match_max 100000 | |||
17 | send -- "firejail --name=test1\r" | 17 | send -- "firejail --name=test1\r" |
18 | expect { | 18 | expect { |
19 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
20 | "Child process initialized" | 20 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
21 | } | 21 | } |
22 | sleep 1 | 22 | sleep 1 |
23 | 23 | ||
@@ -25,7 +25,7 @@ spawn $env(SHELL) | |||
25 | send -- "firejail --name=test2\r" | 25 | send -- "firejail --name=test2\r" |
26 | expect { | 26 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 27 | timeout {puts "TESTING ERROR 2\n";exit} |
28 | "Child process initialized" | 28 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
29 | } | 29 | } |
30 | sleep 1 | 30 | sleep 1 |
31 | 31 | ||
diff --git a/test/network/firemon-interfaces.exp b/test/network/firemon-interfaces.exp index f49e4c470..8eb9f4d87 100755 --- a/test/network/firemon-interfaces.exp +++ b/test/network/firemon-interfaces.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --net=eth0 --name=test1\r" | 10 | send -- "firejail --net=eth0 --name=test1\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 9\n";exit} | 12 | timeout {puts "TESTING ERROR 9\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --net=eth0 --name=test2\r" | 18 | send -- "firejail --net=eth0 --name=test2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 9\n";exit} | 20 | timeout {puts "TESTING ERROR 9\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/network/firemon-route.exp b/test/network/firemon-route.exp index a3af6b2c6..4eea5c14c 100755 --- a/test/network/firemon-route.exp +++ b/test/network/firemon-route.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test1\r" | 10 | send -- "firejail --name=test1\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --name=test2\r" | 18 | send -- "firejail --name=test2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/network/hostname.exp b/test/network/hostname.exp index 3fe684a75..12266a170 100755 --- a/test/network/hostname.exp +++ b/test/network/hostname.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --hostname=bingo --noprofile\r" | 10 | send -- "firejail --hostname=bingo --noprofile\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | send -- "stty -echo\r" | 16 | send -- "stty -echo\r" |
diff --git a/test/network/interface.exp b/test/network/interface.exp index 4ae5b1da6..7c3e39fea 100755 --- a/test/network/interface.exp +++ b/test/network/interface.exp | |||
@@ -20,7 +20,7 @@ set chroot [lindex $argv 1] | |||
20 | send -- "firejail --noprofile --interface=eth0.5 --interface=eth0.6\r" | 20 | send -- "firejail --noprofile --interface=eth0.5 --interface=eth0.6\r" |
21 | expect { | 21 | expect { |
22 | timeout {puts "TESTING ERROR 0\n";exit} | 22 | timeout {puts "TESTING ERROR 0\n";exit} |
23 | "Child process initialized" | 23 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
24 | } | 24 | } |
25 | sleep 1 | 25 | sleep 1 |
26 | 26 | ||
diff --git a/test/network/ip6.exp b/test/network/ip6.exp index ddc50754f..665081db7 100755 --- a/test/network/ip6.exp +++ b/test/network/ip6.exp | |||
@@ -23,7 +23,7 @@ expect { | |||
23 | } | 23 | } |
24 | expect { | 24 | expect { |
25 | timeout {puts "TESTING ERROR 3\n";exit} | 25 | timeout {puts "TESTING ERROR 3\n";exit} |
26 | "Child process initialized" | 26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
27 | } | 27 | } |
28 | sleep 2 | 28 | sleep 2 |
29 | 29 | ||
@@ -64,7 +64,7 @@ expect { | |||
64 | } | 64 | } |
65 | expect { | 65 | expect { |
66 | timeout {puts "TESTING ERROR 13\n";exit} | 66 | timeout {puts "TESTING ERROR 13\n";exit} |
67 | "Child process initialized" | 67 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
68 | } | 68 | } |
69 | sleep 2 | 69 | sleep 2 |
70 | 70 | ||
@@ -90,7 +90,7 @@ send -- "firejail --debug --netfilter6=ipv6.net\r" | |||
90 | expect { | 90 | expect { |
91 | timeout {puts "TESTING ERROR 11\n";exit} | 91 | timeout {puts "TESTING ERROR 11\n";exit} |
92 | "Installing IPv6 firewall" {puts "TESTING ERROR 12\n";exit} | 92 | "Installing IPv6 firewall" {puts "TESTING ERROR 12\n";exit} |
93 | "Child process initialized" | 93 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
94 | } | 94 | } |
95 | after 100 | 95 | after 100 |
96 | send -- "exit\r" | 96 | send -- "exit\r" |
diff --git a/test/network/iprange.exp b/test/network/iprange.exp index cfb1f25c7..d45ecaa40 100755 --- a/test/network/iprange.exp +++ b/test/network/iprange.exp | |||
@@ -27,7 +27,7 @@ expect { | |||
27 | } | 27 | } |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 3\n";exit} | 29 | timeout {puts "TESTING ERROR 3\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | after 100 | 32 | after 100 |
33 | send -- "exit\r" | 33 | send -- "exit\r" |
@@ -53,7 +53,7 @@ expect { | |||
53 | } | 53 | } |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 8\n";exit} | 55 | timeout {puts "TESTING ERROR 8\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | after 100 | 58 | after 100 |
59 | send -- "exit\r" | 59 | send -- "exit\r" |
diff --git a/test/network/net_arp.exp b/test/network/net_arp.exp index 4c4e893b1..dee4ac1c1 100755 --- a/test/network/net_arp.exp +++ b/test/network/net_arp.exp | |||
@@ -10,27 +10,27 @@ match_max 100000 | |||
10 | send -- "firejail --net=br0 sleep 20 &\r" | 10 | send -- "firejail --net=br0 sleep 20 &\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | send -- "firejail --net=br0 sleep 20 &\r" | 15 | send -- "firejail --net=br0 sleep 20 &\r" |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 17 | timeout {puts "TESTING ERROR 1\n";exit} |
18 | "Child process initialized" | 18 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
19 | } | 19 | } |
20 | send -- "firejail --net=br0 sleep 20 &\r" | 20 | send -- "firejail --net=br0 sleep 20 &\r" |
21 | expect { | 21 | expect { |
22 | timeout {puts "TESTING ERROR 2\n";exit} | 22 | timeout {puts "TESTING ERROR 2\n";exit} |
23 | "Child process initialized" | 23 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
24 | } | 24 | } |
25 | send -- "firejail --net=br0 sleep 20 &\r" | 25 | send -- "firejail --net=br0 sleep 20 &\r" |
26 | expect { | 26 | expect { |
27 | timeout {puts "TESTING ERROR 3\n";exit} | 27 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "Child process initialized" | 28 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
29 | } | 29 | } |
30 | send -- "firejail --net=br0 sleep 20 &\r" | 30 | send -- "firejail --net=br0 sleep 20 &\r" |
31 | expect { | 31 | expect { |
32 | timeout {puts "TESTING ERROR 4\n";exit} | 32 | timeout {puts "TESTING ERROR 4\n";exit} |
33 | "Child process initialized" | 33 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
34 | } | 34 | } |
35 | 35 | ||
36 | # will fail | 36 | # will fail |
diff --git a/test/network/net_defaultgw.exp b/test/network/net_defaultgw.exp index e154daccf..6a5a0b64e 100755 --- a/test/network/net_defaultgw.exp +++ b/test/network/net_defaultgw.exp | |||
@@ -27,7 +27,7 @@ expect { | |||
27 | } | 27 | } |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 4\n";exit} | 29 | timeout {puts "TESTING ERROR 4\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | sleep 1 | 32 | sleep 1 |
33 | 33 | ||
diff --git a/test/network/net_defaultgw2.exp b/test/network/net_defaultgw2.exp index c32549d63..5d18571b6 100755 --- a/test/network/net_defaultgw2.exp +++ b/test/network/net_defaultgw2.exp | |||
@@ -15,7 +15,7 @@ expect { | |||
15 | } | 15 | } |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 4\n";exit} | 17 | timeout {puts "TESTING ERROR 4\n";exit} |
18 | "Child process initialized" | 18 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
19 | } | 19 | } |
20 | sleep 1 | 20 | sleep 1 |
21 | 21 | ||
diff --git a/test/network/net_ip.exp b/test/network/net_ip.exp index 604791f69..bdac67155 100755 --- a/test/network/net_ip.exp +++ b/test/network/net_ip.exp | |||
@@ -27,7 +27,7 @@ expect { | |||
27 | } | 27 | } |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 4\n";exit} | 29 | timeout {puts "TESTING ERROR 4\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | sleep 1 | 32 | sleep 1 |
33 | send -- "exit\r" | 33 | send -- "exit\r" |
@@ -53,7 +53,7 @@ expect { | |||
53 | } | 53 | } |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 9\n";exit} | 55 | timeout {puts "TESTING ERROR 9\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | sleep 1 | 58 | sleep 1 |
59 | 59 | ||
diff --git a/test/network/net_local.exp b/test/network/net_local.exp index 54e821a90..6d02de089 100755 --- a/test/network/net_local.exp +++ b/test/network/net_local.exp | |||
@@ -15,7 +15,7 @@ expect { | |||
15 | } | 15 | } |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 4\n";exit} | 17 | timeout {puts "TESTING ERROR 4\n";exit} |
18 | "Child process initialized" | 18 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
19 | } | 19 | } |
20 | sleep 1 | 20 | sleep 1 |
21 | send -- "exit\r" | 21 | send -- "exit\r" |
@@ -25,7 +25,7 @@ sleep 1 | |||
25 | send -- "firejail --noprofile\r" | 25 | send -- "firejail --noprofile\r" |
26 | expect { | 26 | expect { |
27 | timeout {puts "TESTING ERROR 9\n";exit} | 27 | timeout {puts "TESTING ERROR 9\n";exit} |
28 | "Child process initialized" | 28 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
29 | } | 29 | } |
30 | sleep 1 | 30 | sleep 1 |
31 | 31 | ||
diff --git a/test/network/net_mac.exp b/test/network/net_mac.exp index 05400a761..3bd871a06 100755 --- a/test/network/net_mac.exp +++ b/test/network/net_mac.exp | |||
@@ -31,7 +31,7 @@ expect { | |||
31 | } | 31 | } |
32 | expect { | 32 | expect { |
33 | timeout {puts "TESTING ERROR 4\n";exit} | 33 | timeout {puts "TESTING ERROR 4\n";exit} |
34 | "Child process initialized" | 34 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
35 | } | 35 | } |
36 | send -- "exit\r" | 36 | send -- "exit\r" |
37 | after 100 | 37 | after 100 |
diff --git a/test/network/net_macvlan2.exp b/test/network/net_macvlan2.exp index 9be0a8580..abc6641bf 100755 --- a/test/network/net_macvlan2.exp +++ b/test/network/net_macvlan2.exp | |||
@@ -30,7 +30,7 @@ expect { | |||
30 | } | 30 | } |
31 | expect { | 31 | expect { |
32 | timeout {puts "TESTING ERROR 0.6\n";exit} | 32 | timeout {puts "TESTING ERROR 0.6\n";exit} |
33 | "Child process initialized" | 33 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
34 | } | 34 | } |
35 | after 100 | 35 | after 100 |
36 | send -- "exit\r" | 36 | send -- "exit\r" |
diff --git a/test/network/net_mtu.exp b/test/network/net_mtu.exp index 254207a4e..81c89e147 100755 --- a/test/network/net_mtu.exp +++ b/test/network/net_mtu.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --net=br0 --mtu=1000 --noprofile\r" | 11 | send -- "firejail --net=br0 --mtu=1000 --noprofile\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | sleep 1 | 16 | sleep 1 |
17 | 17 | ||
diff --git a/test/network/net_netfilter.exp b/test/network/net_netfilter.exp index 65865122a..eef4a145f 100755 --- a/test/network/net_netfilter.exp +++ b/test/network/net_netfilter.exp | |||
@@ -27,7 +27,7 @@ expect { | |||
27 | } | 27 | } |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 4\n";exit} | 29 | timeout {puts "TESTING ERROR 4\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | sleep 1 | 32 | sleep 1 |
33 | send -- "exit\r" | 33 | send -- "exit\r" |
@@ -41,7 +41,7 @@ expect { | |||
41 | "Chain INPUT (policy DROP" {puts "TESTING ERROR 5.1\n";exit} | 41 | "Chain INPUT (policy DROP" {puts "TESTING ERROR 5.1\n";exit} |
42 | "ACCEPT all -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit} | 42 | "ACCEPT all -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit} |
43 | "ACCEPT icmp -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit} | 43 | "ACCEPT icmp -- any any anywhere" {puts "TESTING ERROR 5.1\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 1 | 46 | sleep 1 |
47 | send -- "exit\r" | 47 | send -- "exit\r" |
@@ -55,7 +55,7 @@ expect { | |||
55 | } | 55 | } |
56 | expect { | 56 | expect { |
57 | timeout {puts "TESTING ERROR 6.1\n";exit} | 57 | timeout {puts "TESTING ERROR 6.1\n";exit} |
58 | "Child process initialized" | 58 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
59 | } | 59 | } |
60 | sleep 1 | 60 | sleep 1 |
61 | send -- "ping -c 1 -w 3 10.10.20.1\r" | 61 | send -- "ping -c 1 -w 3 10.10.20.1\r" |
@@ -75,7 +75,7 @@ expect { | |||
75 | } | 75 | } |
76 | expect { | 76 | expect { |
77 | timeout {puts "TESTING ERROR 7.1\n";exit} | 77 | timeout {puts "TESTING ERROR 7.1\n";exit} |
78 | "Child process initialized" | 78 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
79 | } | 79 | } |
80 | sleep 2 | 80 | sleep 2 |
81 | send -- "ping -c 1 -w 3 10.10.20.1\r" | 81 | send -- "ping -c 1 -w 3 10.10.20.1\r" |
diff --git a/test/network/net_noip.exp b/test/network/net_noip.exp index 37211d923..11d12c3d3 100755 --- a/test/network/net_noip.exp +++ b/test/network/net_noip.exp | |||
@@ -12,7 +12,7 @@ send -- "firejail --noprofile --net=br0 --ip=none\r" | |||
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "eth0" {puts "TESTING ERROR 1\n";exit} | 14 | "eth0" {puts "TESTING ERROR 1\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | send -- "bash\r" | 18 | send -- "bash\r" |
diff --git a/test/network/net_noip2.exp b/test/network/net_noip2.exp index ebba23e81..09607d4b5 100755 --- a/test/network/net_noip2.exp +++ b/test/network/net_noip2.exp | |||
@@ -12,7 +12,7 @@ send -- "firejail --noprofile --net=br1 --ip=none --defaultgw=10.10.30.78\r" | |||
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "eth0" {puts "TESTING ERROR 1\n";exit} | 14 | "eth0" {puts "TESTING ERROR 1\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | send -- "bash\r" | 18 | send -- "bash\r" |
diff --git a/test/network/net_none.exp b/test/network/net_none.exp index 95b1cf086..32d7532ce 100755 --- a/test/network/net_none.exp +++ b/test/network/net_none.exp | |||
@@ -12,7 +12,7 @@ send -- "firejail --net=none\r" | |||
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "eth0" {puts "TESTING ERROR 0.1\n";exit} | 14 | "eth0" {puts "TESTING ERROR 0.1\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
@@ -47,7 +47,7 @@ send -- "firejail --profile=net_none.profile\r" | |||
47 | expect { | 47 | expect { |
48 | timeout {puts "TESTING ERROR 3\n";exit} | 48 | timeout {puts "TESTING ERROR 3\n";exit} |
49 | "eth0" {puts "TESTING ERROR 3.1\n";exit} | 49 | "eth0" {puts "TESTING ERROR 3.1\n";exit} |
50 | "Child process initialized" | 50 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
51 | } | 51 | } |
52 | sleep 1 | 52 | sleep 1 |
53 | 53 | ||
diff --git a/test/network/net_profile.exp b/test/network/net_profile.exp index 236603ff1..3d6f8fdbb 100755 --- a/test/network/net_profile.exp +++ b/test/network/net_profile.exp | |||
@@ -31,7 +31,7 @@ expect { | |||
31 | } | 31 | } |
32 | expect { | 32 | expect { |
33 | timeout {puts "TESTING ERROR 0.4\n";exit} | 33 | timeout {puts "TESTING ERROR 0.4\n";exit} |
34 | "Child process initialized" | 34 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
35 | } | 35 | } |
36 | sleep 1 | 36 | sleep 1 |
37 | 37 | ||
diff --git a/test/network/net_scan.exp b/test/network/net_scan.exp index 90e2e6b9d..42dd74df0 100755 --- a/test/network/net_scan.exp +++ b/test/network/net_scan.exp | |||
@@ -23,7 +23,7 @@ expect { | |||
23 | } | 23 | } |
24 | expect { | 24 | expect { |
25 | timeout {puts "TESTING ERROR 3\n";exit} | 25 | timeout {puts "TESTING ERROR 3\n";exit} |
26 | "Child process initialized" | 26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
27 | } | 27 | } |
28 | sleep 1 | 28 | sleep 1 |
29 | 29 | ||
@@ -43,7 +43,7 @@ expect { | |||
43 | } | 43 | } |
44 | expect { | 44 | expect { |
45 | timeout {puts "TESTING ERROR 7\n";exit} | 45 | timeout {puts "TESTING ERROR 7\n";exit} |
46 | "Child process initialized" | 46 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
47 | } | 47 | } |
48 | sleep 1 | 48 | sleep 1 |
49 | 49 | ||
@@ -63,7 +63,7 @@ expect { | |||
63 | } | 63 | } |
64 | expect { | 64 | expect { |
65 | timeout {puts "TESTING ERROR 11\n";exit} | 65 | timeout {puts "TESTING ERROR 11\n";exit} |
66 | "Child process initialized" | 66 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
67 | } | 67 | } |
68 | sleep 1 | 68 | sleep 1 |
69 | 69 | ||
diff --git a/test/network/net_unconfigured.exp b/test/network/net_unconfigured.exp index 434edaea3..92d7a33eb 100755 --- a/test/network/net_unconfigured.exp +++ b/test/network/net_unconfigured.exp | |||
@@ -12,7 +12,7 @@ send -- "firejail --noprofile --net=br-unconfigured --ip=none\r" | |||
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "eth0" {puts "TESTING ERROR 1\n";exit} | 14 | "eth0" {puts "TESTING ERROR 1\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | send -- "bash\r" | 18 | send -- "bash\r" |
@@ -53,7 +53,7 @@ send -- "firejail --noprofile --net=br-unconfigured\r" | |||
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 7\n";exit} | 54 | timeout {puts "TESTING ERROR 7\n";exit} |
55 | "eth0" {puts "TESTING ERROR 8\n";exit} | 55 | "eth0" {puts "TESTING ERROR 8\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | sleep 1 | 58 | sleep 1 |
59 | send -- "bash\r" | 59 | send -- "bash\r" |
@@ -93,7 +93,7 @@ send -- "firejail --noprofile --net=br-unconfigured --defaultgw=10.10.80.1\r" | |||
93 | expect { | 93 | expect { |
94 | timeout {puts "TESTING ERROR 14\n";exit} | 94 | timeout {puts "TESTING ERROR 14\n";exit} |
95 | "eth0" {puts "TESTING ERROR 15\n";exit} | 95 | "eth0" {puts "TESTING ERROR 15\n";exit} |
96 | "Child process initialized" | 96 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
97 | } | 97 | } |
98 | sleep 1 | 98 | sleep 1 |
99 | send -- "bash\r" | 99 | send -- "bash\r" |
@@ -133,7 +133,7 @@ send -- "firejail --noprofile --net=br-unconfigured --ip=10.10.80.1 --defaultgw= | |||
133 | expect { | 133 | expect { |
134 | timeout {puts "TESTING ERROR 21\n";exit} | 134 | timeout {puts "TESTING ERROR 21\n";exit} |
135 | "eth0" {puts "TESTING ERROR 22\n";exit} | 135 | "eth0" {puts "TESTING ERROR 22\n";exit} |
136 | "Child process initialized" | 136 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
137 | } | 137 | } |
138 | sleep 1 | 138 | sleep 1 |
139 | send -- "bash\r" | 139 | send -- "bash\r" |
@@ -180,7 +180,7 @@ expect { | |||
180 | } | 180 | } |
181 | expect { | 181 | expect { |
182 | timeout {puts "TESTING ERROR 30\n";exit} | 182 | timeout {puts "TESTING ERROR 30\n";exit} |
183 | "Child process initialized" | 183 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
184 | } | 184 | } |
185 | sleep 1 | 185 | sleep 1 |
186 | send -- "bash\r" | 186 | send -- "bash\r" |
diff --git a/test/network/net_veth.exp b/test/network/net_veth.exp index 22388ed89..781cc194c 100755 --- a/test/network/net_veth.exp +++ b/test/network/net_veth.exp | |||
@@ -42,7 +42,7 @@ expect { | |||
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 9\n";exit} | 44 | timeout {puts "TESTING ERROR 9\n";exit} |
45 | "Child process initialized" | 45 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
46 | } | 46 | } |
47 | sleep 1 | 47 | sleep 1 |
48 | send -- "exit\r" | 48 | send -- "exit\r" |
@@ -119,7 +119,7 @@ expect { | |||
119 | } | 119 | } |
120 | expect { | 120 | expect { |
121 | timeout {puts "TESTING ERROR 27\n";exit} | 121 | timeout {puts "TESTING ERROR 27\n";exit} |
122 | "Child process initialized" | 122 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
123 | } | 123 | } |
124 | sleep 1 | 124 | sleep 1 |
125 | send -- "exit\r" | 125 | send -- "exit\r" |
diff --git a/test/network/netfilter-template.exp b/test/network/netfilter-template.exp index f77e4f025..ba09aaea7 100755 --- a/test/network/netfilter-template.exp +++ b/test/network/netfilter-template.exp | |||
@@ -18,7 +18,7 @@ sleep 1 | |||
18 | send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r" | 18 | send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/network/netns.exp b/test/network/netns.exp index f33e5f3c0..034f4736e 100755 --- a/test/network/netns.exp +++ b/test/network/netns.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --netns=red --noprofile\r" | 10 | send -- "firejail --netns=red --noprofile\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | after 100 | 15 | after 100 |
16 | 16 | ||
diff --git a/test/network/netstats.exp b/test/network/netstats.exp index b07fbd535..e06e6769d 100755 --- a/test/network/netstats.exp +++ b/test/network/netstats.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --net=eth0 --name=test1\r" | 10 | send -- "firejail --net=eth0 --name=test1\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 9\n";exit} | 12 | timeout {puts "TESTING ERROR 9\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --net=eth0 --name=test2\r" | 18 | send -- "firejail --net=eth0 --name=test2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 9\n";exit} | 20 | timeout {puts "TESTING ERROR 9\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/network/veth-name.exp b/test/network/veth-name.exp index 1be6a15ea..1c9f23c54 100755 --- a/test/network/veth-name.exp +++ b/test/network/veth-name.exp | |||
@@ -23,7 +23,7 @@ expect { | |||
23 | } | 23 | } |
24 | expect { | 24 | expect { |
25 | timeout {puts "TESTING ERROR 3\n";exit} | 25 | timeout {puts "TESTING ERROR 3\n";exit} |
26 | "Child process initialized" | 26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
27 | } | 27 | } |
28 | sleep 1 | 28 | sleep 1 |
29 | 29 | ||
@@ -55,7 +55,7 @@ expect { | |||
55 | } | 55 | } |
56 | expect { | 56 | expect { |
57 | timeout {puts "TESTING ERROR 9\n";exit} | 57 | timeout {puts "TESTING ERROR 9\n";exit} |
58 | "Child process initialized" | 58 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
59 | } | 59 | } |
60 | sleep 1 | 60 | sleep 1 |
61 | 61 | ||