mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
add valgrind checking to the testsuite
Original commit message from CVS: * configure.ac: * testsuite/Makefile.am: * testsuite/python.supp: add valgrind checking to the testsuite
This commit is contained in:
parent
8ff948737b
commit
c363ad6052
5 changed files with 279 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-10-07 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* configure.ac:
|
||||
* testsuite/Makefile.am:
|
||||
* testsuite/python.supp:
|
||||
add valgrind checking to the testsuite
|
||||
|
||||
2005-10-06 Johan Dahlin <johan@gnome.org>
|
||||
|
||||
* gst/common.h:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 7d175466d3319fe55327608ea1f7a20619ab5634
|
||||
Subproject commit fb4bd52a0a6e882bd8eb0ca836edd94d3fcaea42
|
|
@ -142,6 +142,8 @@ if test "x$GCC" = xyes; then
|
|||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
GST_VALGRIND_CHECK()
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
codegen/Makefile
|
||||
|
|
|
@ -17,7 +17,7 @@ testhelper_la_SOURCES = \
|
|||
testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
|
||||
|
||||
tests = \
|
||||
TESTS = \
|
||||
test_bin.py \
|
||||
test_buffer.py \
|
||||
test_caps.py \
|
||||
|
@ -39,5 +39,48 @@ check-verbose: testhelper.la
|
|||
@VERBOSE=yes PYTHONPATH=$(top_builddir):$(top_builddir)/gst/.libs:`pwd`:$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py
|
||||
@rm -fr *.pyc
|
||||
|
||||
EXTRA_DIST = $(tests) common.py runtests.py test-object.h
|
||||
EXTRA_DIST = $(TESTS) common.py runtests.py test-object.h python.supp
|
||||
|
||||
if HAVE_VALGRIND
|
||||
check-valgrind:
|
||||
make valgrind
|
||||
else
|
||||
check-valgrind:
|
||||
@true
|
||||
endif
|
||||
|
||||
GSTSUPP = $(top_srcdir)/common/gst.supp
|
||||
PYTHONSUPP = $(top_srcdir)/testsuite/python.supp
|
||||
|
||||
# valgrind any given test_x.py by running make test_x.valgrind
|
||||
%.valgrind: %
|
||||
$(TESTS_ENVIRONMENT) \
|
||||
$(VALGRIND_PATH) -q \
|
||||
--suppressions=$(GSTSUPP) \
|
||||
--suppressions=$(PYTHONSUPP) \
|
||||
--tool=memcheck --leak-check=yes --trace-children=yes \
|
||||
$(PYTHON) \
|
||||
$* 2>&1 | tee valgrind.log
|
||||
@if grep "tely lost" valgrind.log; then \
|
||||
rm valgrind.log; \
|
||||
exit 1; \
|
||||
fi
|
||||
@rm valgrind.log
|
||||
|
||||
# valgrind all tests
|
||||
valgrind: $(TESTS)
|
||||
@echo "Valgrinding tests ..."
|
||||
@failed=0; \
|
||||
for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
|
||||
make $$t.valgrind; \
|
||||
if test "$$?" -ne 0; then \
|
||||
echo "Valgrind error for test $$t"; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
whicht="$$whicht $$t"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -ne 0; then \
|
||||
echo "$$failed tests had leaks under valgrind:"; \
|
||||
echo "$$whicht"; \
|
||||
false; \
|
||||
fi
|
||||
|
|
224
testsuite/python.supp
Normal file
224
testsuite/python.supp
Normal file
|
@ -0,0 +1,224 @@
|
|||
#
|
||||
# This is a valgrind suppression file that should be used when using valgrind.
|
||||
#
|
||||
# Here's an example of running valgrind:
|
||||
#
|
||||
# cd python/dist/src
|
||||
# valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \
|
||||
# ./python -E -tt ./Lib/test/regrtest.py -u bsddb,network
|
||||
#
|
||||
# You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER
|
||||
# to use the preferred suppressions with Py_ADDRESS_IN_RANGE.
|
||||
#
|
||||
# If you do not want to recompile Python, you can uncomment
|
||||
# suppressions for PyObject_Free and PyObject_Realloc.
|
||||
#
|
||||
# See Misc/README.valgrind for more information.
|
||||
|
||||
# all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
|
||||
{
|
||||
ADDRESS_IN_RANGE/Invalid read of size 4
|
||||
Memcheck:Addr4
|
||||
fun:Py_ADDRESS_IN_RANGE
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Invalid read of size 4
|
||||
Memcheck:Value4
|
||||
fun:Py_ADDRESS_IN_RANGE
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
|
||||
Memcheck:Cond
|
||||
fun:Py_ADDRESS_IN_RANGE
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Invalid read of size 4
|
||||
Memcheck:Addr4
|
||||
fun:PyObject_Free
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Invalid read of size 4
|
||||
Memcheck:Value4
|
||||
fun:PyObject_Free
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
|
||||
Memcheck:Cond
|
||||
fun:PyObject_Free
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Invalid read of size 4
|
||||
Memcheck:Addr4
|
||||
fun:PyObject_Realloc
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Invalid read of size 4
|
||||
Memcheck:Value4
|
||||
fun:PyObject_Realloc
|
||||
}
|
||||
|
||||
{
|
||||
ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
|
||||
Memcheck:Cond
|
||||
fun:PyObject_Realloc
|
||||
}
|
||||
|
||||
###
|
||||
### All the suppressions below are for errors that occur within libraries
|
||||
### that Python uses. The problems to not appear to be related to Python's
|
||||
### use of the libraries.
|
||||
###
|
||||
{
|
||||
GDBM problems, see test_gdbm
|
||||
Memcheck:Param
|
||||
write(buf)
|
||||
fun:write
|
||||
fun:gdbm_open
|
||||
|
||||
}
|
||||
|
||||
###
|
||||
### These occur from somewhere within the SSL, when running
|
||||
### test_socket_sll. They are too general to leave on by default.
|
||||
###
|
||||
###{
|
||||
### somewhere in SSL stuff
|
||||
### Memcheck:Cond
|
||||
### fun:memset
|
||||
###}
|
||||
###{
|
||||
### somewhere in SSL stuff
|
||||
### Memcheck:Value4
|
||||
### fun:memset
|
||||
###}
|
||||
###
|
||||
###{
|
||||
### somewhere in SSL stuff
|
||||
### Memcheck:Cond
|
||||
### fun:MD5_Update
|
||||
###}
|
||||
###
|
||||
###{
|
||||
### somewhere in SSL stuff
|
||||
### Memcheck:Value4
|
||||
### fun:MD5_Update
|
||||
###}
|
||||
|
||||
#
|
||||
# All of these problems come from using test_socket_ssl
|
||||
#
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:BN_bin2bn
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:BN_num_bits_word
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Value4
|
||||
fun:BN_num_bits_word
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:BN_mod_exp_mont_word
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:BN_mod_exp_mont
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Param
|
||||
write(buf)
|
||||
fun:write
|
||||
obj:/usr/lib/libcrypto.so.0.9.7
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:RSA_verify
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Value4
|
||||
fun:RSA_verify
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Value4
|
||||
fun:DES_set_key_unchecked
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Value4
|
||||
fun:DES_encrypt2
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
obj:/usr/lib/libssl.so.0.9.7
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Value4
|
||||
obj:/usr/lib/libssl.so.0.9.7
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:BUF_MEM_grow_clean
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:memcpy
|
||||
fun:ssl3_read_bytes
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Cond
|
||||
fun:SHA1_Update
|
||||
}
|
||||
|
||||
{
|
||||
from test_socket_ssl
|
||||
Memcheck:Value4
|
||||
fun:SHA1_Update
|
||||
}
|
||||
|
||||
|
||||
# some extra lxml specific (?) suppressions..
|
||||
|
||||
{
|
||||
Test
|
||||
Memcheck:Param
|
||||
sigaction(act)
|
||||
fun:__libc_sigaction
|
||||
}
|
Loading…
Reference in a new issue