aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.11.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/3.11.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/3.11.exp')
-rwxr-xr-xtest/features/3.11.exp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/features/3.11.exp b/test/features/3.11.exp
index bf528ef25..8287f9dbf 100755
--- a/test/features/3.11.exp
+++ b/test/features/3.11.exp
@@ -21,7 +21,7 @@ sleep 1
21send -- "firejail --profile=3.11.profile\r" 21send -- "firejail --profile=3.11.profile\r"
22expect { 22expect {
23 timeout {puts "TESTING ERROR 0\n";exit} 23 timeout {puts "TESTING ERROR 0\n";exit}
24 "Child process initialized" 24 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
25} 25}
26sleep 1 26sleep 1
27 27
@@ -73,7 +73,7 @@ if { $overlay == "overlay" } {
73 expect { 73 expect {
74 timeout {puts "TESTING ERROR 10\n";exit} 74 timeout {puts "TESTING ERROR 10\n";exit}
75 "overlay option is not available" {puts "grsecurity\n"; exit} 75 "overlay option is not available" {puts "grsecurity\n"; exit}
76 "Child process initialized" {puts "normal system\n"} 76 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"}
77 } 77 }
78 sleep 1 78 sleep 1
79 79
@@ -127,7 +127,7 @@ if { $chroot == "chroot" } {
127 send -- "firejail --profile=3.11.profile\r" 127 send -- "firejail --profile=3.11.profile\r"
128 expect { 128 expect {
129 timeout {puts "TESTING ERROR 20\n";exit} 129 timeout {puts "TESTING ERROR 20\n";exit}
130 "Child process initialized" 130 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
131 } 131 }
132 sleep 1 132 sleep 1
133 133