Unverified Commit 8d004934 authored by ZhaolongLi's avatar ZhaolongLi Committed by GitHub
Browse files

tests: fix exec fails when grep exists with status other than 0 (#9066)


Co-authored-by: default avatarlizhaolong.lzl <lizhaolong.lzl@B-54MPMD6R-0221.local>
parent 9ca5e8c5
set testmodule [file normalize tests/modules/fork.so] set testmodule [file normalize tests/modules/fork.so]
proc count_log_message {pattern} { 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"}} { start_server {tags {"modules"}} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment