Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
bc554569
Commit
bc554569
authored
Apr 15, 2010
by
antirez
Browse files
more advanced leaks detection in test redis
parent
fb765a0a
Changes
1
Show whitespace changes
Inline
Side-by-side
test-redis.tcl
View file @
bc554569
...
...
@@ -23,6 +23,12 @@ proc test {name code okpattern} {
puts
"!! ERROR expected
\n
'
$okpattern
'
\n
but got
\n
'
$retval
'"
incr ::failed
}
if
{
$::traceleaks
}
{
if
{
!
[
string match
{
*0 leaks*
}
[
exec leaks redis-server
]]}
{
puts
"--------- Test
$::testnum
LEAKED! --------"
exit 1
}
}
}
proc randstring
{
min max
{
type binary
}}
{
...
...
@@ -2150,6 +2156,7 @@ proc stress {} {
set ::host 127.0.0.1
set ::port 6379
set ::stress 0
set ::traceleaks 0
set ::flush 0
set ::first 0
set ::last 1000000
...
...
@@ -2165,8 +2172,10 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
}
elseif
{
$opt
eq
{
-p
}
&& !$lastarg
}
{
set ::port $arg
incr j
}
elseif
{
$opt
eq
{
-stress
}}
{
}
elseif
{
$opt
eq
{
-
-
stress
}}
{
set ::stress 1
}
elseif
{
$opt
eq
{
--trace-leaks
}}
{
set ::traceleaks 1
}
elseif
{
$opt
eq
{
--flush
}}
{
set ::flush 1
}
elseif
{
$opt
eq
{
--first
}
&& !$lastarg
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment