mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
tests: fix exec fails when grep exists with status other than 0 (#9066)
Co-authored-by: lizhaolong.lzl <lizhaolong.lzl@B-54MPMD6R-0221.local>
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
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"}} {
|
||||
|
||||
Reference in New Issue
Block a user