aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment/keep-fd.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/environment/keep-fd.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/environment/keep-fd.exp')
-rwxr-xr-xtest/environment/keep-fd.exp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/environment/keep-fd.exp b/test/environment/keep-fd.exp
index 222234ceb..440cbd860 100755
--- a/test/environment/keep-fd.exp
+++ b/test/environment/keep-fd.exp
@@ -47,7 +47,7 @@ after 100
47send -- "firejail --noprofile\r" 47send -- "firejail --noprofile\r"
48expect { 48expect {
49 timeout {puts "TESTING ERROR 2\n";exit} 49 timeout {puts "TESTING ERROR 2\n";exit}
50 "Child process initialized" 50 -re {Child process initialized in [0-9]+.[0-9]+ ms}
51} 51}
52after 100 52after 100
53 53
@@ -83,7 +83,7 @@ after 500
83send -- "firejail --noprofile --keep-fd=\$READ_FD\r" 83send -- "firejail --noprofile --keep-fd=\$READ_FD\r"
84expect { 84expect {
85 timeout {puts "TESTING ERROR 6\n";exit} 85 timeout {puts "TESTING ERROR 6\n";exit}
86 "Child process initialized" 86 -re {Child process initialized in [0-9]+.[0-9]+ ms}
87} 87}
88after 100 88after 100
89 89
@@ -119,7 +119,7 @@ after 500
119send -- "firejail --noprofile --keep-fd=\$WRITE_FD\r" 119send -- "firejail --noprofile --keep-fd=\$WRITE_FD\r"
120expect { 120expect {
121 timeout {puts "TESTING ERROR 10\n";exit} 121 timeout {puts "TESTING ERROR 10\n";exit}
122 "Child process initialized" 122 -re {Child process initialized in [0-9]+.[0-9]+ ms}
123} 123}
124after 100 124after 100
125 125
@@ -155,7 +155,7 @@ after 500
155send -- "firejail --noprofile --keep-fd=\$READ_FD,\$WRITE_FD\r" 155send -- "firejail --noprofile --keep-fd=\$READ_FD,\$WRITE_FD\r"
156expect { 156expect {
157 timeout {puts "TESTING ERROR 14\n";exit} 157 timeout {puts "TESTING ERROR 14\n";exit}
158 "Child process initialized" 158 -re {Child process initialized in [0-9]+.[0-9]+ ms}
159} 159}
160after 100 160after 100
161 161
@@ -191,7 +191,7 @@ after 500
191send -- "firejail --noprofile --keep-fd=all\r" 191send -- "firejail --noprofile --keep-fd=all\r"
192expect { 192expect {
193 timeout {puts "TESTING ERROR 18\n";exit} 193 timeout {puts "TESTING ERROR 18\n";exit}
194 "Child process initialized" 194 -re {Child process initialized in [0-9]+.[0-9]+ ms}
195} 195}
196after 100 196after 100
197 197