tests: fix exec fails when grep exists with status other than 0
set testmodule [file normalize tests/modules/fork.so]
proc count_log_message {pattern} {
- set result [exec grep -c $pattern < [srv 0 stdout]]
+ set status [catch {exec grep -c $pattern < [srv 0 stdout]} result]
+ if {$status == 1} {
+ set result 0
+ }
+ return $result
}
start_server {tags {"modules"}} {
