aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/net_netfilter.exp
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2022-02-09 18:04:36 +0100
committerLibravatar smitsohu <smitsohu@gmail.com>2022-02-09 18:30:45 +0100
commit7578e86ef8ddb78da44d426b94def77366627e0e (patch)
treee752d23f1b61a50fb7b7372d6799fe9ef4d111e4 /test/network/net_netfilter.exp
parentMerge pull request #4915 from kmk3/keepassx-restore-nou2f (diff)
downloadfirejail-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/net_netfilter.exp')
-rwxr-xr-xtest/network/net_netfilter.exp8
1 files changed, 4 insertions, 4 deletions
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}
28expect { 28expect {
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}
32sleep 1 32sleep 1
33send -- "exit\r" 33send -- "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}
46sleep 1 46sleep 1
47send -- "exit\r" 47send -- "exit\r"
@@ -55,7 +55,7 @@ expect {
55} 55}
56expect { 56expect {
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}
60sleep 1 60sleep 1
61send -- "ping -c 1 -w 3 10.10.20.1\r" 61send -- "ping -c 1 -w 3 10.10.20.1\r"
@@ -75,7 +75,7 @@ expect {
75} 75}
76expect { 76expect {
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}
80sleep 2 80sleep 2
81send -- "ping -c 1 -w 3 10.10.20.1\r" 81send -- "ping -c 1 -w 3 10.10.20.1\r"