aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/2.4.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/features/2.4.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/features/2.4.exp')
-rwxr-xr-xtest/features/2.4.exp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/features/2.4.exp b/test/features/2.4.exp
index e2f080617..15159c9b7 100755
--- a/test/features/2.4.exp
+++ b/test/features/2.4.exp
@@ -19,7 +19,7 @@ set chroot [lindex $argv 1]
19send -- "firejail --noprofile --net=br0\r" 19send -- "firejail --noprofile --net=br0\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 0\n";exit} 21 timeout {puts "TESTING ERROR 0\n";exit}
22 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
23} 23}
24sleep 1 24sleep 1
25 25
@@ -56,7 +56,7 @@ sleep 1
56send -- "firejail --noprofile --net=br0 --ip=10.10.20.4\r" 56send -- "firejail --noprofile --net=br0 --ip=10.10.20.4\r"
57expect { 57expect {
58 timeout {puts "TESTING ERROR 0\n";exit} 58 timeout {puts "TESTING ERROR 0\n";exit}
59 "Child process initialized" 59 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
60} 60}
61sleep 1 61sleep 1
62 62
@@ -99,7 +99,7 @@ if { $overlay == "overlay" } {
99 expect { 99 expect {
100 timeout {puts "TESTING ERROR 2\n";exit} 100 timeout {puts "TESTING ERROR 2\n";exit}
101 "overlay option is not available" {puts "grsecurity\n"; exit} 101 "overlay option is not available" {puts "grsecurity\n"; exit}
102 "Child process initialized" {puts "normal system\n"} 102 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
103 } 103 }
104 sleep 1 104 sleep 1
105 105
@@ -136,7 +136,7 @@ if { $overlay == "overlay" } {
136 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r" 136 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r"
137 expect { 137 expect {
138 timeout {puts "TESTING ERROR 2\n";exit} 138 timeout {puts "TESTING ERROR 2\n";exit}
139 "Child process initialized" 139 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
140 } 140 }
141 sleep 1 141 sleep 1
142 142
@@ -179,7 +179,7 @@ if { $chroot == "chroot" } {
179 send -- "firejail --noprofile --net=br0 --chroot=/tmp/chroot\r" 179 send -- "firejail --noprofile --net=br0 --chroot=/tmp/chroot\r"
180 expect { 180 expect {
181 timeout {puts "TESTING ERROR 4\n";exit} 181 timeout {puts "TESTING ERROR 4\n";exit}
182 "Child process initialized" 182 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
183 } 183 }
184 sleep 1 184 sleep 1
185 185
@@ -208,7 +208,7 @@ if { $chroot == "chroot" } {
208 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --chroot=/tmp/chroot\r" 208 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --chroot=/tmp/chroot\r"
209 expect { 209 expect {
210 timeout {puts "TESTING ERROR 4\n";exit} 210 timeout {puts "TESTING ERROR 4\n";exit}
211 "Child process initialized" 211 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
212 } 212 }
213 sleep 1 213 sleep 1
214 214