Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
cabe03eb
Commit
cabe03eb
authored
Jul 06, 2011
by
antirez
Browse files
more valgrind friendly test
parent
10ba492f
Changes
3
Show whitespace changes
Inline
Side-by-side
src/valgrind.sup
View file @
cabe03eb
...
@@ -3,3 +3,15 @@
...
@@ -3,3 +3,15 @@
Memcheck:Cond
Memcheck:Cond
fun:lzf_compress
fun:lzf_compress
}
}
{
<lzf_unitialized_hash_table>
Memcheck:Value4
fun:lzf_compress
}
{
<lzf_unitialized_hash_table>
Memcheck:Value8
fun:lzf_compress
}
tests/support/server.tcl
View file @
cabe03eb
set ::global_overrides
{}
set ::global_overrides
{}
set ::tags
{}
set ::tags
{}
set ::valgrind_errors
{}
proc error_and_quit
{
config_file error
}
{
proc error_and_quit
{
config_file error
}
{
puts
"!!COULD NOT START REDIS-SERVER
\n
"
puts
"!!COULD NOT START REDIS-SERVER
\n
"
...
@@ -16,11 +17,12 @@ proc check_valgrind_errors stderr {
...
@@ -16,11 +17,12 @@ proc check_valgrind_errors stderr {
close $fd
close $fd
if
{
!
[
regexp --
{
ERROR SUMMARY: 0 errors
}
$buf
]
||
if
{
!
[
regexp --
{
ERROR SUMMARY: 0 errors
}
$buf
]
||
!
[
regexp --
{
definitely lost: 0 bytes
}
$buf
]}
{
(
!
[
regexp --
{
definitely lost: 0 bytes
}
$buf
]
&&
!
[
regexp --
{
no leaks are possible
}
$buf
])}
{
puts
"*** VALGRIND ERRORS ***"
puts
"*** VALGRIND ERRORS ***"
puts $buf
puts $buf
puts
"---
press enter to continue
---"
puts
"---
-----------------
---"
gets stdin
append ::valgrind_errors
"
$buf
\n\n
"
}
}
}
}
...
...
tests/test_helper.tcl
View file @
cabe03eb
...
@@ -138,6 +138,7 @@ proc execute_everything {} {
...
@@ -138,6 +138,7 @@ proc execute_everything {} {
proc main
{}
{
proc main
{}
{
cleanup
cleanup
set exit_with_error 0
if
{[
string length $::file
]
> 0
}
{
if
{[
string length $::file
]
> 0
}
{
foreach
{
file
}
[
split $::file ,
]
{
foreach
{
file
}
[
split $::file ,
]
{
...
@@ -169,8 +170,14 @@ proc main {} {
...
@@ -169,8 +170,14 @@ proc main {} {
}
}
puts
""
puts
""
exit 1
incr exit_with_error
}
if
{[
string length $::valgrind_errors
]}
{
puts
"Valgrind errors:
\n
$::valgrind
_errors"
incr exit_with_error
}
}
if
{
$exit
_with_error
}
{
exit 1
}
}
}
# parse arguments
# parse arguments
...
...
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